Make speed dial in blank tabs mandatory

Fixes: https://bugs.launchpad.net/midori/+bug/699961
This commit is contained in:
Christian Dywan 2011-03-23 00:26:51 +01:00
parent d31ba63447
commit 0163806daa
4 changed files with 6 additions and 14 deletions

View file

@ -99,7 +99,6 @@ struct _MidoriBrowser
gboolean show_navigationbar;
gboolean show_statusbar;
gboolean speed_dial_in_new_tabs;
guint maximum_history_age;
gchar* location_entry_search;
gchar* news_aggregator;
@ -300,7 +299,7 @@ _midori_browser_update_interface (MidoriBrowser* browser)
midori_view_get_next_page (view) != NULL);
gtk_action_set_visible (_action_by_name (browser, "AddSpeedDial"),
browser->speed_dial_in_new_tabs && !midori_view_is_blank (view));
!midori_view_is_blank (view));
/* Currently views that don't support source, don't support
saving either. If that changes, we need to think of something. */
_action_set_sensitive (browser, "SaveAs", midori_view_can_view_source (view));
@ -6172,7 +6171,6 @@ _midori_browser_update_settings (MidoriBrowser* browser)
"show-bookmarkbar", &show_bookmarkbar,
"show-panel", &show_panel,
"show-statusbar", &browser->show_statusbar,
"speed-dial-in-new-tabs", &browser->speed_dial_in_new_tabs,
"toolbar-style", &toolbar_style,
"toolbar-items", &toolbar_items,
"last-web-search", &last_web_search,
@ -6306,8 +6304,6 @@ midori_browser_settings_notify (MidoriWebSettings* web_settings,
browser->show_navigationbar = g_value_get_boolean (&value);
else if (name == g_intern_string ("show-statusbar"))
browser->show_statusbar = g_value_get_boolean (&value);
else if (name == g_intern_string ("speed-dial-in-new-tabs"))
browser->speed_dial_in_new_tabs = g_value_get_boolean (&value);
else if (name == g_intern_string ("search-engines-in-completion"))
{
if (g_value_get_boolean (&value))

View file

@ -357,8 +357,6 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
}
button = katze_property_proxy (settings, "show-crash-dialog", NULL);
INDENTED_ADD (button);
button = katze_property_proxy (settings, "speed-dial-in-new-tabs", NULL);
SPANNED_ADD (button);
FRAME_NEW (_("Transfers"));
#if !HAVE_HILDON
label = katze_property_label (settings, "download-folder");

View file

@ -89,7 +89,6 @@ struct _MidoriView
GtkWidget* thumb_view;
KatzeArray* news_feeds;
gboolean speed_dial_in_new_tabs;
gchar* download_manager;
gchar* news_aggregator;
gboolean middle_click_opens_selection;
@ -2713,7 +2712,7 @@ midori_view_populate_popup (MidoriView* view,
gtk_action_group_get_action (actions, "BookmarkAdd"));
gtk_menu_shell_append (menu_shell, menuitem);
if (view->speed_dial_in_new_tabs && !midori_view_is_blank (view)
if (!midori_view_is_blank (view)
&& strcmp ("/", sokoke_set_config_dir (NULL)))
{
menuitem = sokoke_action_create_popup_menu_item (
@ -3362,7 +3361,6 @@ _midori_view_set_settings (MidoriView* view,
g_free (view->news_aggregator);
g_object_get (view->settings,
"speed-dial-in-new-tabs", &view->speed_dial_in_new_tabs,
"download-manager", &view->download_manager,
"news-aggregator", &view->news_aggregator,
"zoom-text-and-images", &zoom_text_and_images,
@ -3420,9 +3418,7 @@ midori_view_settings_notify_cb (MidoriWebSettings* settings,
g_value_init (&value, pspec->value_type);
g_object_get_property (G_OBJECT (view->settings), name, &value);
if (name == g_intern_string ("speed-dial-in-new-tabs"))
view->speed_dial_in_new_tabs = g_value_get_boolean (&value);
else if (name == g_intern_string ("download-manager"))
if (name == g_intern_string ("download-manager"))
katze_assign (view->download_manager, g_value_dup_string (&value));
else if (name == g_intern_string ("news-aggregator"))
katze_assign (view->news_aggregator, g_value_dup_string (&value));
@ -3900,7 +3896,7 @@ midori_view_set_uri (MidoriView* view,
if (g_getenv ("MIDORI_UNARMED") == NULL)
{
if (view->speed_dial_in_new_tabs && !strcmp (uri, ""))
if (!strcmp (uri, ""))
{
#if !WEBKIT_CHECK_VERSION (1, 1, 14)
SoupServer* res_server;

View file

@ -636,6 +636,8 @@ midori_web_settings_class_init (MidoriWebSettingsClass* class)
* Show spee dial in newly opened tabs.
*
* Since: 0.1.7
*
* Deprecated: 0.3.4
*/
g_object_class_install_property (gobject_class,
PROP_SPEED_DIAL_IN_NEW_TABS,