comparison src/editors.c @ 136:18c2a29e681c

more external commands
author nadvornik
date Mon, 20 Aug 2007 20:11:32 +0000
parents 15c1925b3bfb
children 71e1ebee420e
comparison
equal deleted inserted replaced
135:15c1925b3bfb 136:18c2a29e681c
56 NULL, NULL, 56 NULL, NULL,
57 NULL, NULL, 57 NULL, NULL,
58 N_("Rotate jpeg clockwise"), "%vif jpegtran -rotate 90 -copy all -outfile %p_tmp %p; then mv %p_tmp %p;else rm %p_tmp;fi", 58 N_("Rotate jpeg clockwise"), "%vif jpegtran -rotate 90 -copy all -outfile %p_tmp %p; then mv %p_tmp %p;else rm %p_tmp;fi",
59 N_("Rotate jpeg counterclockwise"), "%vif jpegtran -rotate 270 -copy all -outfile %p_tmp %p; then mv %p_tmp %p;else rm %p_tmp;fi", 59 N_("Rotate jpeg counterclockwise"), "%vif jpegtran -rotate 270 -copy all -outfile %p_tmp %p; then mv %p_tmp %p;else rm %p_tmp;fi",
60 /* special slots */ 60 /* special slots */
61 #if 1
62 /* for testing */
63 "External Copy command", "%vset -x;cp %f",
64 "External Move command", "%vset -x;mv %f",
65 "External Rename command", "%vset -x;mv %f",
66 "External Delete command", "%vset -x;rm %f",
67 "External New Folder command", NULL
68 #else
61 "External Copy command", NULL, 69 "External Copy command", NULL,
62 "External Move command", NULL, 70 "External Move command", NULL,
63 "External Rename command", NULL, 71 "External Rename command", NULL,
64 "External Delete command", NULL, 72 "External Delete command", NULL,
65 "External New Folder command", NULL 73 "External New Folder command", NULL
74 #endif
66 }; 75 };
67 76
68 static void editor_verbose_window_progress(EditorVerboseData *vd, const gchar *text); 77 static void editor_verbose_window_progress(EditorVerboseData *vd, const gchar *text);
69 static gint editor_command_next(EditorVerboseData *vd); 78 static gint editor_command_next(EditorVerboseData *vd);
70 79
627 ret = start_editor_from_path_list(n, list); 636 ret = start_editor_from_path_list(n, list);
628 g_list_free(list); 637 g_list_free(list);
629 return ret; 638 return ret;
630 } 639 }
631 640
641 gint start_editor_from_pair(gint n, const gchar *source, const gchar *target)
642 {
643 GList *list;
644 gint ret;
645
646 if (!source) return FALSE;
647 if (!target) return FALSE;
648
649 list = g_list_append(NULL, (gchar *)source);
650 list = g_list_append(list, (gchar *)target);
651 ret = start_editor_from_path_list(n, list);
652 g_list_free(list);
653 return ret;
654 }
655
632 gint editor_window_flag_set(gint n) 656 gint editor_window_flag_set(gint n)
633 { 657 {
634 if (n < 0 || n >= GQVIEW_EDITOR_SLOTS || 658 if (n < 0 || n >= GQVIEW_EDITOR_SLOTS ||
635 !editor_command[n] || 659 !editor_command[n] ||
636 strlen(editor_command[n]) == 0) return TRUE; 660 strlen(editor_command[n]) == 0) return TRUE;