}
}
+static gint
+midori_browser_notify_new_tab_timeout_cb (MidoriBrowser *browser)
+{
+ gtk_window_set_opacity (GTK_WINDOW (browser), 1);
+ return 0;
+}
+
+static void
+midori_browser_notify_new_tab (MidoriBrowser *browser)
+{
+ if (katze_object_get_boolean (browser->settings, "flash-window-on-new-bg-tabs"))
+ {
+ gtk_window_set_opacity (GTK_WINDOW (browser), 0.8);
+ gtk_timeout_add (100, (GtkFunction) midori_browser_notify_new_tab_timeout_cb, browser);
+ }
+}
+
static void
midori_view_new_tab_cb (GtkWidget* view,
const gchar* uri,
if (!background)
midori_browser_set_current_page (browser, n);
+ else
+ midori_browser_notify_new_tab (browser);
}
static void
gint n = midori_browser_add_tab (browser, new_view);
if (where != MIDORI_NEW_VIEW_BACKGROUND)
midori_browser_set_current_page (browser, n);
+ else
+ midori_browser_notify_new_tab (browser);
}
if (!user_initiated)
else
button = katze_property_proxy (settings, "middle-click-opens-selection", NULL);
INDENTED_ADD (button);
+ button = katze_property_proxy (settings, "flash-window-on-new-bg-tabs", NULL);
+ SPANNED_ADD (button);
FRAME_NEW (NULL);
button = katze_property_label (settings, "preferred-languages");
INDENTED_ADD (button);
gboolean enable_dns_prefetching;
#endif
gboolean strip_referer;
+ gboolean flash_window_on_bg_tabs;
};
struct _MidoriWebSettingsClass
PROP_OPEN_TABS_IN_THE_BACKGROUND,
PROP_OPEN_TABS_NEXT_TO_CURRENT,
PROP_OPEN_POPUPS_IN_TABS,
+ PROP_FLASH_WINDOW_ON_BG_TABS,
PROP_AUTO_LOAD_IMAGES,
PROP_ENABLE_SCRIPTS,
PROP_CLEAR_PRIVATE_DATA,
PROP_CLEAR_DATA,
PROP_ENABLE_DNS_PREFETCHING,
- PROP_STRIP_REFERER
+ PROP_STRIP_REFERER,
};
GType
TRUE,
flags));
#endif
+ g_object_class_install_property (gobject_class,
+ PROP_OPEN_TABS_IN_THE_BACKGROUND,
+ g_param_spec_boolean (
+ "flash-window-on-new-bg-tabs",
+ _("Flash window on background tabs"),
+ _("Flash the browser window if a new tab was opened in the background"),
+ FALSE,
+ flags));
/**
* MidoriWebSettings:zoom-text-and-images:
case PROP_STRIP_REFERER:
web_settings->strip_referer = g_value_get_boolean (value);
break;
+ case PROP_FLASH_WINDOW_ON_BG_TABS:
+ web_settings->flash_window_on_bg_tabs = g_value_get_boolean (value);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
case PROP_STRIP_REFERER:
g_value_set_boolean (value, web_settings->strip_referer);
break;
+ case PROP_FLASH_WINDOW_ON_BG_TABS:
+ g_value_set_boolean (value, web_settings->flash_window_on_bg_tabs);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;