Mercurial > geeqie.yaz
comparison src/utilops.c @ 947:368643594bc8
abort file operations when the file list is empty
author | nadvornik |
---|---|
date | Sun, 27 Jul 2008 19:22:40 +0000 |
parents | 1d6e01950e85 |
children | c466b8fabcc3 |
comparison
equal
deleted
inserted
replaced
946:1d6e01950e85 | 947:368643594bc8 |
---|---|
1541 GList *flist = filelist_copy(source_list); | 1541 GList *flist = filelist_copy(source_list); |
1542 | 1542 |
1543 if (source_fd) | 1543 if (source_fd) |
1544 flist = g_list_append(flist, file_data_ref(source_fd)); | 1544 flist = g_list_append(flist, file_data_ref(source_fd)); |
1545 | 1545 |
1546 if (!flist) return; | |
1547 | |
1546 file_util_disable_grouping_sc_list(flist); | 1548 file_util_disable_grouping_sc_list(flist); |
1547 | 1549 |
1548 if (!file_data_sc_add_ci_delete_list(flist)) | 1550 if (!file_data_sc_add_ci_delete_list(flist)) |
1549 { | 1551 { |
1550 file_util_warn_op_in_progress(_("File deletion failed")); | 1552 file_util_warn_op_in_progress(_("File deletion failed")); |
1576 GList *flist = filelist_copy(source_list); | 1578 GList *flist = filelist_copy(source_list); |
1577 | 1579 |
1578 if (source_fd) | 1580 if (source_fd) |
1579 flist = g_list_append(flist, file_data_ref(source_fd)); | 1581 flist = g_list_append(flist, file_data_ref(source_fd)); |
1580 | 1582 |
1583 if (!flist) return; | |
1584 | |
1581 file_util_disable_grouping_sc_list(flist); | 1585 file_util_disable_grouping_sc_list(flist); |
1582 | 1586 |
1583 if (!file_data_sc_add_ci_move_list(flist, dest_path)) | 1587 if (!file_data_sc_add_ci_move_list(flist, dest_path)) |
1584 { | 1588 { |
1585 file_util_warn_op_in_progress(_("Move failed")); | 1589 file_util_warn_op_in_progress(_("Move failed")); |
1612 GList *flist = filelist_copy(source_list); | 1616 GList *flist = filelist_copy(source_list); |
1613 | 1617 |
1614 if (source_fd) | 1618 if (source_fd) |
1615 flist = g_list_append(flist, file_data_ref(source_fd)); | 1619 flist = g_list_append(flist, file_data_ref(source_fd)); |
1616 | 1620 |
1621 if (!flist) return; | |
1622 | |
1617 file_util_disable_grouping_sc_list(flist); | 1623 file_util_disable_grouping_sc_list(flist); |
1618 | 1624 |
1619 if (!file_data_sc_add_ci_copy_list(flist, dest_path)) | 1625 if (!file_data_sc_add_ci_copy_list(flist, dest_path)) |
1620 { | 1626 { |
1621 file_util_warn_op_in_progress(_("Copy failed")); | 1627 file_util_warn_op_in_progress(_("Copy failed")); |
1649 GList *flist = filelist_copy(source_list); | 1655 GList *flist = filelist_copy(source_list); |
1650 | 1656 |
1651 if (source_fd) | 1657 if (source_fd) |
1652 flist = g_list_append(flist, file_data_ref(source_fd)); | 1658 flist = g_list_append(flist, file_data_ref(source_fd)); |
1653 | 1659 |
1660 if (!flist) return; | |
1661 | |
1654 file_util_disable_grouping_sc_list(flist); | 1662 file_util_disable_grouping_sc_list(flist); |
1655 | 1663 |
1656 if (!file_data_sc_add_ci_rename_list(flist, dest_path)) | 1664 if (!file_data_sc_add_ci_rename_list(flist, dest_path)) |
1657 { | 1665 { |
1658 file_util_warn_op_in_progress(_("Rename failed")); | 1666 file_util_warn_op_in_progress(_("Rename failed")); |
1683 UtilityData *ud; | 1691 UtilityData *ud; |
1684 GList *flist = filelist_copy(source_list); | 1692 GList *flist = filelist_copy(source_list); |
1685 | 1693 |
1686 if (source_fd) | 1694 if (source_fd) |
1687 flist = g_list_append(flist, file_data_ref(source_fd)); | 1695 flist = g_list_append(flist, file_data_ref(source_fd)); |
1696 | |
1697 if (!flist) return; | |
1688 | 1698 |
1689 file_util_disable_grouping_sc_list(flist); | 1699 file_util_disable_grouping_sc_list(flist); |
1690 | 1700 |
1691 if (!file_data_sc_add_ci_unspecified_list(flist, dest_path)) | 1701 if (!file_data_sc_add_ci_unspecified_list(flist, dest_path)) |
1692 { | 1702 { |