From 4554d0f5fc835caa6fbbdaea991804c50057e1de Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Wed, 3 Oct 2007 01:24:25 +0300 Subject: [PATCH] Add a Heading tab --- src/ui-common.c | 11 ++++++++++- src/ui-common.h | 7 +++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/ui-common.c b/src/ui-common.c index e551fde..af5714c 100644 --- a/src/ui-common.c +++ b/src/ui-common.c @@ -632,7 +632,7 @@ void mapper_ui_init(void) { GtkWidget *hbox, *mapvbox, *label, *vbox_main; -GtkWidget *gpsvbox; +GtkWidget *gpsvbox, *headingvbox; GtkNotebook *notebook; GdkColor color; GError *error = NULL; @@ -741,6 +741,7 @@ gtk_box_pack_start(GTK_BOX(mapvbox), hbox, TRUE, TRUE, 0); gtk_notebook_append_page(notebook, mapvbox, label); gtk_widget_show_all(GTK_WIDGET(mapvbox)); +/* GPS Tab */ gpsvbox = gtk_vbox_new(FALSE, 0); label = gtk_label_new("Gps"); _gps_sat_view = gtk_gps_new(GTK_GPS_MODE_SKY, &_gps); @@ -748,6 +749,14 @@ gtk_box_pack_start(GTK_BOX(gpsvbox), _gps_sat_view, TRUE, TRUE, 0); gtk_notebook_append_page(notebook, gpsvbox, label); gtk_widget_show_all(GTK_WIDGET(gpsvbox)); +/* Heading */ +headingvbox = gtk_vbox_new(FALSE, 0); +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); +gtk_widget_show_all(GTK_WIDGET(headingvbox)); + _gps_widget = gps_info_panel(); gtk_widget_set_size_request(GTK_WIDGET(_gps_widget), 180, 0); gtk_paned_add1(GTK_PANED(hbox), _gps_widget); diff --git a/src/ui-common.h b/src/ui-common.h index 1c21d53..865cdeb 100644 --- a/src/ui-common.h +++ b/src/ui-common.h @@ -40,10 +40,13 @@ GdkPixmap *_map_pixmap; GtkWidget *_gps_widget; -/* GPS Panel View widget */ +/* GPS Tab widget */ GtkWidget *_gps_sat_view; -/* Compass panel widget */ +/* Heading Tab widget */ +GtkWidget *_tab_compass; + +/* Panel widgets */ GtkWidget *_gps_compass; GtkWidget *_gps_signal; -- 2.39.5