Invalidate screenshots on deleting/adding accounts, so we don't invalidate
authorJose Dapena Paz <jdapena@igalia.com>
Mon, 14 Dec 2009 10:41:02 +0000 (11:41 +0100)
committerJose Dapena Paz <jdapena@igalia.com>
Mon, 14 Dec 2009 10:59:52 +0000 (11:59 +0100)
on every time we close modest.

Fix 2/3 of NB#139348

src/modest-ui-actions.c
src/widgets/modest-accounts-window.c
src/widgets/modest-easysetup-wizard-dialog.c

index cca3c78..140b596 100644 (file)
@@ -5793,6 +5793,9 @@ modest_ui_actions_on_delete_account (GtkWindow *parent_window,
 
                removed = modest_account_mgr_remove_account (account_mgr, account_name);
                if (removed) {
 
                removed = modest_account_mgr_remove_account (account_mgr, account_name);
                if (removed) {
+#ifdef MODEST_TOOLKIT_HILDON2
+                       hildon_gtk_window_take_screenshot (parent_window, FALSE);
+#endif
                        /* Close all email notifications, we cannot
                           distinguish if the notification belongs to
                           this account or not, so for safety reasons
                        /* Close all email notifications, we cannot
                           distinguish if the notification belongs to
                           this account or not, so for safety reasons
index 01dd7c1..646cb9b 100644 (file)
@@ -750,7 +750,6 @@ on_delete_event (GtkWidget *widget,
 
        /* Take screenshot. We have to wait a bit to ensure that
           screenshot is properly taken */
 
        /* Take screenshot. We have to wait a bit to ensure that
           screenshot is properly taken */
-       hildon_gtk_window_take_screenshot (GTK_WINDOW (widget), FALSE);
        hildon_gtk_window_take_screenshot (GTK_WINDOW (widget), TRUE);
        g_usleep (G_USEC_PER_SEC);
 
        hildon_gtk_window_take_screenshot (GTK_WINDOW (widget), TRUE);
        g_usleep (G_USEC_PER_SEC);
 
index ee12e96..6c58702 100644 (file)
@@ -2121,6 +2121,9 @@ on_before_next (ModestWizardDialog *dialog, GtkWidget *current_page, GtkWidget *
                }
 
                modest_account_mgr_add_account_from_settings (priv->account_manager, priv->settings);
                }
 
                modest_account_mgr_add_account_from_settings (priv->account_manager, priv->settings);
+#ifdef MODEST_TOOLKIT_HILDON2
+               hildon_gtk_window_take_screenshot ((GtkWindow *) dialog, FALSE);
+#endif
        }
 
 
        }
 
 
@@ -2560,6 +2563,7 @@ on_save (ModestWizardDialog *dialog)
 {
        ModestEasysetupWizardDialog *self = MODEST_EASYSETUP_WIZARD_DIALOG (dialog);
        ModestEasysetupWizardDialogPrivate *priv = MODEST_EASYSETUP_WIZARD_DIALOG_GET_PRIVATE (self);
 {
        ModestEasysetupWizardDialog *self = MODEST_EASYSETUP_WIZARD_DIALOG (dialog);
        ModestEasysetupWizardDialogPrivate *priv = MODEST_EASYSETUP_WIZARD_DIALOG_GET_PRIVATE (self);
+       gboolean result;
 
        save_to_settings (self);
 
 
        save_to_settings (self);
 
@@ -2568,7 +2572,12 @@ on_save (ModestWizardDialog *dialog)
                return FALSE;
        }
 
                return FALSE;
        }
 
-       return modest_account_mgr_add_account_from_settings (priv->account_manager, priv->settings);
+       
+       result = modest_account_mgr_add_account_from_settings (priv->account_manager, priv->settings);
+       if (result) {
+               hildon_gtk_window_take_screenshot ((GtkWindow *) dialog, FALSE);
+       }
+       return result;
 
 }
 
 
 }