#define WINDOW_SIZE_Y 480
static GtkWidget *menu_bar;
-static GtkWidget *toolbar;
GtkWidget *_fix_banner=NULL;
static GtkActionGroup *actions;
" <separator/>"
" <menuitem action='view_fullscreen'/>"
" <separator/>"
+" <menuitem action='view_toolbar'/>"
+" <separator/>"
" <menu action='view_items'>"
" <menuitem action='view_scale'/>"
" <menuitem action='view_route'/>"
#else
{"view_fullscreen", NULL, N_("Fullscreen"), "F11", NULL, G_CALLBACK(cb_fullscreen), FALSE},
#endif
+ {"view_toolbar", NULL, N_("Toolbar"), NULL, NULL, G_CALLBACK(menu_cb_view_toolbar), FALSE},
{"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},
menu_bar = gtk_ui_manager_get_widget (ui, "/MenuBar");
g_assert(menu_bar);
-toolbar = gtk_ui_manager_get_widget (ui, "/ToolBar");
-g_assert(toolbar);
+_toolbar = gtk_ui_manager_get_widget (ui, "/ToolBar");
+g_assert(_toolbar);
/* Toolbar progress item */
item=gtk_tool_item_new();
gtk_progress_bar_set_ellipsize(_progress_item, PANGO_ELLIPSIZE_END);
gtk_progress_bar_set_pulse_step(_progress_item, 0.2);
gtk_container_add(item, _progress_item);
-gtk_toolbar_insert(GTK_TOOLBAR(toolbar), item, -1);
+gtk_toolbar_insert(GTK_TOOLBAR(_toolbar), item, -1);
/* Notebook with different views */
notebook = gtk_notebook_new();
gtk_container_foreach(GTK_CONTAINER(menu_bar), (GtkCallback)gtk_widget_reparent, hmenu);
hildon_window_set_menu(HILDON_WINDOW(_window), hmenu);
}
-hildon_window_add_toolbar(_window, GTK_TOOLBAR(toolbar));
-gtk_widget_show_all(GTK_WIDGET(toolbar));
+hildon_window_add_toolbar(_window, GTK_TOOLBAR(_toolbar));
+gtk_widget_show_all(GTK_WIDGET(_toolbar));
#else
_status_bar = gtk_statusbar_new();
gtk_box_pack_start(GTK_BOX(vbox_main), menu_bar, FALSE, FALSE, 0);
-gtk_box_pack_start(GTK_BOX(vbox_main), toolbar, FALSE, FALSE, 0);
+gtk_box_pack_start(GTK_BOX(vbox_main), _toolbar, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(vbox_main), notebook, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(vbox_main), info_banner.container, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(vbox_main), _status_bar, FALSE, FALSE, 0);
set_action_activate("gps_information", _gps_info);
+set_action_activate("view_toolbar", TRUE);
+
set_action_activate("view_scale", _show_scale);
set_action_activate("view_vector", _show_velvec);
set_action_activate("view_poi", _show_poi);