diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-shell.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/ephy-shell.c b/src/ephy-shell.c index 4fd1a5aaf..a0d14b4f6 100644 --- a/src/ephy-shell.c +++ b/src/ephy-shell.c @@ -723,17 +723,25 @@ ephy_shell_get_extensions_manager (EphyShell *es) } static void -toolwindow_show_cb (GtkWidget *widget) +toolwindow_show_cb (GtkWidget *widget, EphyShell *es) { + EphySession *session; + LOG ("Ref shell for %s", G_OBJECT_TYPE_NAME (widget)) + + session = EPHY_SESSION (ephy_shell_get_session (es)); ephy_session_add_window (ephy_shell->priv->session, GTK_WINDOW (widget)); g_object_ref (ephy_shell); } static void -toolwindow_hide_cb (GtkWidget *widget) +toolwindow_hide_cb (GtkWidget *widget, EphyShell *es) { + EphySession *session; + LOG ("Unref shell for %s", G_OBJECT_TYPE_NAME (widget)) + + session = EPHY_SESSION (ephy_shell_get_session (es)); ephy_session_remove_window (ephy_shell->priv->session, GTK_WINDOW (widget)); g_object_unref (ephy_shell); } @@ -750,9 +758,9 @@ ephy_shell_get_bookmarks_editor (EphyShell *gs) gs->priv->bme = ephy_bookmarks_editor_new (bookmarks); g_signal_connect (gs->priv->bme, "show", - G_CALLBACK (toolwindow_show_cb), NULL); + G_CALLBACK (toolwindow_show_cb), gs); g_signal_connect (gs->priv->bme, "hide", - G_CALLBACK (toolwindow_hide_cb), NULL); + G_CALLBACK (toolwindow_hide_cb), gs); } return gs->priv->bme; |