account, 0);
/* Show it and delete it when it closes: */
- modest_maemo_show_dialog_and_forget (GTK_WINDOW (main_window), GTK_DIALOG (dialog));
+ gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (main_window));
+ g_signal_connect_swapped (dialog,
+ "response",
+ G_CALLBACK (gtk_widget_destroy),
+ dialog);
+ gtk_widget_show (GTK_WIDGET (dialog));
}
else {
/* Just show it instead of showing it and deleting it when it closes,
/* If there was any problem creating the account, for example,
with the configuration system this could not exist */
if (store_account) {
+
+ /* do this before deleting the cache */
+ account_disconnect (store_account);
+
/* Clear the cache */
tny_store_account_delete_cache (TNY_STORE_ACCOUNT (store_account));
/* Notify the observers */
g_signal_emit (G_OBJECT (self), signals [ACCOUNT_REMOVED_SIGNAL], 0, store_account);
- account_disconnect (store_account); /* disconnect the account */
+
g_object_unref (store_account);
} else {
g_warning ("There is no store account for account %s\n", account);