}
map_repos_action_group=gtk_action_group_new("map_repos_actions");
+g_assert(map_repos_action_group);
gtk_ui_manager_insert_action_group(ui, map_repos_action_group, 0);
gtk_ui_manager_ensure_update(ui);
item=gtk_tool_item_new();
_progress_item=gtk_progress_bar_new();
gtk_container_add(item, _progress_item);
-gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
+gtk_toolbar_insert(GTK_TOOLBAR (toolbar), item, -1);
}
void
gtk_container_set_border_width (GTK_CONTAINER (_window), 0);
actions = gtk_action_group_new ("Actions");
+g_assert(actions);
+
ui = gtk_ui_manager_new ();
+g_assert(ui);
gtk_action_group_add_actions (actions, ui_entries, n_ui_entries, NULL);
gtk_action_group_add_toggle_actions (actions, ui_toggle_entries, n_ui_toggle_entries, NULL);
if (!gtk_ui_manager_add_ui_from_string (ui, mapper_ui, -1, &error)) {
g_message ("building menus failed: %s", error->message);
- g_error_free (error);
+ g_error_free(error);
+ g_assert(FALSE);
}
/* Menu and Toolbar */
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_progress_init();
/* Notebook with different views */
/* Create and add widgets and supporting data. */
gtk_container_add(GTK_CONTAINER(_window), notebook);
hildon_program_set_common_toolbar(_program, toolbar);
+{
+ GtkMenu *hmenu;
+ hmenu = GTK_MENU(gtk_menu_new());
-gtk_widget_show_all(notebook);
-gtk_widget_show_all(toolbar);
+ gtk_container_foreach(GTK_CONTAINER(menu_bar),
+ (GtkCallback) gtk_widget_reparent, hmenu);
+
+ hildon_window_set_menu(HILDON_WINDOW(_window), menu);
+}
+gtk_widget_show_all(GTK_WIDGET(notebook));
+gtk_widget_show_all(GTK_WIDGET(toolbar));
#else
vbox_main = gtk_vbox_new(FALSE, 0);
gtk_container_add(GTK_CONTAINER(_window), vbox_main);
_status_bar = gtk_statusbar_new();
gtk_box_pack_start(GTK_BOX(vbox_main), _status_bar, FALSE, FALSE, 0);
-gtk_widget_show_all(vbox_main);
+gtk_widget_show_all(GTK_WIDGET(vbox_main));
#endif
label = gtk_label_new("Map");
gtk_box_pack_start(GTK_BOX(info_banner.container), info_banner.location, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(info_banner.container), info_banner.distance, FALSE, FALSE, 0);
-gtk_widget_hide(_progress_item);
+gtk_widget_hide(GTK_WIDGET(_progress_item));
mapvbox = gtk_vbox_new(FALSE, 0);
gtk_box_pack_start(GTK_BOX(mapvbox), info_banner.container, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(mapvbox), hbox, TRUE, TRUE, 0);
gtk_notebook_append_page(GTK_WIDGET(notebook), mapvbox, label);
-gtk_widget_show_all(mapvbox);
+gtk_widget_show_all(GTK_WIDGET(mapvbox));
_gps_widget = gps_info_panel();
gtk_widget_set_size_request(GTK_WIDGET(_gps_widget), 180, 0);
-gtk_paned_add1(GTK_BOX(hbox), _gps_widget);
+gtk_paned_add1(GTK_PANED(hbox), _gps_widget);
_map_widget = gtk_drawing_area_new();
-gtk_paned_add2(GTK_BOX(hbox), _map_widget);
+gtk_paned_add2(GTK_PANED(hbox), _map_widget);
gps_show_info();
map_poi_init(_map_widget);