diff --git a/src/midori-browser.c b/src/midori-browser.c index 77ddae78..cd1a2227 100644 --- a/src/midori-browser.c +++ b/src/midori-browser.c @@ -43,6 +43,7 @@ struct _MidoriBrowserPrivate GtkWidget* throbber; GtkWidget* navigationbar; GtkWidget* button_tab_new; + GtkWidget* button_homepage; GtkWidget* location_icon; GtkWidget* location; GtkWidget* search; @@ -1199,8 +1200,8 @@ _action_forward_activate (GtkAction* action, } static void -_action_home_activate (GtkAction* action, - MidoriBrowser* browser) +_action_homepage_activate (GtkAction* action, + MidoriBrowser* browser) { MidoriBrowserPrivate* priv = browser->priv; @@ -2102,9 +2103,6 @@ static const GtkActionEntry entries[] = { { "SelectAll", GTK_STOCK_SELECT_ALL, NULL, "a", N_("Select all text"), G_CALLBACK (_action_select_all_activate) }, - { "FormFill", STOCK_FORM_FILL, - NULL, "", - "hm?", NULL/*G_CALLBACK (_action_form_fill_activate)*/ }, { "Find", GTK_STOCK_FIND, NULL, "f", "hm?", G_CALLBACK (_action_find_activate) }, @@ -2158,9 +2156,9 @@ static const GtkActionEntry entries[] = { { "Forward", GTK_STOCK_GO_FORWARD, NULL, "Right", "hm?", G_CALLBACK (_action_forward_activate) }, - { "Home", STOCK_HOMEPAGE, + { "Homepage", STOCK_HOMEPAGE, NULL, "Home", - "hm?", G_CALLBACK (_action_home_activate) }, + "hm?", G_CALLBACK (_action_homepage_activate) }, { "Location", GTK_STOCK_JUMP_TO, N_("Location..."), "l", "hm?", G_CALLBACK (_action_location_activate) }, @@ -2365,7 +2363,7 @@ static const gchar* ui_markup = "" "" "" - "" + "" "" "" "" @@ -2379,8 +2377,6 @@ static const gchar* ui_markup = "" "" "" - "" - "" "" "" "" @@ -2409,8 +2405,7 @@ static const gchar* ui_markup = "" "" "" - "" - "" + "" "" "" "" @@ -2539,6 +2534,8 @@ midori_browser_init (MidoriBrowser* browser) priv->button_tab_new = gtk_ui_manager_get_widget ( ui_manager, "/toolbar_navigation/TabNew"); g_object_set (_action_by_name (browser, "Back"), "is-important", TRUE, NULL); + priv->button_homepage = gtk_ui_manager_get_widget ( + ui_manager, "/toolbar_navigation/Homepage"); // Location priv->location = sexy_icon_entry_new(); @@ -2912,7 +2909,8 @@ _midori_browser_update_settings (MidoriBrowser* browser) gint last_window_width, last_window_height; gint last_panel_position, last_panel_page; gboolean show_navigationbar, show_bookmarkbar, show_panel, show_statusbar; - gboolean small_toolbar, show_new_tab, show_web_search, show_trash; + gboolean small_toolbar, show_new_tab, show_homepage, + show_web_search, show_trash; MidoriToolbarStyle toolbar_style; gint last_web_search; gchar* last_pageholder_uri; @@ -2928,6 +2926,7 @@ _midori_browser_update_settings (MidoriBrowser* browser) "show-statusbar", &show_statusbar, "small-toolbar", &small_toolbar, "show-new-tab", &show_new_tab, + "show-homepage", &show_homepage, "show-web-search", &show_web_search, "show-trash", &show_trash, "toolbar-style", &toolbar_style, @@ -2967,6 +2966,7 @@ _midori_browser_update_settings (MidoriBrowser* browser) _action_set_active (browser, "Statusbar", show_statusbar); sokoke_widget_set_visible (priv->button_tab_new, show_new_tab); + sokoke_widget_set_visible (priv->button_homepage, show_homepage); sokoke_widget_set_visible (priv->search, show_web_search); sokoke_widget_set_visible (priv->button_trash, show_trash); @@ -2995,6 +2995,9 @@ midori_browser_settings_notify (MidoriWebSettings* web_settings, else if (name == g_intern_string ("show-new-tab")) sokoke_widget_set_visible (priv->button_tab_new, g_value_get_boolean (&value)); + else if (name == g_intern_string ("show-homepage")) + sokoke_widget_set_visible (priv->button_homepage, + g_value_get_boolean (&value)); else if (name == g_intern_string ("show-web-search")) sokoke_widget_set_visible (priv->search, g_value_get_boolean (&value)); diff --git a/src/midori-preferences.c b/src/midori-preferences.c index 16d15c2e..6a4c7d73 100644 --- a/src/midori-preferences.c +++ b/src/midori-preferences.c @@ -319,11 +319,11 @@ midori_preferences_set_settings (MidoriPreferences* preferences, INDENTED_ADD (katze_property_label (settings, "toolbar-style"), 0, 1, 0, 1); button = katze_property_proxy (settings, "toolbar-style", NULL); FILLED_ADD(button, 1, 2, 0, 1); - button = katze_property_proxy (settings, "small-toolbar", NULL); + button = katze_property_proxy (settings, "show-new-tab", NULL); INDENTED_ADD (button, 0, 1, 1, 2); button = katze_property_proxy (settings, "show-web-search", NULL); SPANNED_ADD (button, 1, 2, 1, 2); - button = katze_property_proxy (settings, "show-new-tab", NULL); + button = katze_property_proxy (settings, "show-homepage", NULL); INDENTED_ADD (button, 0, 1, 2, 3); button = katze_property_proxy (settings, "show-trash", NULL); SPANNED_ADD (button, 1, 2, 2, 3); diff --git a/src/midori-websettings.c b/src/midori-websettings.c index 90a8cc02..4304bb89 100644 --- a/src/midori-websettings.c +++ b/src/midori-websettings.c @@ -35,8 +35,9 @@ struct _MidoriWebSettingsPrivate MidoriToolbarStyle toolbar_style; gboolean small_toolbar; - gboolean show_web_search; gboolean show_new_tab; + gboolean show_homepage; + gboolean show_web_search; gboolean show_trash; MidoriStartup load_on_startup; @@ -90,6 +91,7 @@ enum PROP_TOOLBAR_STYLE, PROP_SMALL_TOOLBAR, PROP_SHOW_NEW_TAB, + PROP_SHOW_HOMEPAGE, PROP_SHOW_WEB_SEARCH, PROP_SHOW_TRASH, @@ -370,6 +372,15 @@ midori_web_settings_class_init (MidoriWebSettingsClass* class) TRUE, flags)); + g_object_class_install_property (gobject_class, + PROP_SHOW_HOMEPAGE, + g_param_spec_boolean ( + "show-homepage", + _("Show Homepage"), + _("Show the Homepage button in the toolbar"), + TRUE, + flags)); + g_object_class_install_property (gobject_class, PROP_SHOW_WEB_SEARCH, g_param_spec_boolean ( @@ -688,6 +699,9 @@ midori_web_settings_set_property (GObject* object, case PROP_SHOW_NEW_TAB: priv->show_new_tab = g_value_get_boolean (value); break; + case PROP_SHOW_HOMEPAGE: + priv->show_homepage = g_value_get_boolean (value); + break; case PROP_SHOW_WEB_SEARCH: priv->show_web_search = g_value_get_boolean (value); break; @@ -844,6 +858,9 @@ midori_web_settings_get_property (GObject* object, case PROP_SHOW_NEW_TAB: g_value_set_boolean (value, priv->show_new_tab); break; + case PROP_SHOW_HOMEPAGE: + g_value_set_boolean (value, priv->show_homepage); + break; case PROP_SHOW_WEB_SEARCH: g_value_set_boolean (value, priv->show_web_search); break;