gtk_box_pack_start (GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), lonlabel, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), lon, FALSE, FALSE, 0);
+ // 'ok' when press return in the entry
+ g_signal_connect_swapped (lat, "activate", G_CALLBACK(a_dialog_response_accept), dialog);
+ g_signal_connect_swapped (lon, "activate", G_CALLBACK(a_dialog_response_accept), dialog);
+
gtk_dialog_set_default_response ( GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT );
if ( gtk_dialog_run ( GTK_DIALOG(dialog) ) == GTK_RESPONSE_ACCEPT )
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,
}
/* 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;
- 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]) );
- gtk_box_pack_start ( GTK_BOX(vbox), label, FALSE, TRUE, 5 );
+ gtk_box_pack_start ( GTK_BOX(vbox), label, FALSE, TRUE, padding );
}
return vbox;
}
"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
+
gtk_show_about_dialog (parent,
/* TODO do not set program-name and correctly set info for g_get_application_name */
"program-name", program_name,
"authors", AUTHORS,
"documenters", DOCUMENTERS,
"translator-credits", _("Translation is coordinated on http://launchpad.net/viking"),
+ "artists", libs,
NULL);
}