]> err.no Git - mapper/commitdiff
Set toggle items from config.
authorKaj-Michael Lang <milang@onion.tal.org>
Thu, 6 Sep 2007 13:46:00 +0000 (16:46 +0300)
committerKaj-Michael Lang <milang@onion.tal.org>
Thu, 6 Sep 2007 13:46:00 +0000 (16:46 +0300)
src/ui-common.c

index 6986374f583e631acc9dd37993489e9d29371406..0c7cafceec256e2b195ecd6fd14ecce1491faf87 100644 (file)
@@ -213,7 +213,7 @@ static GtkActionEntry ui_entries[] = {
 
        {"view_items", NULL, N_("Features"), NULL, NULL, NULL },
 
-       {"goto", NULL, N_("_Go to"), NULL, NULL, NULL },
+       {"goto", NULL, N_("_Go"), NULL, NULL, NULL },
        {"goto_home", GTK_STOCK_HOME, N_("_Home"), NULL, NULL, G_CALLBACK(menu_cb_goto_home) },
        {"goto_destination", GTK_STOCK_JUMP_TO, N_("_Destination"), NULL, NULL, G_CALLBACK(menu_cb_goto_destination) },
        {"goto_gps", NULL, N_("_GPS"), NULL, NULL, G_CALLBACK(menu_cb_goto_gps) },
@@ -234,15 +234,15 @@ static GtkToggleActionEntry ui_toggle_entries[] = {
        {"gps_enabled", GTK_STOCK_CONNECT, N_("Enabled"), NULL, NULL, G_CALLBACK(menu_cb_enable_gps), FALSE},
        {"gps_information", GTK_STOCK_INFO, N_("Panel"), NULL, NULL, G_CALLBACK (menu_cb_gps_show_info), FALSE},
 #if 0
-       {"view_fullscreen", GTK_STOCK_FULLSCREEN, N_("Fullscreen"), NULL, NULL, G_CALLBACK(cb_fullscreen), FALSE },
+       {"view_fullscreen", GTK_STOCK_FULLSCREEN, N_("Fullscreen"), NULL, NULL, G_CALLBACK(cb_fullscreen), FALSE},
 #else
-       {"view_fullscreen", NULL, N_("Fullscreen"), NULL, NULL, G_CALLBACK(cb_fullscreen), FALSE },
+       {"view_fullscreen", NULL, N_("Fullscreen"), NULL, NULL, G_CALLBACK(cb_fullscreen), FALSE},
 #endif
-       {"view_scale", NULL, N_("Scale"), NULL, NULL, G_CALLBACK(menu_cb_show_scale) , TRUE },
-       {"view_route", NULL, N_("Route"), NULL, NULL, G_CALLBACK(menu_cb_show_routes), TRUE },
-       {"view_track", NULL, N_("Track"), NULL, NULL, G_CALLBACK(menu_cb_show_tracks), TRUE },
-       {"view_vector", NULL, N_("Vector"), NULL, NULL, G_CALLBACK(menu_cb_show_velvec), TRUE },
-       {"view_poi", NULL, N_("POIs"), NULL, NULL, G_CALLBACK(menu_cb_show_poi), TRUE },
+       {"view_scale", NULL, N_("Scale"), NULL, NULL, G_CALLBACK(menu_cb_show_scale), TRUE},
+       {"view_route", NULL, N_("Route"), NULL, NULL, G_CALLBACK(menu_cb_show_routes), TRUE},
+       {"view_track", NULL, N_("Track"), NULL, NULL, G_CALLBACK(menu_cb_show_tracks), TRUE},
+       {"view_vector", NULL, N_("Vector"), NULL, NULL, G_CALLBACK(menu_cb_show_velvec), TRUE},
+       {"view_poi", NULL, N_("POIs"), NULL, NULL, G_CALLBACK(menu_cb_show_poi), TRUE},
 };
 static guint n_ui_toggle_entries = G_N_ELEMENTS (ui_toggle_entries);
 
@@ -828,6 +828,17 @@ pango_layout_set_font_description(_sat_details_expose_layout, _sat_details_expos
 _last_spoken_phrase = g_strdup("");
 memset(&_autoroute_data, 0, sizeof(_autoroute_data));
 
+/* Set defaults for items */
+set_action_activate("map_auto_download", _auto_download);
+set_action_activate("enable_gps", _enable_gps);
+set_action_activate("gps_information", _gps_info);
+set_action_activate("view_scale", _show_scale);
+set_action_activate("view_vector", _show_velvec);
+set_action_activate("view_poi", _show_poi);
+
+set_action_activate("view_track", _show_tracks & TRACKS_MASK);
+set_action_activate("view_route", _show_tracks & ROUTES_MASK);
+
 /* Initialize our line styles. */
 update_gcs();