void vik_window_set_redraw_trigger(VikLayer *vl)
{
VikWindow *vw = VIK_WINDOW(VIK_GTK_WINDOW_FROM_LAYER(vl));
- vw->trigger = vl;
+ if (NULL != vw)
+ vw->trigger = vl;
}
static void window_configure_event ( VikWindow *vw )
GtkWidget *mode_button;
gchar *buttonname;
switch ( mode ) {
- case VIK_VIEWPORT_DRAWMODE_UTM: buttonname = "/ui/MainMenu/View/ModeUTM"; break;
+#ifdef VIK_CONFIG_EXPEDIA
case VIK_VIEWPORT_DRAWMODE_EXPEDIA: buttonname = "/ui/MainMenu/View/ModeExpedia"; break;
- case VIK_VIEWPORT_DRAWMODE_GOOGLE: buttonname = "/ui/MainMenu/View/ModeGoogle"; break;
+#endif
case VIK_VIEWPORT_DRAWMODE_MERCATOR: buttonname = "/ui/MainMenu/View/ModeMercator"; break;
- default: buttonname = "/ui/MainMenu/View/ModeKH";
+ default: buttonname = "/ui/MainMenu/View/ModeUTM";
}
mode_button = gtk_ui_manager_get_widget ( vw->uim, buttonname );
g_assert ( mode_button );
else if (!strcmp(gtk_action_get_name(a), "ModeExpedia")) {
drawmode = VIK_VIEWPORT_DRAWMODE_EXPEDIA;
}
- else if (!strcmp(gtk_action_get_name(a), "ModeGoogle")) {
- drawmode = VIK_VIEWPORT_DRAWMODE_GOOGLE;
- }
- else if (!strcmp(gtk_action_get_name(a), "ModeKH")) {
- drawmode = VIK_VIEWPORT_DRAWMODE_KH;
- }
else if (!strcmp(gtk_action_get_name(a), "ModeMercator")) {
drawmode = VIK_VIEWPORT_DRAWMODE_MERCATOR;
}
{ "Exit", GTK_STOCK_QUIT, N_("E_xit"), "<control>W", N_("Exit the program"), (GCallback)window_close },
{ "SaveExit", GTK_STOCK_QUIT, N_("Save and Exit"), NULL, N_("Save and Exit the program"), (GCallback)save_file_and_exit },
- { "GoogleMapsSearch", GTK_STOCK_GO_FORWARD, N_("Go To Google Maps location"), NULL, N_("Go to address/place using Google Maps search"), (GCallback)goto_address },
+ { "GoogleMapsSearch", GTK_STOCK_JUMP_TO, N_("Go To Google Maps location"), NULL, N_("Go to address/place using Google Maps search"), (GCallback)goto_address },
{ "GotoLL", GTK_STOCK_QUIT, N_("_Go to Lat\\/Lon..."), NULL, N_("Go to arbitrary lat\\/lon coordinate"), (GCallback)draw_goto_cb },
{ "GotoUTM", GTK_STOCK_QUIT, N_("Go to UTM..."), NULL, N_("Go to arbitrary UTM coordinate"), (GCallback)draw_goto_cb },
{ "SetBGColor",GTK_STOCK_SELECT_COLOR, N_("Set Background Color..."), NULL, NULL, (GCallback)set_bg_color },
static GtkRadioActionEntry mode_entries[] = {
{ "ModeUTM", NULL, N_("_UTM Mode"), "<control>u", NULL, 0 },
{ "ModeExpedia", NULL, N_("_Expedia Mode"), "<control>e", NULL, 1 },
- { "ModeGoogle", NULL, N_("_Old Google Mode"), "<control>o", NULL, 2 },
- { "ModeKH", NULL, N_("Old _KH Mode"), "<control>k", NULL, 3 },
- { "ModeMercator", NULL, N_("_Google Mode"), "<control>g", NULL, 4 }
+ { "ModeMercator", NULL, N_("_Mercator Mode"), "<control>g", NULL, 4 }
};
static GtkRadioActionEntry tool_entries[] = {