]> spindle.queued.net Git - midori/commitdiff
Disconnect add-browser callback when deactivating Colourful Tabs
authorTsahee Zidenberg <tsahee@yahoo.com>
Wed, 6 Jan 2010 22:56:30 +0000 (23:56 +0100)
committerChristian Dywan <christian@twotoasts.de>
Wed, 6 Jan 2010 23:02:12 +0000 (00:02 +0100)
extensions/colorful-tabs.c

index e63e843fda4a9d8725470e148d857e730a5b59d4..f000639661520027b59a44e8cfe7a2f8e044bd15 100644 (file)
@@ -64,13 +64,21 @@ colorful_tabs_browser_add_tab_cb (MidoriBrowser*   browser,
         G_CALLBACK (colorful_tabs_view_notify_uri_cb), extension);
 }
 
+static void
+colorful_tabs_app_add_browser_cb (MidoriApp*       app,
+                                  MidoriBrowser*   browser,
+                                  MidoriExtension* extension);
+
 static void
 colorful_tabs_deactivate_cb (MidoriExtension* extension,
                              MidoriBrowser*   browser)
 {
     guint i;
     GtkWidget* view;
+    MidoriApp* app = midori_extension_get_app (extension);
 
+    g_signal_handlers_disconnect_by_func (
+        app, colorful_tabs_app_add_browser_cb, extension);
     g_signal_handlers_disconnect_by_func (
         extension, colorful_tabs_deactivate_cb, browser);
     i = 0;
@@ -102,6 +110,7 @@ colorful_tabs_app_add_browser_cb (MidoriApp*       app,
         G_CALLBACK (colorful_tabs_deactivate_cb), browser);
 }
 
+
 static void
 colorful_tabs_activate_cb (MidoriExtension* extension,
                            MidoriApp*       app)