From e1701be96dfce9e7476f80e62a75b460e782ecaa Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Tue, 6 Jan 2009 02:26:19 +0100 Subject: [PATCH] Implement 'deactivate' in Statusbar Features extension --- extensions/statusbar-features.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/extensions/statusbar-features.c b/extensions/statusbar-features.c index fb8cada1..86f21bfe 100644 --- a/extensions/statusbar-features.c +++ b/extensions/statusbar-features.c @@ -11,9 +11,17 @@ #include -void -statusbar_features_app_add_browser_cb (MidoriApp* app, - MidoriBrowser* browser) +static void +statusbar_features_deactivate_cb (MidoriExtension* extension, + GtkWidget* bbox) +{ + gtk_widget_destroy (bbox); +} + +static void +statusbar_features_app_add_browser_cb (MidoriApp* app, + MidoriBrowser* browser, + MidoriExtension* extension) { GtkWidget* statusbar; GtkWidget* bbox; @@ -49,6 +57,9 @@ statusbar_features_app_add_browser_cb (MidoriApp* app, gtk_widget_show (button); gtk_widget_show (bbox); gtk_box_pack_start (GTK_BOX (statusbar), bbox, FALSE, FALSE, 3); + + g_signal_connect (extension, "deactivate", + G_CALLBACK (statusbar_features_deactivate_cb), bbox); } static void @@ -56,7 +67,7 @@ statusbar_features_activate_cb (MidoriExtension* extension, MidoriApp* app) { g_signal_connect (app, "add-browser", - G_CALLBACK (statusbar_features_app_add_browser_cb), NULL); + G_CALLBACK (statusbar_features_app_add_browser_cb), extension); } MidoriExtension* -- 2.39.5