katze_assign (blockscript, adblock_build_js (blockcss->str, blockcssprivate->str));
}
-static void
-adblock_browser_populate_tool_menu_cb (MidoriBrowser* browser,
- GtkWidget* menu,
- MidoriExtension* extension);
static void
adblock_preferences_render_tick_cb (GtkTreeViewColumn* column,
GtkCellRenderer* renderer,
}
static void
-adblock_menu_configure_filters_activate_cb (GtkWidget* menuitem,
- MidoriExtension* extension)
+adblock_open_preferences_cb (MidoriExtension* extension)
{
static GtkWidget* dialog = NULL;
gtk_window_present (GTK_WINDOW (dialog));
}
-static void
-adblock_browser_populate_tool_menu_cb (MidoriBrowser* browser,
- GtkWidget* menu,
- MidoriExtension* extension)
-{
- GtkWidget* menuitem;
-
- menuitem = gtk_menu_item_new_with_mnemonic (_("Configure _Advertisement filters..."));
- g_signal_connect (menuitem, "activate",
- G_CALLBACK (adblock_menu_configure_filters_activate_cb), extension);
- gtk_widget_show (menuitem);
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
-}
-
static inline gboolean
adblock_check_filter_options (GRegex* regex,
const gchar* opts,
(GtkCallback)adblock_add_tab_foreach_cb, extension);
g_signal_connect (browser, "add-tab",
G_CALLBACK (adblock_add_tab_cb), extension);
- g_signal_connect (browser, "populate-tool-menu",
- G_CALLBACK (adblock_browser_populate_tool_menu_cb), extension);
+ g_signal_connect (extension, "open-preferences",
+ G_CALLBACK (adblock_open_preferences_cb), extension);
g_signal_connect (extension, "deactivate",
G_CALLBACK (adblock_deactivate_cb), browser);
g_object_unref (statusbar);
MidoriApp* app = midori_extension_get_app (extension);
g_signal_handlers_disconnect_by_func (
- browser, adblock_browser_populate_tool_menu_cb, extension);
+ browser, adblock_open_preferences_cb, extension);
g_signal_handlers_disconnect_by_func (
extension, adblock_deactivate_cb, browser);
g_signal_handlers_disconnect_by_func (