Mercurial > geeqie
comparison src/utilops.c @ 995:6ca2c5fd7b13
Whitespaces cleanup.
author | zas_ |
---|---|
date | Mon, 25 Aug 2008 22:20:45 +0000 |
parents | c466b8fabcc3 |
children | 4fe8f9656107 |
comparison
equal
deleted
inserted
replaced
994:c879a4c14f33 | 995:6ca2c5fd7b13 |
---|---|
531 | 531 |
532 | 532 |
533 while (list) /* be careful, file_util_perform_ci_internal can pass ud->flist as list */ | 533 while (list) /* be careful, file_util_perform_ci_internal can pass ud->flist as list */ |
534 { | 534 { |
535 FileData *fd = list->data; | 535 FileData *fd = list->data; |
536 list = list->next; | 536 list = list->next; |
537 | 537 |
538 if (!(flags & EDITOR_ERROR_MASK)) /* files were successfully deleted, call the maint functions */ | 538 if (!(flags & EDITOR_ERROR_MASK)) /* files were successfully deleted, call the maint functions */ |
539 { | 539 { |
540 file_data_sc_apply_ci(fd); | 540 file_data_sc_apply_ci(fd); |
541 } | 541 } |
556 | 556 |
557 | 557 |
558 /* | 558 /* |
559 * Perform the operation described by FileDataChangeInfo on all files in the list | 559 * Perform the operation described by FileDataChangeInfo on all files in the list |
560 * it is an alternative to start_editor_from_filelist_full, it should use similar interface | 560 * it is an alternative to start_editor_from_filelist_full, it should use similar interface |
561 */ | 561 */ |
562 | 562 |
563 | 563 |
564 static void file_util_perform_ci_internal(UtilityData *ud) | 564 static void file_util_perform_ci_internal(UtilityData *ud) |
565 { | 565 { |
566 | 566 |
822 static GdkPixbuf *pb_apply; | 822 static GdkPixbuf *pb_apply; |
823 gint error; | 823 gint error; |
824 | 824 |
825 if (!pb_warning) | 825 if (!pb_warning) |
826 { | 826 { |
827 pb_warning = gtk_widget_render_icon(widget, GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_MENU, NULL); | 827 pb_warning = gtk_widget_render_icon(widget, GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_MENU, NULL); |
828 } | 828 } |
829 | 829 |
830 if (!pb_error) | 830 if (!pb_error) |
831 { | 831 { |
832 pb_error = gtk_widget_render_icon(widget, GTK_STOCK_DIALOG_ERROR, GTK_ICON_SIZE_MENU, NULL); | 832 pb_error = gtk_widget_render_icon(widget, GTK_STOCK_DIALOG_ERROR, GTK_ICON_SIZE_MENU, NULL); |
833 } | 833 } |
834 | 834 |
835 if (!pb_apply) | 835 if (!pb_apply) |
836 { | 836 { |
837 pb_apply = gtk_widget_render_icon(widget, GTK_STOCK_APPLY, GTK_ICON_SIZE_MENU, NULL); | 837 pb_apply = gtk_widget_render_icon(widget, GTK_STOCK_APPLY, GTK_ICON_SIZE_MENU, NULL); |
838 } | 838 } |
839 | 839 |
840 error = file_data_sc_verify_ci(fd); | 840 error = file_data_sc_verify_ci(fd); |
841 | 841 |
842 if (!error) return pb_apply; | 842 if (!error) return pb_apply; |
843 | 843 |
844 if (error & CHANGE_ERROR_MASK) | 844 if (error & CHANGE_ERROR_MASK) |
845 { | 845 { |
846 return pb_error; | 846 return pb_error; |
847 } | 847 } |
848 else | 848 else |
849 { | 849 { |
1098 FileData *fd; | 1098 FileData *fd; |
1099 const gchar *dest = gtk_entry_get_text(GTK_ENTRY(ud->rename_entry)); | 1099 const gchar *dest = gtk_entry_get_text(GTK_ENTRY(ud->rename_entry)); |
1100 | 1100 |
1101 gtk_tree_model_get(store, &iter, UTILITY_COLUMN_FD, &fd, -1); | 1101 gtk_tree_model_get(store, &iter, UTILITY_COLUMN_FD, &fd, -1); |
1102 file_data_sc_update_ci_rename(fd, dest); | 1102 file_data_sc_update_ci_rename(fd, dest); |
1103 gtk_list_store_set(GTK_LIST_STORE(store), &iter, | 1103 gtk_list_store_set(GTK_LIST_STORE(store), &iter, |
1104 UTILITY_COLUMN_PIXBUF, file_util_get_error_icon(fd, ud->listview), | 1104 UTILITY_COLUMN_PIXBUF, file_util_get_error_icon(fd, ud->listview), |
1105 UTILITY_COLUMN_DEST_PATH, fd->change->dest, | 1105 UTILITY_COLUMN_DEST_PATH, fd->change->dest, |
1106 UTILITY_COLUMN_DEST_NAME, filename_from_path(fd->change->dest), | 1106 UTILITY_COLUMN_DEST_NAME, filename_from_path(fd->change->dest), |
1107 -1); | 1107 -1); |
1108 } | 1108 } |
1109 return; | 1109 return; |
1110 } | 1110 } |
1111 | 1111 |
1142 { | 1142 { |
1143 dest = g_strdup_printf("%s%0*d%s", front, padding, n, end); | 1143 dest = g_strdup_printf("%s%0*d%s", front, padding, n, end); |
1144 } | 1144 } |
1145 | 1145 |
1146 file_data_sc_update_ci_rename(fd, dest); | 1146 file_data_sc_update_ci_rename(fd, dest); |
1147 gtk_list_store_set(GTK_LIST_STORE(store), &iter, | 1147 gtk_list_store_set(GTK_LIST_STORE(store), &iter, |
1148 UTILITY_COLUMN_PIXBUF, file_util_get_error_icon(fd, ud->listview), | 1148 UTILITY_COLUMN_PIXBUF, file_util_get_error_icon(fd, ud->listview), |
1149 UTILITY_COLUMN_DEST_PATH, fd->change->dest, | 1149 UTILITY_COLUMN_DEST_PATH, fd->change->dest, |
1150 UTILITY_COLUMN_DEST_NAME, filename_from_path(fd->change->dest), | 1150 UTILITY_COLUMN_DEST_NAME, filename_from_path(fd->change->dest), |
1151 -1); | 1151 -1); |
1152 g_free(dest); | 1152 g_free(dest); |
1283 { | 1283 { |
1284 FileDialog *fdlg; | 1284 FileDialog *fdlg; |
1285 GtkWidget *label; | 1285 GtkWidget *label; |
1286 const gchar *stock_id; | 1286 const gchar *stock_id; |
1287 | 1287 |
1288 if (ud->type == UTILITY_TYPE_COPY) | 1288 if (ud->type == UTILITY_TYPE_COPY) |
1289 { | 1289 { |
1290 stock_id = GTK_STOCK_COPY; | 1290 stock_id = GTK_STOCK_COPY; |
1291 } | 1291 } |
1292 else | 1292 else |
1293 { | 1293 { |
1898 | 1898 |
1899 ud->messages.title = _("Delete folder"); | 1899 ud->messages.title = _("Delete folder"); |
1900 ud->messages.question = _("Delete symbolic link?"); | 1900 ud->messages.question = _("Delete symbolic link?"); |
1901 ud->messages.desc_flist = ""; | 1901 ud->messages.desc_flist = ""; |
1902 ud->messages.desc_source_fd = _("This will delete the symbolic link.\n" | 1902 ud->messages.desc_source_fd = _("This will delete the symbolic link.\n" |
1903 "The folder this link points to will not be deleted."); | 1903 "The folder this link points to will not be deleted."); |
1904 ud->messages.fail = _("Link deletion failed"); | 1904 ud->messages.fail = _("Link deletion failed"); |
1905 | 1905 |
1906 file_util_dialog_run(ud); | 1906 file_util_dialog_run(ud); |
1907 return; | 1907 return; |
1908 } | 1908 } |
1970 | 1970 |
1971 ud->messages.title = _("Delete folder"); | 1971 ud->messages.title = _("Delete folder"); |
1972 ud->messages.question = _("Delete folder?"); | 1972 ud->messages.question = _("Delete folder?"); |
1973 ud->messages.desc_flist = _("The folder contains these files:"); | 1973 ud->messages.desc_flist = _("The folder contains these files:"); |
1974 ud->messages.desc_source_fd = _("This will delete the folder.\n" | 1974 ud->messages.desc_source_fd = _("This will delete the folder.\n" |
1975 "The contents of this folder will also be deleted."); | 1975 "The contents of this folder will also be deleted."); |
1976 ud->messages.fail = _("File deletion failed"); | 1976 ud->messages.fail = _("File deletion failed"); |
1977 | 1977 |
1978 if (!file_util_delete_dir_prepare(ud, flist, dlist)) | 1978 if (!file_util_delete_dir_prepare(ud, flist, dlist)) |
1979 { | 1979 { |
1980 gchar *text; | 1980 gchar *text; |
2076 file_data_sc_free_ci(fd); | 2076 file_data_sc_free_ci(fd); |
2077 } | 2077 } |
2078 } | 2078 } |
2079 | 2079 |
2080 return ok; | 2080 return ok; |
2081 } | 2081 } |
2082 | 2082 |
2083 | 2083 |
2084 static void file_util_rename_dir_full(FileData *fd, const char *new_path, GtkWidget *parent, UtilityPhase phase) | 2084 static void file_util_rename_dir_full(FileData *fd, const char *new_path, GtkWidget *parent, UtilityPhase phase) |
2085 { | 2085 { |
2086 UtilityData *ud; | 2086 UtilityData *ud; |
2123 ud->dir_fd = NULL; | 2123 ud->dir_fd = NULL; |
2124 ud->flist = NULL; | 2124 ud->flist = NULL; |
2125 ud->content_list = NULL; | 2125 ud->content_list = NULL; |
2126 ud->parent = parent; | 2126 ud->parent = parent; |
2127 | 2127 |
2128 if (dest_path) | 2128 if (dest_path) |
2129 { | 2129 { |
2130 ud->dest_path = g_strdup(dest_path); | 2130 ud->dest_path = g_strdup(dest_path); |
2131 } | 2131 } |
2132 else | 2132 else |
2133 { | 2133 { |