comparison src/utilops.c @ 1405:03384485676d

Introduce EditorFlags type, cleanup.
author zas_
date Sun, 08 Mar 2009 23:12:49 +0000
parents 67573155210c
children 67b40740122e
comparison
equal deleted inserted replaced
1404:de06d83e1adc 1405:03384485676d
473 } 473 }
474 474
475 475
476 static gboolean file_util_perform_ci_internal(gpointer data); 476 static gboolean file_util_perform_ci_internal(gpointer data);
477 void file_util_dialog_run(UtilityData *ud); 477 void file_util_dialog_run(UtilityData *ud);
478 static gint file_util_perform_ci_cb(gpointer resume_data, gint flags, GList *list, gpointer data); 478 static gint file_util_perform_ci_cb(gpointer resume_data, EditorFlags flags, GList *list, gpointer data);
479 479
480 /* call file_util_perform_ci_internal or start_editor_from_filelist_full */ 480 /* call file_util_perform_ci_internal or start_editor_from_filelist_full */
481 481
482 482
483 static void file_util_resume_cb(GenericDialog *gd, gpointer data) 483 static void file_util_resume_cb(GenericDialog *gd, gpointer data)
498 file_util_perform_ci_cb(NULL, EDITOR_ERROR_SKIPPED, ud->flist, ud); 498 file_util_perform_ci_cb(NULL, EDITOR_ERROR_SKIPPED, ud->flist, ud);
499 499
500 } 500 }
501 501
502 502
503 static gint file_util_perform_ci_cb(gpointer resume_data, gint flags, GList *list, gpointer data) 503 static gint file_util_perform_ci_cb(gpointer resume_data, EditorFlags flags, GList *list, gpointer data)
504 { 504 {
505 UtilityData *ud = data; 505 UtilityData *ud = data;
506 gint ret = EDITOR_CB_CONTINUE; 506 gint ret = EDITOR_CB_CONTINUE;
507 507
508 ud->resume_data = resume_data; 508 ud->resume_data = resume_data;
610 gint ret; 610 gint ret;
611 611
612 /* take a single entry each time, this allows better control over the operation */ 612 /* take a single entry each time, this allows better control over the operation */
613 GList *single_entry = g_list_append(NULL, ud->flist->data); 613 GList *single_entry = g_list_append(NULL, ud->flist->data);
614 gboolean last = !ud->flist->next; 614 gboolean last = !ud->flist->next;
615 gint status = EDITOR_ERROR_STATUS; 615 EditorFlags status = EDITOR_ERROR_STATUS;
616 616
617 if (ud->with_sidecars ? file_data_sc_perform_ci(single_entry->data) 617 if (ud->with_sidecars ? file_data_sc_perform_ci(single_entry->data)
618 : file_data_perform_ci(single_entry->data)) 618 : file_data_perform_ci(single_entry->data))
619 status = 0; /* OK */ 619 status = 0; /* OK */
620 620
788 } 788 }
789 ud->phase = UTILITY_PHASE_DONE; 789 ud->phase = UTILITY_PHASE_DONE;
790 file_util_dialog_run(ud); 790 file_util_dialog_run(ud);
791 } 791 }
792 792
793 static gint file_util_perform_ci_dir_cb(gpointer resume_data, gint flags, GList *list, gpointer data) 793 static gint file_util_perform_ci_dir_cb(gpointer resume_data, EditorFlags flags, GList *list, gpointer data)
794 { 794 {
795 UtilityData *ud = data; 795 UtilityData *ud = data;
796 file_util_perform_ci_dir(ud, FALSE, !EDITOR_ERRORS_BUT_SKIPPED(flags)); 796 file_util_perform_ci_dir(ud, FALSE, !EDITOR_ERRORS_BUT_SKIPPED(flags));
797 return EDITOR_CB_CONTINUE; /* does not matter, there was just single directory */ 797 return EDITOR_CB_CONTINUE; /* does not matter, there was just single directory */
798 } 798 }
827 ud->external_command = NULL; 827 ud->external_command = NULL;
828 } 828 }
829 829
830 if (is_valid_editor_command(ud->external_command)) 830 if (is_valid_editor_command(ud->external_command))
831 { 831 {
832 gint flags; 832 EditorFlags flags;
833 833
834 ud->external = TRUE; 834 ud->external = TRUE;
835 835
836 if (ud->dir_fd) 836 if (ud->dir_fd)
837 { 837 {