* Added two missing unref's
authorSergio Villar Senin <svillar@igalia.com>
Fri, 21 Sep 2007 17:51:39 +0000 (17:51 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Fri, 21 Sep 2007 17:51:39 +0000 (17:51 +0000)
* Do not use gconf directly, replaced by calls to modest_conf
* Fixes NB#65856, do not show the "Saving" info banner while asking for confirmation

pmo-trunk-r3396

src/maemo/easysetup/modest-easysetup-wizard.c
src/maemo/modest-msg-view-window.c
src/modest-mail-operation.c

index 0ce3312..1c462d5 100644 (file)
@@ -457,10 +457,9 @@ create_page_account_details (ModestEasysetupWizardDialog *self)
         * set by the osso-operator-wizard package, suggested by Dirk-Jan Binnema.
         *
         */
-       GConfClient *client = gconf_client_get_default ();
        GError *error = NULL;
        const gchar* key = "/apps/osso/operator-wizard/last_mcc";
-       gint mcc_id = gconf_client_get_int(client, key, &error);
+       gint mcc_id = modest_conf_get_int(modest_runtime_get_conf (), key, &error);
        
        if(mcc_id < 0)
                mcc_id = 0;
@@ -473,7 +472,7 @@ create_page_account_details (ModestEasysetupWizardDialog *self)
                mcc_id = 0;
        }
     
-       /* Note that gconf_client_get_int() seems to return 0 without an error if the key is not there
+       /* Note that modest_conf_get_int() seems to return 0 without an error if the key is not there
         * This might just be a Maemo bug.
         */
        if (mcc_id == 0) 
@@ -1884,6 +1883,7 @@ create_account (ModestEasysetupWizardDialog *self, gboolean enabled)
        if (self->specific_window)
                result = modest_connection_specific_smtp_window_save_server_accounts (
                        MODEST_CONNECTION_SPECIFIC_SMTP_WINDOW (self->specific_window));
+
                        
        g_free (self->saved_account_name);
        self->saved_account_name = g_strdup (account_name);
index b375868..ca7be3e 100644 (file)
@@ -2363,7 +2363,11 @@ save_mime_parts_to_file_with_checks (SaveMimePartInfo *info)
        if (!is_ok) {
                save_mime_part_info_free (info, TRUE);
        } else {
+               GtkWidget *banner = hildon_banner_show_animation (NULL, NULL, 
+                                                                 _CS("sfil_ib_saving"));
+               info->banner = g_object_ref (banner);
                g_thread_create ((GThreadFunc)save_mime_part_to_file, info, FALSE, NULL);
+               g_object_unref (banner);
        }
 
 }
@@ -2469,12 +2473,8 @@ modest_msg_view_window_save_attachments (ModestMsgViewWindow *window, GList *mim
 
        if (files_to_save != NULL) {
                SaveMimePartInfo *info = g_slice_new0 (SaveMimePartInfo);
-               GtkWidget *banner = hildon_banner_show_animation (NULL, NULL, 
-                                                                 _CS("sfil_ib_saving"));
                info->pairs = files_to_save;
-               info->banner = banner;
                info->result = TRUE;
-               g_object_ref (banner);
                save_mime_parts_to_file_with_checks (info);
        }
 }
index 49c5b6b..ec5a0be 100644 (file)
@@ -1533,6 +1533,10 @@ modest_mail_operation_update_account (ModestMailOperation *self,
        return TRUE;
 
  error:
+       if (store_account)
+               g_object_unref (store_account);
+       if (transport_account)
+               g_object_unref (transport_account);
        priv->status = MODEST_MAIL_OPERATION_STATUS_FAILED;
        if (callback) {
                callback (self, NULL, user_data);