Handle activation and deactivation of Statusbar Features properly
This commit is contained in:
parent
9c4d3ea62a
commit
823f8dbc3f
1 changed files with 10 additions and 0 deletions
|
@ -16,6 +16,8 @@ statusbar_features_deactivate_cb (MidoriExtension* extension,
|
||||||
GtkWidget* bbox)
|
GtkWidget* bbox)
|
||||||
{
|
{
|
||||||
gtk_widget_destroy (bbox);
|
gtk_widget_destroy (bbox);
|
||||||
|
g_signal_handlers_disconnect_by_func (
|
||||||
|
extension, statusbar_features_deactivate_cb, bbox);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -66,6 +68,14 @@ static void
|
||||||
statusbar_features_activate_cb (MidoriExtension* extension,
|
statusbar_features_activate_cb (MidoriExtension* extension,
|
||||||
MidoriApp* app)
|
MidoriApp* app)
|
||||||
{
|
{
|
||||||
|
KatzeArray* browsers;
|
||||||
|
MidoriBrowser* browser;
|
||||||
|
guint i;
|
||||||
|
|
||||||
|
browsers = katze_object_get_object (app, "browsers");
|
||||||
|
i = 0;
|
||||||
|
while ((browser = katze_array_get_nth_item (browsers, i++)))
|
||||||
|
statusbar_features_app_add_browser_cb (app, browser, extension);
|
||||||
g_signal_connect (app, "add-browser",
|
g_signal_connect (app, "add-browser",
|
||||||
G_CALLBACK (statusbar_features_app_add_browser_cb), extension);
|
G_CALLBACK (statusbar_features_app_add_browser_cb), extension);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue