From: Kaj-Michael Lang Date: Thu, 2 Aug 2007 09:46:06 +0000 (+0300) Subject: Misc fixes. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd59a1cbf6bb5f1623a2c3423cb181ae6be47e7a;p=mapper Misc fixes. --- diff --git a/src/settings-gui.c b/src/settings-gui.c index 77bfdeb..dee904a 100644 --- a/src/settings-gui.c +++ b/src/settings-gui.c @@ -109,7 +109,8 @@ settings_dialog_hardkeys_reset(GtkWidget * widget, KeysDialogInfo * cdi) return TRUE; } -gboolean settings_dialog_hardkeys(GtkWidget * widget, GtkWidget * parent) +gboolean +settings_dialog_hardkeys(GtkWidget * widget, GtkWidget * parent) { gint i; GtkWidget *dialog; @@ -208,7 +209,7 @@ struct _ColorsDialogInfo { GtkWidget *col[COLORABLE_ENUM_COUNT]; }; -gboolean +static gboolean settings_dialog_colors_reset(GtkWidget * widget, ColorsDialogInfo * cdi) { GtkWidget *confirm; @@ -232,7 +233,8 @@ settings_dialog_colors_reset(GtkWidget * widget, ColorsDialogInfo * cdi) return TRUE; } -gboolean settings_dialog_colors(GtkWidget * widget, GtkWidget * parent) +static gboolean +settings_dialog_colors(GtkWidget * widget, GtkWidget * parent) { GtkWidget *dialog; GtkWidget *table; @@ -394,7 +396,8 @@ gboolean settings_dialog_colors(GtkWidget * widget, GtkWidget * parent) * Bring up the Settings dialog. Return TRUE if and only if the recever * information has changed (MAC or channel). */ -gboolean settings_dialog() +gboolean +settings_dialog(void) { GtkWidget *dialog; GtkWidget *notebook; @@ -867,7 +870,7 @@ gboolean settings_dialog() } #ifndef WITH_HILDON - /* Destroying causes a crash (!?!?!??!) huh? in hildon only, plain gtk is ok so...*/ + /* Destroying causes a crash (!?!?!??!) huh? in hildon (770?) only, plain gtk is ok...*/ gtk_widget_destroy(dialog); #else gtk_widget_hide(dialog); diff --git a/src/ui-common.c b/src/ui-common.c index 0961077..8ed9f7f 100644 --- a/src/ui-common.c +++ b/src/ui-common.c @@ -55,6 +55,8 @@ #include "ui-common.h" #include "db.h" +#include "settings-gui.h" + /* Callbacks */ #include "cb.h" @@ -730,53 +732,53 @@ static void menu_init() static void toolbar_init(void) { -GtkWidget *item; +GtkToolItem *item; item = gtk_tool_button_new_from_stock (GTK_STOCK_HOME); -gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1); g_signal_connect (item, "clicked", G_CALLBACK (menu_cb_goto_home), NULL); +gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1); item = gtk_tool_button_new_from_stock (GTK_STOCK_JUMP_TO); -gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1); g_signal_connect (item, "clicked", G_CALLBACK (menu_cb_goto_gps), NULL); +gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1); item = gtk_tool_button_new_from_stock (GTK_STOCK_GO_FORWARD); -gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1); g_signal_connect (item, "clicked", G_CALLBACK (menu_cb_goto_nextway), NULL); +gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1); item = gtk_separator_tool_item_new(); gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1); item = gtk_tool_button_new_from_stock (GTK_STOCK_ADD); -gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1); g_signal_connect (item, "clicked", G_CALLBACK (cb_add_poi), NULL); +gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1); item = gtk_separator_tool_item_new(); gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1); item = gtk_tool_button_new_from_stock (GTK_STOCK_ZOOM_IN); -gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1); g_signal_connect (item, "clicked", G_CALLBACK (cb_zoomin), NULL); +gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1); item = gtk_tool_button_new_from_stock (GTK_STOCK_ZOOM_OUT); -gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1); g_signal_connect (item, "clicked", G_CALLBACK (cb_zoomout), NULL); +gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1); item = gtk_tool_button_new_from_stock (GTK_STOCK_ZOOM_100); -gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1); g_signal_connect (item, "clicked", G_CALLBACK (cb_zoom_base), NULL); +gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1); item = gtk_tool_button_new_from_stock (GTK_STOCK_ZOOM_FIT); -gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1); g_signal_connect (item, "clicked", G_CALLBACK (cb_zoom_autozoom), NULL); +gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1); item = gtk_separator_tool_item_new(); gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1); #ifndef WITH_HILDON _toolbar_fullscreen_item = gtk_toggle_tool_button_new_from_stock (GTK_STOCK_FULLSCREEN); -gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), _toolbar_fullscreen_item, -1); g_signal_connect (_toolbar_fullscreen_item, "clicked", G_CALLBACK (cb_fullscreen_click), NULL); +gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), _toolbar_fullscreen_item, -1); #endif item = gtk_separator_tool_item_new(); diff --git a/src/ui-common.h b/src/ui-common.h index e5822fd..5236461 100644 --- a/src/ui-common.h +++ b/src/ui-common.h @@ -129,7 +129,7 @@ GtkWidget *_menu_show_poi_item; GtkWidget *_menu_poi_item; /* Toolbar items */ -GtkWidget *_toolbar_fullscreen_item; +GtkToolItem *_toolbar_fullscreen_item; GtkWidget *_progress_item; /* Menu items for the "Auto-Center" submenu. */