remove gui stuff from folder.c
[claws.git] / src / folder.c
index 1136b92624fd03af4c42ec81749921474a3b9cf4..4f099117253cf81f0792e45a794fb7176bab6406 100644 (file)
@@ -1559,7 +1559,7 @@ FolderItem *folder_item_move_recursive (FolderItem *src, FolderItem *dest)
        return new_item;
 }
 
-FolderItem *folder_item_move_to(FolderItem *src, FolderItem *dest)
+FolderItem *folder_item_move_to(FolderItem *src, FolderItem *dest, char *error)
 {
        FolderItem *tmp = dest->parent;
        char * src_identifier, * dst_identifier, * new_identifier;
@@ -1568,7 +1568,7 @@ FolderItem *folder_item_move_to(FolderItem *src, FolderItem *dest)
        
        while (tmp) {
                if (tmp == src) {
-                       alertpanel_error(_("Can't move a folder to one of its children."));
+                       error = g_strdup(_("Can't move a folder to one of its children."));
                        return NULL;
                }
                tmp = tmp->parent;
@@ -1592,7 +1592,7 @@ FolderItem *folder_item_move_to(FolderItem *src, FolderItem *dest)
        phys_dstpath = g_strconcat(folder_item_get_path(dest),G_DIR_SEPARATOR_S,g_basename(phys_srcpath),NULL);
 
        if (src->parent == dest) {
-               alertpanel_error(_("Source and destination are the same."));
+               error = g_strdup(_("Source and destination are the same."));
                g_free(src_identifier);
                g_free(dst_identifier);
                g_free(phys_srcpath);
@@ -1601,7 +1601,7 @@ FolderItem *folder_item_move_to(FolderItem *src, FolderItem *dest)
        }
        debug_print("moving \"%s\" to \"%s\"\n", phys_srcpath, phys_dstpath);
        if ((tmp = folder_item_move_recursive(src, dest)) == NULL) {
-               alertpanel_error(_("Move failed!"));
+               error = g_strdup(_("Move failed!"));
                return NULL;
        }