From 050ee429a7cbf0cca631d97a3639189615e18534 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Sat, 21 Jul 2007 20:54:18 +0300 Subject: [PATCH] Add info_banner label for showing position information --- src/ui-common.c | 19 ++++++++++++++----- src/ui-common.h | 1 + 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/ui-common.c b/src/ui-common.c index 0b0685d..a7ef973 100644 --- a/src/ui-common.c +++ b/src/ui-common.c @@ -759,10 +759,13 @@ item = gtk_separator_tool_item_new(); gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1); #ifndef WITH_HILDON +/* Add a progress bar to our toolbar if we are using plain gtk */ 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); +#else +/* Hildon uses progress information box */ #endif } @@ -771,7 +774,7 @@ gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1); */ void mapper_init(gint argc, gchar ** argv) { - GtkWidget *hbox, *label, *vbox, *vbox_main; + GtkWidget *hbox, *mapvbox, *label, *vbox, *vbox_main; GtkWidget *notebook; GdkColor color; printf("%s()\n", __PRETTY_FUNCTION__); @@ -914,10 +917,13 @@ void mapper_init(gint argc, gchar ** argv) gtk_notebook_set_show_tabs(notebook, TRUE); label = gtk_label_new("Map"); + hbox = gtk_hpaned_new(); + _info_banner = gtk_label_new(""); + + mapvbox = gtk_vbox_new(FALSE, 0); + #ifdef WITH_HILDON /* Create and add widgets and supporting data. */ - hbox = gtk_hpaned_new(); - gtk_notebook_append_page(notebook, hbox, label); gtk_container_add(GTK_CONTAINER(_window), notebook); hildon_program_set_common_toolbar(_program, _toolbar); #else @@ -928,8 +934,6 @@ void mapper_init(gint argc, gchar ** argv) gtk_box_pack_start(GTK_BOX(vbox_main), _menu_bar, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox_main), _toolbar, FALSE, FALSE, 0); - hbox = gtk_hpaned_new(); - gtk_notebook_append_page(GTK_WIDGET(notebook), hbox, label); gtk_box_pack_start(GTK_BOX(vbox_main), notebook, TRUE, TRUE, 0); _status_bar = gtk_statusbar_new(); @@ -938,6 +942,11 @@ void mapper_init(gint argc, gchar ** argv) gtk_widget_show_all(vbox_main); #endif + gtk_box_pack_start(GTK_BOX(mapvbox), _info_banner, 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); + vbox = gtk_vbox_new(FALSE, 0); _gps_widget = gtk_frame_new("GPS Info"); gtk_container_add(GTK_CONTAINER(_gps_widget), vbox); diff --git a/src/ui-common.h b/src/ui-common.h index 9519773..e5822fd 100644 --- a/src/ui-common.h +++ b/src/ui-common.h @@ -193,6 +193,7 @@ GtkWidget *_fix_banner; GtkWidget *_download_banner; GtkWidget *_status_bar; +GtkWidget *_info_banner; GtkMenu *_menu_map; -- 2.39.5