diff src/editors.c @ 136:18c2a29e681c

more external commands
author nadvornik
date Mon, 20 Aug 2007 20:11:32 +0000
parents 15c1925b3bfb
children 71e1ebee420e
line wrap: on
line diff
--- a/src/editors.c	Thu Aug 16 20:57:09 2007 +0000
+++ b/src/editors.c	Mon Aug 20 20:11:32 2007 +0000
@@ -58,11 +58,20 @@
 	N_("Rotate jpeg clockwise"), "%vif jpegtran -rotate 90 -copy all -outfile %p_tmp %p; then mv %p_tmp %p;else rm %p_tmp;fi",
 	N_("Rotate jpeg counterclockwise"), "%vif jpegtran -rotate 270 -copy all -outfile %p_tmp %p; then mv %p_tmp %p;else rm %p_tmp;fi",
 	/* special slots */
+#if 1
+	/* for testing */
+	"External Copy command", "%vset -x;cp %f",
+	"External Move command", "%vset -x;mv %f",
+	"External Rename command", "%vset -x;mv %f",
+	"External Delete command", "%vset -x;rm %f",
+	"External New Folder command", NULL
+#else
 	"External Copy command", NULL,
 	"External Move command", NULL,
 	"External Rename command", NULL,
 	"External Delete command", NULL,
 	"External New Folder command", NULL
+#endif
 };
 
 static void editor_verbose_window_progress(EditorVerboseData *vd, const gchar *text);
@@ -629,6 +638,21 @@
 	return ret;
 }
 
+gint start_editor_from_pair(gint n, const gchar *source, const gchar *target)
+{
+	GList *list;
+	gint ret;
+
+	if (!source) return FALSE;
+	if (!target) return FALSE;
+
+	list = g_list_append(NULL, (gchar *)source);
+	list = g_list_append(list, (gchar *)target);
+	ret = start_editor_from_path_list(n, list);
+	g_list_free(list);
+	return ret;
+}
+
 gint editor_window_flag_set(gint n)
 {
 	if (n < 0 || n >= GQVIEW_EDITOR_SLOTS ||