diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-12-25 14:46:50 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-12-25 14:46:50 +0000 |
commit | c14c52fd9263bb25024b6aad9c6093288ecd999e (patch) | |
tree | b2e5137bd366bb0d2196bae372c575e54213d546 | |
parent | 143f3b1e52c156efdeb52a49eb662a3c2bd9cb75 (diff) | |
download | gnunet-gtk-c14c52fd9263bb25024b6aad9c6093288ecd999e.tar.gz gnunet-gtk-c14c52fd9263bb25024b6aad9c6093288ecd999e.zip |
-LRN: fix license display, more about windows
-rw-r--r-- | configure.ac | 23 | ||||
-rw-r--r-- | contrib/Makefile.am | 9 | ||||
-rw-r--r-- | src/lib/about.c | 10 | ||||
-rw-r--r-- | src/statistics/gnunet-statistics-gtk-about.c | 2 |
4 files changed, 35 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac index 7e9a52b6..80dffb87 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -358,10 +358,26 @@ AC_DEFINE_DIR([PACKAGE_DATA], [datarootdir], [The directory for installing read- | |||
358 | packagesrcdir=`cd $srcdir && pwd` | 358 | packagesrcdir=`cd $srcdir && pwd` |
359 | AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}", [source dir]) | 359 | AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}", [source dir]) |
360 | 360 | ||
361 | AC_SUBST(GNUNET_FS_GTK_NAME, $PACKAGE_NAME, [name of the program]) | 361 | AC_SUBST(GNUNET_FS_GTK_NAME, "GNUnet-FS-GTK", [name of the program]) |
362 | AC_SUBST(GNUNET_PEERINFO_GTK_NAME, "GNUnet-Peerinfo-GTK", [name of the program]) | ||
363 | AC_SUBST(GNUNET_STATISTICS_GTK_NAME, "GNUnet-Statistics-GTK", [name of the program]) | ||
364 | AC_SUBST(GNUNET_SETUP_GTK_NAME, "GNUnet-Setup", [name of the program]) | ||
365 | |||
362 | AC_SUBST(GNUNET_FS_GTK_VERSION3, $PACKAGE_VERSION, [version of the program]) | 366 | AC_SUBST(GNUNET_FS_GTK_VERSION3, $PACKAGE_VERSION, [version of the program]) |
367 | AC_SUBST(GNUNET_PEERINFO_GTK_VERSION3, $PACKAGE_VERSION, [version of the program]) | ||
368 | AC_SUBST(GNUNET_STATISTICS_GTK_VERSION3, $PACKAGE_VERSION, [version of the program]) | ||
369 | AC_SUBST(GNUNET_SETUP_GTK_VERSION3, $PACKAGE_VERSION, [version of the program]) | ||
370 | |||
363 | AC_SUBST(GNUNET_FS_GTK_YEARFROM, [2010], [year of the first release]) | 371 | AC_SUBST(GNUNET_FS_GTK_YEARFROM, [2010], [year of the first release]) |
364 | AC_SUBST(GNUNET_FS_GTK_YEARTO, [$(date | sed -e 's/.* \([[[:digit:]]]\+\)$/\1/')], [year of the most current release]) | 372 | AC_SUBST(GNUNET_PEERINFO_GTK_YEARFROM, [2010], [year of the first release]) |
373 | AC_SUBST(GNUNET_STATISTICS_GTK_YEARFROM, [2010], [year of the first release]) | ||
374 | AC_SUBST(GNUNET_SETUP_GTK_YEARFROM, [2010], [year of the first release]) | ||
375 | |||
376 | thisyear=$(date | sed -e 's/.* \([[[:digit:]]]\+\)$/\1/') | ||
377 | AC_SUBST(GNUNET_FS_GTK_YEARTO, ${thisyear}, [year of the most current release]) | ||
378 | AC_SUBST(GNUNET_PEERINFO_GTK_YEARTO, ${thisyear}, [year of the most current release]) | ||
379 | AC_SUBST(GNUNET_STATISTICS_GTK_YEARTO, ${thisyear}, [year of the most current release]) | ||
380 | AC_SUBST(GNUNET_SETUP_GTK_YEARTO, ${thisyear}, [year of the most current release]) | ||
365 | 381 | ||
366 | AC_OUTPUT([ | 382 | AC_OUTPUT([ |
367 | Makefile | 383 | Makefile |
@@ -380,4 +396,7 @@ po/Makefile | |||
380 | gnunet-fs-gtk.desktop | 396 | gnunet-fs-gtk.desktop |
381 | gnunet-setup.desktop | 397 | gnunet-setup.desktop |
382 | contrib/gnunet_fs_gtk_about_window.glade | 398 | contrib/gnunet_fs_gtk_about_window.glade |
399 | contrib/gnunet_peerinfo_gtk_about_window.glade | ||
400 | contrib/gnunet_statistics_gtk_about_window.glade | ||
401 | contrib/gnunet_setup_about_window.glade | ||
383 | ]) | 402 | ]) |
diff --git a/contrib/Makefile.am b/contrib/Makefile.am index 0d40e9b8..e5b4ae86 100644 --- a/contrib/Makefile.am +++ b/contrib/Makefile.am | |||
@@ -13,7 +13,7 @@ EXTRA_DIST = \ | |||
13 | $(IMAGES) | 13 | $(IMAGES) |
14 | 14 | ||
15 | pkgdata_DATA = \ | 15 | pkgdata_DATA = \ |
16 | gnunet_fs_gtk_about_dialog.glade \ | 16 | gnunet_fs_gtk_about_window.glade \ |
17 | gnunet_fs_gtk_advertise_pseudonym_dialog.glade \ | 17 | gnunet_fs_gtk_advertise_pseudonym_dialog.glade \ |
18 | gnunet_fs_gtk_create_namespace_dialog.glade \ | 18 | gnunet_fs_gtk_create_namespace_dialog.glade \ |
19 | gnunet_fs_gtk_download_as_dialog.glade \ | 19 | gnunet_fs_gtk_download_as_dialog.glade \ |
@@ -29,12 +29,11 @@ pkgdata_DATA = \ | |||
29 | gnunet_fs_gtk_search_tab.glade \ | 29 | gnunet_fs_gtk_search_tab.glade \ |
30 | gnunet_fs_gtk_select_pseudonym_dialog.glade \ | 30 | gnunet_fs_gtk_select_pseudonym_dialog.glade \ |
31 | gnunet_gtk_status_bar_menu.glade \ | 31 | gnunet_gtk_status_bar_menu.glade \ |
32 | gnunet_peerinfo_gtk_about_dialog.glade \ | 32 | gnunet_peerinfo_gtk_about_window.glade \ |
33 | gnunet_peerinfo_gtk_main_window.glade \ | 33 | gnunet_peerinfo_gtk_main_window.glade \ |
34 | gnunet_statistics_gtk_about_dialog.glade \ | 34 | gnunet_statistics_gtk_about_window.glade \ |
35 | gnunet_statistics_gtk_main_window.glade \ | 35 | gnunet_statistics_gtk_main_window.glade \ |
36 | gnunet_setup_gtk_main_window.glade \ | 36 | gnunet_setup_gtk_main_window.glade |
37 | gnunet_fs_gtk_about_window.glade | ||
38 | 37 | ||
39 | install-data-local: | 38 | install-data-local: |
40 | $(mkinstalldirs) $(DESTDIR)$(pkgpixdir) | 39 | $(mkinstalldirs) $(DESTDIR)$(pkgpixdir) |
diff --git a/src/lib/about.c b/src/lib/about.c index 6e2b80f1..2d643033 100644 --- a/src/lib/about.c +++ b/src/lib/about.c | |||
@@ -65,12 +65,20 @@ GNUNET_GTK_about_window_realized (GtkWidget *widget, gpointer user_data) | |||
65 | GtkBuilder *builder = GTK_BUILDER (user_data); | 65 | GtkBuilder *builder = GTK_BUILDER (user_data); |
66 | GtkTextBuffer *license_contents; | 66 | GtkTextBuffer *license_contents; |
67 | gchar *license = NULL; | 67 | gchar *license = NULL; |
68 | const char *path; | ||
69 | char *license_path = NULL; | ||
68 | license_contents = GTK_TEXT_BUFFER (gtk_builder_get_object (builder, "license_contents")); | 70 | license_contents = GTK_TEXT_BUFFER (gtk_builder_get_object (builder, "license_contents")); |
69 | if (g_file_get_contents ("COPYING", &license, NULL, NULL) && license != NULL) | 71 | path = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_DOCDIR); |
72 | if (path != NULL) | ||
73 | GNUNET_asprintf (&license_path, "%s%s", path, "COPYING"); | ||
74 | else | ||
75 | license_path = GNUNET_strdup ("COPYING"); | ||
76 | if (g_file_get_contents (license_path, &license, NULL, NULL) && license != NULL) | ||
70 | { | 77 | { |
71 | gtk_text_buffer_set_text (license_contents, license, -1); | 78 | gtk_text_buffer_set_text (license_contents, license, -1); |
72 | g_free (license); | 79 | g_free (license); |
73 | } | 80 | } |
81 | GNUNET_free_non_null (license_path); | ||
74 | } | 82 | } |
75 | 83 | ||
76 | G_MODULE_EXPORT void | 84 | G_MODULE_EXPORT void |
diff --git a/src/statistics/gnunet-statistics-gtk-about.c b/src/statistics/gnunet-statistics-gtk-about.c index 453306c5..ea4591b1 100644 --- a/src/statistics/gnunet-statistics-gtk-about.c +++ b/src/statistics/gnunet-statistics-gtk-about.c | |||
@@ -35,7 +35,7 @@ void | |||
35 | GNUNET_STATISTICS_GTK_main_menu_help_about_activate_cb (GtkWidget * dummy, | 35 | GNUNET_STATISTICS_GTK_main_menu_help_about_activate_cb (GtkWidget * dummy, |
36 | gpointer data) | 36 | gpointer data) |
37 | { | 37 | { |
38 | GNUNET_GTK_display_about ("gnunet_statistics_gtk_about_dialog.glade"); | 38 | GNUNET_GTK_display_about ("gnunet_statistics_gtk_about_window.glade"); |
39 | } | 39 | } |
40 | 40 | ||
41 | 41 | ||