X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui-common.c;h=9d14e13b19f4c9f6e287f5e51f61c67b07e64663;hb=caf76edae99174b243cd3988789420b713028f6d;hp=8782ca22fdd09ba102f4a9442c8dd12cbd489a27;hpb=10d71db32e27ab12b4597fe0e522995557766387;p=mapper diff --git a/src/ui-common.c b/src/ui-common.c index 8782ca2..9d14e13 100644 --- a/src/ui-common.c +++ b/src/ui-common.c @@ -31,6 +31,7 @@ #include "ui-common.h" #include "db.h" #include "gps-panels.h" +#include "gps-conn.h" #include "settings-gui.h" /* Callbacks */ @@ -72,8 +73,13 @@ static const gchar *mapper_ui = " " " " " " -" " " " +" " +" " +#ifdef WITH_DEVICE_770 +" " +#endif +" " " " " " " " @@ -191,6 +197,7 @@ static GtkActionEntry ui_entries[] = { {"file", NULL, N_("_File"), NULL, NULL, NULL }, {"file_settings", GTK_STOCK_PREFERENCES, N_("_Settings..."), NULL, NULL, NULL }, {"file_settings_generic", NULL, N_("Generic..."), NULL, NULL, G_CALLBACK(menu_cb_settings) }, + {"file_settings_colors", NULL, N_("_Colors..."), NULL, NULL, G_CALLBACK(menu_cb_settings_colors) }, {"file_settings_gps", NULL, N_("_Gps..."), NULL, NULL, G_CALLBACK(menu_cb_settings_gps) }, {"file_settings_osm", NULL, N_("_Map info..."), NULL, NULL, G_CALLBACK(menu_cb_settings_osm) }, {"file_quit", GTK_STOCK_QUIT, N_("_Quit"), "Q", NULL, G_CALLBACK(gtk_main_quit) }, @@ -556,7 +563,6 @@ GtkToolItem *item; GtkTreeViewColumn *column; GtkCellRenderer *renderer; - #ifdef WITH_HILDON _program = HILDON_PROGRAM(hildon_program_get_instance()); _window = GTK_WIDGET(hildon_window_new()); @@ -792,3 +798,19 @@ progress_dialog_remove(GtkWidget *dialog) if (dialog) gtk_widget_destroy(dialog); } + +/** + * Simple dialog to ask if we should try to reconnect to GPS + * returns TRUE or FALSE + */ +gboolean +gps_retry_connection(Gps *gps, const gchar *error) +{ +GtkWidget *confirm; +gboolean r; + +confirm=hildon_note_new_confirmation(GTK_WINDOW(_window), _("Failed to connect to GPS receiver. Retry?")); +r=(GTK_RESPONSE_OK==gtk_dialog_run(GTK_DIALOG(confirm))) ? TRUE : FALSE; +gtk_widget_destroy(confirm); +return r; +}