static GtkActionGroup *map_repos_action_group;
static GtkUIManager *ui;
+struct ui_notebook_struct {
+ GtkWidget *notebook;
+ gint map;
+ gint gps;
+ gint heading;
+};
+struct ui_notebook_struct ui_notebook;
+
/* A GPS icon would be nice.. anyone ? */
#ifndef GTK_STOCK_INFO
mapvbox = gtk_vbox_new(FALSE, 0);
gtk_box_pack_start(GTK_BOX(mapvbox), hbox, TRUE, TRUE, 0);
-gtk_notebook_append_page(notebook, mapvbox, label);
+ui_notebook.map=gtk_notebook_append_page(notebook, mapvbox, label);
gtk_widget_show_all(GTK_WIDGET(mapvbox));
/* GPS Tab */
label = gtk_label_new("Gps");
_gps_sat_view = gtk_gps_new(GTK_GPS_MODE_SKY, &_gps);
gtk_box_pack_start(GTK_BOX(gpsvbox), _gps_sat_view, TRUE, TRUE, 0);
-gtk_notebook_append_page(notebook, gpsvbox, label);
+ui_notebook.gps=gtk_notebook_append_page(notebook, gpsvbox, label);
gtk_widget_show_all(GTK_WIDGET(gpsvbox));
/* Heading */
label = gtk_label_new("Heading");
_tab_compass = gtk_compass_new(&_gps);
gtk_box_pack_start(GTK_BOX(headingvbox), _tab_compass, TRUE, TRUE, 0);
-gtk_notebook_append_page(notebook, headingvbox, label);
+ui_notebook.heading=gtk_notebook_append_page(notebook, headingvbox, label);
gtk_widget_show_all(GTK_WIDGET(headingvbox));
_gps_widget = gps_info_panel();
gtk_paned_add2(GTK_PANED(hbox), _map_widget);
gps_show_info();
-map_poi_init(_map_widget);
gtk_widget_realize(_map_widget);
+map_poi_init(_map_widget);
menu_maps_add_repos();
_speed_limit_context = gtk_widget_get_pango_context(_map_widget);
_speed_limit_layout = pango_layout_new(_speed_limit_context);
_speed_limit_fontdesc = pango_font_description_new();
-pango_font_description_set_size(_speed_limit_fontdesc,64 * PANGO_SCALE);
+pango_font_description_set_size(_speed_limit_fontdesc, 64 * PANGO_SCALE);
pango_layout_set_font_description(_speed_limit_layout, _speed_limit_fontdesc);
pango_layout_set_alignment(_speed_limit_layout, PANGO_ALIGN_CENTER);