return window;
}
+/**
+ * Set sensitivity of route menu items
+ */
+void
+route_menu_set_sensitive(gboolean s)
+{
+set_action_sensitive("route_save", s);
+set_action_sensitive("route_dist_next", s);
+set_action_sensitive("route_dist_last", s);
+set_action_sensitive("route_reset", s);
+set_action_sensitive("route_clear", s);
+}
+
/**
* Create a tree view inside given container
*/
/* Create and add widgets and supporting data. */
gtk_box_pack_start(GTK_BOX(vbox_main), GTK_WIDGET(notebook), TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(vbox_main), GTK_WIDGET(info_banner.container), FALSE, FALSE, 0);
-hildon_program_set_common_toolbar(_program, GTK_TOOLBAR(toolbar));
{
GtkMenu *hmenu;
hmenu = GTK_MENU(gtk_menu_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));
#else
_status_bar = gtk_statusbar_new();
set_action_activate("view_track", _show_tracks & TRACKS_MASK);
set_action_activate("view_route", _show_tracks & ROUTES_MASK);
+route_menu_set_sensitive(FALSE);
+
+gps_show_info(&_gps->data);
+
/* Connect signals. */
g_signal_connect(G_OBJECT(_window), "key_press_event", G_CALLBACK(window_cb_key_press), NULL);
g_signal_connect(G_OBJECT(_window), "key_release_event", G_CALLBACK(window_cb_key_release), NULL);
-/* If we have a route, calculate the next point. */
-route_find_nearest_point();
-
-gps_show_info(&_gps->data);
-
gtk_idle_add((GSourceFunc)window_present, NULL);
}