X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fhildon2%2Fmodest-hildon2-window-mgr.c;h=b5c6128f59a99cd69ccd72b0fbf75962529d696d;hp=a24f2ad9bd9de78ae2362ab0e7532b5b52f48fa4;hb=80d46e0ddb62768d3ce531038da3e055aa8feaba;hpb=d098e6745f49277f857e672500a2df4a8beaca20 diff --git a/src/hildon2/modest-hildon2-window-mgr.c b/src/hildon2/modest-hildon2-window-mgr.c index a24f2ad..b5c6128 100644 --- a/src/hildon2/modest-hildon2-window-mgr.c +++ b/src/hildon2/modest-hildon2-window-mgr.c @@ -51,6 +51,7 @@ #include "modest-tny-msg.h" #include "modest-tny-account.h" #include +#include /* 'private'/'protected' functions */ static void modest_hildon2_window_mgr_class_init (ModestHildon2WindowMgrClass *klass); @@ -588,11 +589,14 @@ modest_hildon2_window_mgr_register_window (ModestWindowMgr *self, if (acc_name) { modest_platform_remove_new_mail_notifications (FALSE, acc_name); + modest_account_mgr_set_has_new_mails (modest_runtime_get_account_mgr (), + acc_name, + FALSE); } } /* Show toolbar always */ - if (MODEST_MSG_EDIT_WINDOW (window)) { + if (MODEST_IS_MSG_EDIT_WINDOW (window)) { gboolean show_toolbar; show_toolbar = modest_conf_get_bool (modest_runtime_get_conf (), MODEST_CONF_EDIT_WINDOW_SHOW_TOOLBAR, NULL); modest_window_show_toolbar (window, show_toolbar); @@ -915,6 +919,20 @@ modest_hildon2_window_mgr_set_modal (ModestWindowMgr *self, gtk_window_set_modal (window, TRUE); gtk_window_set_transient_for (window, parent); gtk_window_set_destroy_with_parent (window, TRUE); + + if (!gtk_window_has_toplevel_focus (window)) { + GList *toplevels, *node; + + toplevels = gtk_window_list_toplevels (); + for (node = toplevels; node != NULL; node = g_list_next (node)) { + if (gtk_window_has_toplevel_focus (GTK_WINDOW (node->data))) { + if (GTK_IS_DIALOG (node->data)) { + gtk_window_set_transient_for (window, GTK_WINDOW (node->data)); + } + break; + } + } + } } static void