* update to the new modest_tny_folder_has_subfolder_with_name
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Wed, 7 Nov 2007 16:06:40 +0000 (16:06 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Wed, 7 Nov 2007 16:06:40 +0000 (16:06 +0000)
pmo-trunk-r3666

src/maemo/modest-platform.c
src/modest-mail-operation.c
src/modest-ui-dimming-rules.c

index 50718b9..eddbaf2 100644 (file)
@@ -596,10 +596,11 @@ launch_sort_headers_dialog (GtkWindow *parent_window,
        
        /* Add sorting keys */
        cols = modest_header_view_get_columns (header_view);
-       if (cols == NULL) return;
-       int sort_model_ids[6];
-       int sort_ids[6];
-
+       if (cols == NULL) 
+               return;
+#define SORT_ID_NUM 6
+       int sort_model_ids[SORT_ID_NUM];
+       int sort_ids[SORT_ID_NUM];
 
        outgoing = (GPOINTER_TO_INT (g_object_get_data(G_OBJECT(cols->data), MODEST_HEADER_VIEW_COLUMN))==
                    MODEST_HEADER_VIEW_COLUMN_COMPACT_HEADER_OUT);
@@ -726,7 +727,9 @@ on_response (GtkDialog *dialog,
 
        /* Look for another folder with the same name */
        if (modest_tny_folder_has_subfolder_with_name (parent, 
-                                                      gtk_entry_get_text (GTK_ENTRY (entry)))) {
+                                                      gtk_entry_get_text (GTK_ENTRY (entry)),
+                                                      TRUE)) {
+
                /* Show an error */
                hildon_banner_show_information (gtk_widget_get_parent (GTK_WIDGET (dialog)), 
                                                NULL, _CS("ckdg_ib_folder_already_exists"));
@@ -844,9 +847,9 @@ modest_platform_run_new_folder_dialog (GtkWindow *parent_window,
                        else
                                real_suggested_name = g_strdup_printf (_("mcen_ia_default_folder_name_s"),
                                                                       num_str);
-
                        exists = modest_tny_folder_has_subfolder_with_name (parent_folder,
-                                                                           real_suggested_name);
+                                                                           real_suggested_name,
+                                                                           TRUE);
 
                        if (!exists)
                                break;
index 0846967..b3f97d4 100644 (file)
@@ -1606,7 +1606,7 @@ modest_mail_operation_create_folder (ModestMailOperation *self,
                modest_tny_folder_get_account (TNY_FOLDER (parent));
 
        /* Check for already existing folder */
-       if (modest_tny_folder_has_subfolder_with_name (parent, name)) {
+       if (modest_tny_folder_has_subfolder_with_name (parent, name, TRUE)) {
                priv->status = MODEST_MAIL_OPERATION_STATUS_FAILED;
                g_set_error (&(priv->error), MODEST_MAIL_OPERATION_ERROR,
                             MODEST_MAIL_OPERATION_ERROR_FOLDER_EXISTS,
@@ -1893,7 +1893,7 @@ modest_mail_operation_xfer_folder (ModestMailOperation *self,
                /* Do not move a parent into a child */
                goto error;
        } else if (TNY_IS_FOLDER_STORE (parent) &&
-                  modest_tny_folder_has_subfolder_with_name (parent, folder_name)) {
+                  modest_tny_folder_has_subfolder_with_name (parent, folder_name, TRUE)) {
                /* Check that the new folder name is not used by any
                   parent subfolder */
                goto error;     
index 50e38a1..cac4d9c 100644 (file)
@@ -2609,9 +2609,9 @@ _selected_folder_has_subfolder_with_same_name (ModestWindow *win)
        if (folder_name == NULL) goto frees;
 
        /* Check source subfolders names */
-       result = modest_tny_folder_has_subfolder_with_name (folder, folder_name);
-       
-       
+       result = modest_tny_folder_has_subfolder_with_name (folder, folder_name,
+                                                           TRUE);
+               
        /* Free */
  frees:
        if (folder != NULL)