Fixes NB#133657, set the proper parent to the account settings dialog. This could...
authorSergio Villar Senin <svillar@igalia.com>
Wed, 16 Sep 2009 11:20:54 +0000 (13:20 +0200)
committerSergio Villar Senin <svillar@igalia.com>
Tue, 13 Oct 2009 14:03:30 +0000 (16:03 +0200)
src/modest-tny-account-store.c

index 1772c02..adad0fd 100644 (file)
@@ -510,9 +510,16 @@ show_wrong_password_dialog (TnyAccount *account,
 
                /* Create and show the dialog */
                if (proto && MODEST_IS_ACCOUNT_PROTOCOL (proto)) {
+                       GtkWindow *parent;
+                       ModestWindowMgr *mgr = modest_runtime_get_window_mgr ();
                        ModestAccountSettingsDialog *dialog =
                                modest_account_protocol_get_account_settings_dialog (proto, modest_account_name);
-                       modest_window_mgr_set_modal (modest_runtime_get_window_mgr (), GTK_WINDOW (dialog), NULL);
+
+                       parent = modest_window_mgr_get_modal (mgr);
+                       if (!parent)
+                               parent = (GtkWindow *) modest_window_mgr_get_current_top (mgr);
+
+                       modest_window_mgr_set_modal (mgr, GTK_WINDOW (dialog), parent);
                        gtk_widget_show (GTK_WIDGET (dialog));
                }
        }