]> git.street.me.uk Git - andy/viking.git/blobdiff - src/dialog.c
SF Features#76: Add ability to handle and name trackpoints.
[andy/viking.git] / src / dialog.c
index 0f1da6ced85337ab218cbc0c66ead8d62be1573f..9baf6bdd034a5dc6b8843d71e8afed4fc0b89f04 100644 (file)
@@ -505,7 +505,7 @@ GList *a_dialog_select_from_list ( GtkWindow *parent, GList *names, gboolean mul
   return NULL;
 }
 
   return NULL;
 }
 
-gchar *a_dialog_new_track ( GtkWindow *parent, GHashTable *tracks, gchar *default_name, gboolean is_route )
+gchar *a_dialog_new_track ( GtkWindow *parent, gchar *default_name, gboolean is_route )
 {
   GtkWidget *dialog = gtk_dialog_new_with_buttons ( is_route ? _("Add Route") : _("Add Track"),
                                                   parent,
 {
   GtkWidget *dialog = gtk_dialog_new_with_buttons ( is_route ? _("Add Route") : _("Add Track"),
                                                   parent,
@@ -547,17 +547,17 @@ gchar *a_dialog_new_track ( GtkWindow *parent, GHashTable *tracks, gchar *defaul
 }
 
 /* creates a vbox full of labels */
 }
 
 /* creates a vbox full of labels */
-GtkWidget *a_dialog_create_label_vbox ( gchar **texts, int label_count )
+GtkWidget *a_dialog_create_label_vbox ( gchar **texts, int label_count, gint spacing, gint padding )
 {
   GtkWidget *vbox, *label;
   int i;
 {
   GtkWidget *vbox, *label;
   int i;
-  vbox = gtk_vbox_new( TRUE, 3 );
+  vbox = gtk_vbox_new( TRUE, spacing );
 
   for ( i = 0; i < label_count; i++ )
   {
     label = gtk_label_new(NULL);
     gtk_label_set_markup ( GTK_LABEL(label), _(texts[i]) );
 
   for ( i = 0; i < label_count; i++ )
   {
     label = gtk_label_new(NULL);
     gtk_label_set_markup ( GTK_LABEL(label), _(texts[i]) );
-    gtk_box_pack_start ( GTK_BOX(vbox), label, FALSE, TRUE, 5 );
+    gtk_box_pack_start ( GTK_BOX(vbox), label, FALSE, TRUE, padding );
   }
   return vbox;
 }
   }
   return vbox;
 }
@@ -798,12 +798,51 @@ void a_dialog_about ( GtkWindow *parent )
                        "along with this program; if not, write to the Free Software "
                        "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA");
 
                        "along with this program; if not, write to the Free Software "
                        "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA");
 
+  // Would be nice to use gtk_about_dialog_add_credit_section (), but that requires gtk 3.4
+  // For now shove it in the 'artists' section so at least the information is easily visible
+  // Something more advanced might have proper version information too...
+  const gchar *libs[] = {
+    "Compiled in libraries:",
+    // Default libs
+    "libglib-2.0",
+    "libgthread-2.0",
+    "libgtk+-2.0",
+    "libgio-2.0",
+    // Potentially optional libs (but probably couldn't build without them)
+#ifdef HAVE_LIBM
+    "libm",
+#endif
+#ifdef HAVE_LIBZ
+    "libz",
+#endif
+#ifdef HAVE_LIBCURL
+    "libcurl",
+#endif
+    // Actually optional libs
+#ifdef HAVE_LIBGPS
+    "libgps",
+#endif
+#ifdef HAVE_LIBEXIF
+    "libexif",
+#endif
+#ifdef HAVE_LIBX11
+    "libX11",
+#endif
+#ifdef HAVE_LIBMAGIC
+    "libmagic",
+#endif
+#ifdef HAVE_LIBBZ2
+    "libbz2",
+#endif
+    NULL
+  };
   // Newer versions of GTK 'just work', calling gtk_show_uri() on the URL or email and opens up the appropriate program
   // This is the old method:
 #if (GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION < 24)
   gtk_about_dialog_set_url_hook (about_url_hook, NULL, NULL);
   gtk_about_dialog_set_email_hook (about_email_hook, NULL, NULL);
 #endif
   // Newer versions of GTK 'just work', calling gtk_show_uri() on the URL or email and opens up the appropriate program
   // This is the old method:
 #if (GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION < 24)
   gtk_about_dialog_set_url_hook (about_url_hook, NULL, NULL);
   gtk_about_dialog_set_email_hook (about_email_hook, NULL, NULL);
 #endif
+
   gtk_show_about_dialog (parent,
        /* TODO do not set program-name and correctly set info for g_get_application_name */
        "program-name", program_name,
   gtk_show_about_dialog (parent,
        /* TODO do not set program-name and correctly set info for g_get_application_name */
        "program-name", program_name,
@@ -817,6 +856,7 @@ void a_dialog_about ( GtkWindow *parent )
        "authors", AUTHORS,
        "documenters", DOCUMENTERS,
        "translator-credits", _("Translation is coordinated on http://launchpad.net/viking"),
        "authors", AUTHORS,
        "documenters", DOCUMENTERS,
        "translator-credits", _("Translation is coordinated on http://launchpad.net/viking"),
+       "artists", libs,
        NULL);
 }
 
        NULL);
 }