From: Jose Dapena Paz Date: Fri, 9 Nov 2007 08:45:35 +0000 (+0000) Subject: This fixes NB#75543. X-Git-Tag: git_migration_finished~2139 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=a4a4f2640022f8b27dc85bc1ef49ac88dbbcf3d3 This fixes NB#75543. * src/widgets/modest-window-mgr.c: * Now you can register a window more than one time, and it handles this without problems (simply exiting the function silently). * src/maemo/modest-msg-edit-window.c: * Now we don't unregister the window on setting a new draft, as we can register it again without unregistering. pmo-trunk-r3677 --- diff --git a/src/maemo/modest-msg-edit-window.c b/src/maemo/modest-msg-edit-window.c index 6c770fb..77cedb0 100644 --- a/src/maemo/modest-msg-edit-window.c +++ b/src/maemo/modest-msg-edit-window.c @@ -3213,7 +3213,6 @@ modest_msg_edit_window_set_draft (ModestMsgEditWindow *window, ModestWindowMgr *mgr = modest_runtime_get_window_mgr (); if (priv->draft_msg != NULL) { - modest_window_mgr_unregister_window (mgr, MODEST_WINDOW (window)); g_object_unref (priv->draft_msg); } diff --git a/src/widgets/modest-window-mgr.c b/src/widgets/modest-window-mgr.c index caf781e..6c2f191 100644 --- a/src/widgets/modest-window-mgr.c +++ b/src/widgets/modest-window-mgr.c @@ -506,8 +506,9 @@ modest_window_mgr_register_window (ModestWindowMgr *self, win = g_list_find (priv->window_list, window); if (win) { - g_warning ("%s: trying to re-register a window", - __FUNCTION__); + /* this is for the case we want to register the window and it was already + * registered. We leave silently. + */ return; }