From 5af8580728d5074c39d007cf008bc3be3a9a2149 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Sun, 16 Nov 2003 22:55:01 +0000 Subject: *** empty log message *** --- src/ephy-shell.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src') 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; -- cgit v1.2.3