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;
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;
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);
}
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;
}