aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-12-25 14:46:50 +0000
committerChristian Grothoff <christian@grothoff.org>2011-12-25 14:46:50 +0000
commitc14c52fd9263bb25024b6aad9c6093288ecd999e (patch)
treeb2e5137bd366bb0d2196bae372c575e54213d546
parent143f3b1e52c156efdeb52a49eb662a3c2bd9cb75 (diff)
downloadgnunet-gtk-c14c52fd9263bb25024b6aad9c6093288ecd999e.tar.gz
gnunet-gtk-c14c52fd9263bb25024b6aad9c6093288ecd999e.zip
-LRN: fix license display, more about windows
-rw-r--r--configure.ac23
-rw-r--r--contrib/Makefile.am9
-rw-r--r--src/lib/about.c10
-rw-r--r--src/statistics/gnunet-statistics-gtk-about.c2
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-
358packagesrcdir=`cd $srcdir && pwd` 358packagesrcdir=`cd $srcdir && pwd`
359AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}", [source dir]) 359AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}", [source dir])
360 360
361AC_SUBST(GNUNET_FS_GTK_NAME, $PACKAGE_NAME, [name of the program]) 361AC_SUBST(GNUNET_FS_GTK_NAME, "GNUnet-FS-GTK", [name of the program])
362AC_SUBST(GNUNET_PEERINFO_GTK_NAME, "GNUnet-Peerinfo-GTK", [name of the program])
363AC_SUBST(GNUNET_STATISTICS_GTK_NAME, "GNUnet-Statistics-GTK", [name of the program])
364AC_SUBST(GNUNET_SETUP_GTK_NAME, "GNUnet-Setup", [name of the program])
365
362AC_SUBST(GNUNET_FS_GTK_VERSION3, $PACKAGE_VERSION, [version of the program]) 366AC_SUBST(GNUNET_FS_GTK_VERSION3, $PACKAGE_VERSION, [version of the program])
367AC_SUBST(GNUNET_PEERINFO_GTK_VERSION3, $PACKAGE_VERSION, [version of the program])
368AC_SUBST(GNUNET_STATISTICS_GTK_VERSION3, $PACKAGE_VERSION, [version of the program])
369AC_SUBST(GNUNET_SETUP_GTK_VERSION3, $PACKAGE_VERSION, [version of the program])
370
363AC_SUBST(GNUNET_FS_GTK_YEARFROM, [2010], [year of the first release]) 371AC_SUBST(GNUNET_FS_GTK_YEARFROM, [2010], [year of the first release])
364AC_SUBST(GNUNET_FS_GTK_YEARTO, [$(date | sed -e 's/.* \([[[:digit:]]]\+\)$/\1/')], [year of the most current release]) 372AC_SUBST(GNUNET_PEERINFO_GTK_YEARFROM, [2010], [year of the first release])
373AC_SUBST(GNUNET_STATISTICS_GTK_YEARFROM, [2010], [year of the first release])
374AC_SUBST(GNUNET_SETUP_GTK_YEARFROM, [2010], [year of the first release])
375
376thisyear=$(date | sed -e 's/.* \([[[:digit:]]]\+\)$/\1/')
377AC_SUBST(GNUNET_FS_GTK_YEARTO, ${thisyear}, [year of the most current release])
378AC_SUBST(GNUNET_PEERINFO_GTK_YEARTO, ${thisyear}, [year of the most current release])
379AC_SUBST(GNUNET_STATISTICS_GTK_YEARTO, ${thisyear}, [year of the most current release])
380AC_SUBST(GNUNET_SETUP_GTK_YEARTO, ${thisyear}, [year of the most current release])
365 381
366AC_OUTPUT([ 382AC_OUTPUT([
367Makefile 383Makefile
@@ -380,4 +396,7 @@ po/Makefile
380gnunet-fs-gtk.desktop 396gnunet-fs-gtk.desktop
381gnunet-setup.desktop 397gnunet-setup.desktop
382contrib/gnunet_fs_gtk_about_window.glade 398contrib/gnunet_fs_gtk_about_window.glade
399contrib/gnunet_peerinfo_gtk_about_window.glade
400contrib/gnunet_statistics_gtk_about_window.glade
401contrib/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
15pkgdata_DATA = \ 15pkgdata_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
39install-data-local: 38install-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
76G_MODULE_EXPORT void 84G_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
35GNUNET_STATISTICS_GTK_main_menu_help_about_activate_cb (GtkWidget * dummy, 35GNUNET_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