]> spindle.queued.net Git - midori/commitdiff
Use the new midori_extension_get_app in extensions
authorChristian Dywan <christian@twotoasts.de>
Wed, 25 Mar 2009 01:12:12 +0000 (02:12 +0100)
committerChristian Dywan <christian@twotoasts.de>
Wed, 25 Mar 2009 01:12:12 +0000 (02:12 +0100)
extensions/page-holder.c
extensions/statusbar-features.c

index 7d3032bd264b06a8a899b704731239334c38e982..9ceb19630b0b18a1ac0da5c1055fda38b8e23eca 100644 (file)
 
 #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
index 8362a4e93f7f9f0805adf5343c233b7d1d84c247..d47922991d1a2addd8c0ebeb96202aef0a964d88 100644 (file)
 
 #include <midori/midori.h>
 
+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