From: Kaj-Michael Lang Date: Thu, 31 Jul 2008 14:14:32 +0000 (+0300) Subject: Set map widget repo. Small cleansups. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65855bf37e2fe4bfbdad8267d3010a90bd1429c2;p=mapper Set map widget repo. Small cleansups. --- diff --git a/src/ui-common.c b/src/ui-common.c index 32c9e73..0f5c096 100644 --- a/src/ui-common.c +++ b/src/ui-common.c @@ -557,10 +557,10 @@ set_action_sensitive("route_clear", s); } /** - * Create a tree view inside given container + * Create a Path tree view inside given container */ static GtkWidget * -mapper_tree_view_new(GtkWidget *container) +path_tree_view_new(GtkWidget *container) { GtkWidget *tree_view, *sw; GtkTreeViewColumn *column; @@ -586,6 +586,10 @@ renderer=gtk_cell_renderer_text_new(); column=gtk_tree_view_column_new_with_attributes(_("Waypoint"), renderer, "text", PATH_WAYPOINT, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(tree_view), column); +#if 0 +g_signal_connect(G_OBJECT(tree_view), "row-activated", G_CALLBACK(xxxx), NULL); +#endif + return tree_view; } @@ -697,6 +701,8 @@ gtk_paned_add2(GTK_PANED(hbox), _map); #ifndef WITH_DEVICE_770 gtk_map_set_cache_size(_map, 256); +#else +gtk_map_set_cache_size(_map, 64); #endif gtk_action_group_add_actions(actions, ui_entries, n_ui_entries, NULL); @@ -708,45 +714,34 @@ gtk_ui_manager_insert_action_group(ui, actions, 0); g_object_unref(actions); /* GPS Tab */ -vbox = gtk_vbox_new(FALSE, 0); -label = gtk_label_new("Gps"); +vbox=gtk_vbox_new(FALSE, 0); _gps_sat_view = gtk_gps_new(GTK_GPS_MODE_SKY, &_gps->data); gtk_box_pack_start(GTK_BOX(vbox), _gps_sat_view, TRUE, TRUE, 0); _gps_sat_view = gtk_gps_new(GTK_GPS_MODE_SIGNAL, &_gps->data); gtk_box_pack_start(GTK_BOX(vbox), _gps_sat_view, TRUE, TRUE, 0); -ui_notebook.gps=gtk_notebook_append_page(notebook, vbox, label); +ui_notebook.gps=gtk_notebook_append_page(notebook, vbox, gtk_label_new("GPS")); /* Heading Tab */ -vbox = gtk_vbox_new(FALSE, 0); -label = gtk_label_new("Heading"); -_tab_compass = gtk_compass_new(&_gps->data); +vbox=gtk_vbox_new(FALSE, 0); +_tab_compass=gtk_compass_new(&_gps->data); gtk_box_pack_start(GTK_BOX(vbox), _tab_compass, TRUE, TRUE, 0); -ui_notebook.heading=gtk_notebook_append_page(notebook, vbox, label); +ui_notebook.heading=gtk_notebook_append_page(notebook, vbox, gtk_label_new("Heading")); /* Track Tab */ vbox=gtk_vbox_new(FALSE, 0); -label=gtk_label_new("Track"); -track_tree_view=mapper_tree_view_new(vbox); -#if 0 -g_signal_connect(G_OBJECT(track_tree_view), "row-activated", G_CALLBACK(track_waypoint_activated_cb), NULL); -#endif -ui_notebook.track=gtk_notebook_append_page(notebook, vbox, label); +track_tree_view=path_tree_view_new(vbox); +ui_notebook.track=gtk_notebook_append_page(notebook, vbox, gtk_label_new("Track")); /* Route Tab */ vbox=gtk_vbox_new(FALSE, 0); -label=gtk_label_new("Route"); -route_tree_view=mapper_tree_view_new(vbox); -#if 0 -g_signal_connect(G_OBJECT(route_tree_view), "row-activated", G_CALLBACK(route_waypoint_activated_cb), NULL); -#endif -ui_notebook.route=gtk_notebook_append_page(notebook, vbox, label); +route_tree_view=path_tree_view_new(vbox); +ui_notebook.route=gtk_notebook_append_page(notebook, vbox, gtk_label_new("Route")); /* Quick POI Tab */ -label=gtk_label_new("Quick POI"); tqp.fixed=FALSE; tqp.close=FALSE; vbox=poi_quick_button_box(&tqp); -ui_notebook.qpoi=gtk_notebook_append_page(notebook, vbox, label); +ui_notebook.qpoi=gtk_notebook_append_page(notebook, vbox, gtk_label_new("QPOI")); #ifdef WITH_GST { @@ -757,6 +752,8 @@ ui_notebook.audio=gtk_notebook_append_page(notebook, an_ui->vbox, label); } #endif +gtk_map_set_tile_repository(_map, _curr_repo); + menu_maps_add_repos(); menu_init_cmenu();