Mercurial > geeqie
comparison src/editors.c @ 283:e213fb025621
GQVIEW_* -> GQ_*
author | zas_ |
---|---|
date | Tue, 08 Apr 2008 23:16:12 +0000 |
parents | 9995c5fb202a |
children | d1f74154463e |
comparison
equal
deleted
inserted
replaced
282:c2cb12def9d6 | 283:e213fb025621 |
---|---|
53 EditorCallback callback; | 53 EditorCallback callback; |
54 gpointer data; | 54 gpointer data; |
55 }; | 55 }; |
56 | 56 |
57 | 57 |
58 static gchar *editor_slot_defaults[GQVIEW_EDITOR_SLOTS * 2] = { | 58 static gchar *editor_slot_defaults[GQ_EDITOR_SLOTS * 2] = { |
59 N_("The Gimp"), "gimp-remote -n %{.cr2;.crw;.nef;.raw;*}f", | 59 N_("The Gimp"), "gimp-remote -n %{.cr2;.crw;.nef;.raw;*}f", |
60 N_("XV"), "xv %f", | 60 N_("XV"), "xv %f", |
61 N_("Xpaint"), "xpaint %f", | 61 N_("Xpaint"), "xpaint %f", |
62 N_("UFraw"), "ufraw %{.cr2;.crw;.nef;.raw}p", | 62 N_("UFraw"), "ufraw %{.cr2;.crw;.nef;.raw}p", |
63 N_("Add XMP sidecar"), "%vFILE=%{.cr2;.crw;.nef;.raw}p;XMP=`echo \"$FILE\"|sed -e 's|\\.[^.]*$|.xmp|'`; exiftool -tagsfromfile \"$FILE\" \"$XMP\"", | 63 N_("Add XMP sidecar"), "%vFILE=%{.cr2;.crw;.nef;.raw}p;XMP=`echo \"$FILE\"|sed -e 's|\\.[^.]*$|.xmp|'`; exiftool -tagsfromfile \"$FILE\" \"$XMP\"", |
96 | 96 |
97 void editor_reset_defaults(void) | 97 void editor_reset_defaults(void) |
98 { | 98 { |
99 gint i; | 99 gint i; |
100 | 100 |
101 for (i = 0; i < GQVIEW_EDITOR_SLOTS; i++) | 101 for (i = 0; i < GQ_EDITOR_SLOTS; i++) |
102 { | 102 { |
103 g_free(editor_name[i]); | 103 g_free(editor_name[i]); |
104 editor_name[i] = g_strdup(_(editor_slot_defaults[i * 2])); | 104 editor_name[i] = g_strdup(_(editor_slot_defaults[i * 2])); |
105 g_free(editor_command[i]); | 105 g_free(editor_command[i]); |
106 editor_command[i] = g_strdup(editor_slot_defaults[i * 2 + 1]); | 106 editor_command[i] = g_strdup(editor_slot_defaults[i * 2 + 1]); |
782 gint start_editor_from_filelist_full(gint n, GList *list, EditorCallback cb, gpointer data) | 782 gint start_editor_from_filelist_full(gint n, GList *list, EditorCallback cb, gpointer data) |
783 { | 783 { |
784 gchar *command; | 784 gchar *command; |
785 gint error; | 785 gint error; |
786 | 786 |
787 if (n < 0 || n >= GQVIEW_EDITOR_SLOTS || !list || | 787 if (n < 0 || n >= GQ_EDITOR_SLOTS || !list || |
788 !editor_command[n] || | 788 !editor_command[n] || |
789 strlen(editor_command[n]) == 0) return FALSE; | 789 strlen(editor_command[n]) == 0) return FALSE; |
790 | 790 |
791 command = g_locale_from_utf8(editor_command[n], -1, NULL, NULL, NULL); | 791 command = g_locale_from_utf8(editor_command[n], -1, NULL, NULL, NULL); |
792 error = editor_command_start(command, editor_name[n], list, cb, data); | 792 error = editor_command_start(command, editor_name[n], list, cb, data); |
818 return start_editor_from_file_full(n, fd, NULL, NULL); | 818 return start_editor_from_file_full(n, fd, NULL, NULL); |
819 } | 819 } |
820 | 820 |
821 gint editor_window_flag_set(gint n) | 821 gint editor_window_flag_set(gint n) |
822 { | 822 { |
823 if (n < 0 || n >= GQVIEW_EDITOR_SLOTS || | 823 if (n < 0 || n >= GQ_EDITOR_SLOTS || |
824 !editor_command[n] || | 824 !editor_command[n] || |
825 strlen(editor_command[n]) == 0) return TRUE; | 825 strlen(editor_command[n]) == 0) return TRUE; |
826 | 826 |
827 return (editor_command_parse(editor_command[n], NULL, NULL) & EDITOR_KEEP_FS); | 827 return (editor_command_parse(editor_command[n], NULL, NULL) & EDITOR_KEEP_FS); |
828 } | 828 } |