#include "modest-tny-msg.h"
#include "modest-tny-account.h"
#include <tny-merge-folder.h>
+#include <modest-account-mgr-helpers.h>
/* 'private'/'protected' functions */
static void modest_hildon2_window_mgr_class_init (ModestHildon2WindowMgrClass *klass);
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);
}
}
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