diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-05-24 04:22:42 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-05-24 04:22:42 +0800 |
commit | 18b4f29daa6f95a318bd5f29aec15448fa2039f2 (patch) | |
tree | e57b65793d485ce4e22fab0f65123d1aba1f4b8c /mail/folder-browser-window.c | |
parent | 2aef04318ccca705321efd7340b0275a6537ac70 (diff) | |
download | gsoc2013-evolution-18b4f29daa6f95a318bd5f29aec15448fa2039f2.tar.gz gsoc2013-evolution-18b4f29daa6f95a318bd5f29aec15448fa2039f2.tar.zst gsoc2013-evolution-18b4f29daa6f95a318bd5f29aec15448fa2039f2.zip |
If the folder-browser has a parent, reparent it.
2002-05-23 Jeffrey Stedfast <fejj@ximian.com>
* folder-browser-window.c (folder_browser_window_new): If the
folder-browser has a parent, reparent it.
* message-browser.[c,h]: Revert back to the old broken
implementation since that's what users want. They're not happy
unless it's broken.
svn path=/trunk/; revision=16989
Diffstat (limited to 'mail/folder-browser-window.c')
-rw-r--r-- | mail/folder-browser-window.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/mail/folder-browser-window.c b/mail/folder-browser-window.c index e87a745811..0f8132454a 100644 --- a/mail/folder-browser-window.c +++ b/mail/folder-browser-window.c @@ -77,6 +77,23 @@ folder_browser_window_init (GtkObject *object) } +static gboolean +destroy_cb (GtkWidget *widget) +{ + FolderBrowserWindow *fbw = (FolderBrowserWindow *) widget; + FolderBrowser *fb = fbw->folder_browser; + + if (fbw->fb_parent) { + gtk_widget_ref (GTK_WIDGET (fb)); + gtk_widget_unparent (GTK_WIDGET (fb)); + gtk_container_add (GTK_CONTAINER (fbw->fb_parent), GTK_WIDGET (fb)); + gtk_widget_unref (GTK_WIDGET (fb)); + fbw->folder_browser = NULL; + } + + return FALSE; +} + static void folder_browser_window_size_allocate_cb (GtkWidget *widget, GtkAllocation *allocation) { @@ -111,7 +128,18 @@ folder_browser_window_new (FolderBrowser *fb) set_default_size (GTK_WIDGET (new)); new->folder_browser = fb; + gtk_widget_ref (GTK_WIDGET (fb)); + if (GTK_WIDGET (fb)->parent) { + new->fb_parent = GTK_WIDGET (fb)->parent; + gtk_widget_unparent (GTK_WIDGET (fb)); + + gtk_signal_connect (GTK_OBJECT (new), "delete_event", + destroy_cb, new); + } + + new->folder_browser = fb; bonobo_window_set_contents (BONOBO_WINDOW (new), GTK_WIDGET (fb)); + gtk_widget_unref (GTK_WIDGET (fb)); uicont = bonobo_ui_container_new (); bonobo_ui_container_set_win (uicont, BONOBO_WINDOW (new)); |