From 8ff4ff5909515e27f8cce235ad26fea69426d8ca Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Wed, 25 Mar 2009 02:12:12 +0100 Subject: [PATCH] Use the new midori_extension_get_app in extensions --- extensions/page-holder.c | 11 +++++++++++ extensions/statusbar-features.c | 9 +++++++++ 2 files changed, 20 insertions(+) diff --git a/extensions/page-holder.c b/extensions/page-holder.c index 7d3032bd..9ceb1963 100644 --- a/extensions/page-holder.c +++ b/extensions/page-holder.c @@ -13,6 +13,11 @@ #define STOCK_PAGE_HOLDER "page-holder" +static void +page_holder_app_add_browser_cb (MidoriApp* app, + MidoriBrowser* browser, + MidoriExtension* extension); + static gint page_holder_notebook_append_view (GtkWidget* notebook) { @@ -68,7 +73,13 @@ static void page_holder_deactivate_cb (MidoriExtension* extension, GtkWidget* notebook) { + MidoriApp* app = midori_extension_get_app (extension); + gtk_widget_destroy (notebook); + g_signal_handlers_disconnect_by_func ( + extension, page_holder_deactivate_cb, notebook); + g_signal_handlers_disconnect_by_func ( + app, page_holder_app_add_browser_cb, extension); } static void diff --git a/extensions/statusbar-features.c b/extensions/statusbar-features.c index 8362a4e9..d4792299 100644 --- a/extensions/statusbar-features.c +++ b/extensions/statusbar-features.c @@ -11,13 +11,22 @@ #include +static void +statusbar_features_app_add_browser_cb (MidoriApp* app, + MidoriBrowser* browser, + MidoriExtension* extension); + static void statusbar_features_deactivate_cb (MidoriExtension* extension, GtkWidget* bbox) { + MidoriApp* app = midori_extension_get_app (extension); + gtk_widget_destroy (bbox); g_signal_handlers_disconnect_by_func ( extension, statusbar_features_deactivate_cb, bbox); + g_signal_handlers_disconnect_by_func ( + app, statusbar_features_app_add_browser_cb, extension); } static void -- 2.39.5