Mercurial > geeqie.yaz
comparison src/utilops.c @ 1619:011e8dbda7f2
changed selection behavior as requested at
http://sourceforge.net/tracker/?func=detail&aid=2789933&group_id=222125&atid=1054680
file view - sidecars are added to the selection if they were expicitly selected
or if the entry is collapsed
icon view - selection always contains sidecars
file operations splits partially selected groups - selected files have
disabled grouping
author | nadvornik |
---|---|
date | Tue, 02 Jun 2009 22:33:53 +0000 |
parents | 475bbae6a7a3 |
children | 9b692bdb4b9f |
comparison
equal
deleted
inserted
replaced
1618:f47b8dc207f5 | 1619:011e8dbda7f2 |
---|---|
1698 static void file_util_warn_op_in_progress(const gchar *title) | 1698 static void file_util_warn_op_in_progress(const gchar *title) |
1699 { | 1699 { |
1700 file_util_warning_dialog(title, _("Another operation in progress.\n"), GTK_STOCK_DIALOG_ERROR, NULL); | 1700 file_util_warning_dialog(title, _("Another operation in progress.\n"), GTK_STOCK_DIALOG_ERROR, NULL); |
1701 } | 1701 } |
1702 | 1702 |
1703 static void file_util_disable_grouping_sc_list(GList *list) | |
1704 { | |
1705 GList *work = list; | |
1706 | |
1707 while (work) | |
1708 { | |
1709 FileData *fd = work->data; | |
1710 work = work->next; | |
1711 | |
1712 if (fd->parent) file_data_disable_grouping(fd, TRUE); | |
1713 } | |
1714 | |
1715 } | |
1716 | |
1717 static void file_util_details_dialog_close_cb(GtkWidget *widget, gpointer data) | 1703 static void file_util_details_dialog_close_cb(GtkWidget *widget, gpointer data) |
1718 { | 1704 { |
1719 gtk_widget_destroy(data); | 1705 gtk_widget_destroy(data); |
1720 | 1706 |
1721 } | 1707 } |
1941 if (source_fd) | 1927 if (source_fd) |
1942 flist = g_list_append(flist, file_data_ref(source_fd)); | 1928 flist = g_list_append(flist, file_data_ref(source_fd)); |
1943 | 1929 |
1944 if (!flist) return; | 1930 if (!flist) return; |
1945 | 1931 |
1946 file_util_disable_grouping_sc_list(flist); | 1932 flist = file_data_process_groups(flist); |
1947 | 1933 |
1948 if (!file_data_sc_add_ci_delete_list(flist)) | 1934 if (!file_data_sc_add_ci_delete_list(flist)) |
1949 { | 1935 { |
1950 file_util_warn_op_in_progress(_("File deletion failed")); | 1936 file_util_warn_op_in_progress(_("File deletion failed")); |
1951 filelist_free(flist); | 1937 filelist_free(flist); |
2028 if (source_fd) | 2014 if (source_fd) |
2029 flist = g_list_append(flist, file_data_ref(source_fd)); | 2015 flist = g_list_append(flist, file_data_ref(source_fd)); |
2030 | 2016 |
2031 if (!flist) return; | 2017 if (!flist) return; |
2032 | 2018 |
2033 file_util_disable_grouping_sc_list(flist); | 2019 flist = file_data_process_groups(flist); |
2034 | 2020 |
2035 if (!file_data_sc_add_ci_move_list(flist, dest_path)) | 2021 if (!file_data_sc_add_ci_move_list(flist, dest_path)) |
2036 { | 2022 { |
2037 file_util_warn_op_in_progress(_("Move failed")); | 2023 file_util_warn_op_in_progress(_("Move failed")); |
2038 filelist_free(flist); | 2024 filelist_free(flist); |
2069 if (source_fd) | 2055 if (source_fd) |
2070 flist = g_list_append(flist, file_data_ref(source_fd)); | 2056 flist = g_list_append(flist, file_data_ref(source_fd)); |
2071 | 2057 |
2072 if (!flist) return; | 2058 if (!flist) return; |
2073 | 2059 |
2074 file_util_disable_grouping_sc_list(flist); | 2060 flist = file_data_process_groups(flist); |
2075 | 2061 |
2076 if (!file_data_sc_add_ci_copy_list(flist, dest_path)) | 2062 if (!file_data_sc_add_ci_copy_list(flist, dest_path)) |
2077 { | 2063 { |
2078 file_util_warn_op_in_progress(_("Copy failed")); | 2064 file_util_warn_op_in_progress(_("Copy failed")); |
2079 filelist_free(flist); | 2065 filelist_free(flist); |
2110 if (source_fd) | 2096 if (source_fd) |
2111 flist = g_list_append(flist, file_data_ref(source_fd)); | 2097 flist = g_list_append(flist, file_data_ref(source_fd)); |
2112 | 2098 |
2113 if (!flist) return; | 2099 if (!flist) return; |
2114 | 2100 |
2115 file_util_disable_grouping_sc_list(flist); | 2101 flist = file_data_process_groups(flist); |
2116 | 2102 |
2117 if (!file_data_sc_add_ci_rename_list(flist, dest_path)) | 2103 if (!file_data_sc_add_ci_rename_list(flist, dest_path)) |
2118 { | 2104 { |
2119 file_util_warn_op_in_progress(_("Rename failed")); | 2105 file_util_warn_op_in_progress(_("Rename failed")); |
2120 filelist_free(flist); | 2106 filelist_free(flist); |
2151 if (source_fd) | 2137 if (source_fd) |
2152 flist = g_list_append(flist, file_data_ref(source_fd)); | 2138 flist = g_list_append(flist, file_data_ref(source_fd)); |
2153 | 2139 |
2154 if (!flist) return; | 2140 if (!flist) return; |
2155 | 2141 |
2156 file_util_disable_grouping_sc_list(flist); | 2142 flist = file_data_process_groups(flist); |
2157 | 2143 |
2158 if (!file_data_sc_add_ci_unspecified_list(flist, dest_path)) | 2144 if (!file_data_sc_add_ci_unspecified_list(flist, dest_path)) |
2159 { | 2145 { |
2160 file_util_warn_op_in_progress(_("Can't run external editor")); | 2146 file_util_warn_op_in_progress(_("Can't run external editor")); |
2161 filelist_free(flist); | 2147 filelist_free(flist); |