diff src/typedefs.h @ 1272:e0e12512cde2

read external editors from .desktop files
author nadvornik
date Sun, 01 Feb 2009 12:48:14 +0000
parents 30e207ac22e4
children 93df70312ccd
line wrap: on
line diff
--- a/src/typedefs.h	Thu Jan 29 19:43:34 2009 +0000
+++ b/src/typedefs.h	Sun Feb 01 12:48:14 2009 +0000
@@ -38,14 +38,11 @@
 	FILEVIEW_ICON
 } FileViewType;
 
-typedef enum {
-	CMD_COPY = GQ_EDITOR_GENERIC_SLOTS,
-	CMD_MOVE,
-	CMD_RENAME,
-	CMD_DELETE,
-	CMD_FOLDER,
-	GQ_EDITOR_SLOTS
-} SpecialEditor;
+#define	CMD_COPY     "geeqie-copy-command.desktop"
+#define	CMD_MOVE     "geeqie-move-command.desktop"
+#define	CMD_RENAME   "geeqie-rename-command.desktop"
+#define	CMD_DELETE   "geeqie-delete-command.desktop"
+#define	CMD_FOLDER   "geeqie-folder-command.desktop"
 
 typedef enum {
 	SORT_NONE,
@@ -202,12 +199,22 @@
 
 typedef struct _ExifData ExifData;
 
-typedef struct _Editor Editor;
-struct _Editor {
-	gchar *name;
-	gchar *command;
+typedef struct _EditorDescription EditorDescription;
+
+struct _EditorDescription {
+	gchar *key; /* desktop file name, not including path, including extension */
+	gchar *name; /* localized name presented to user */
+	gchar *exec;
+	gchar *menu_path;
+	gchar *hotkey;
+	GList *ext_list;
+	gchar *icon;
+	gchar *file;
+	gint flags;
+	gboolean hidden;
 };
 
+
 struct _ImageLoader;
 
 typedef void (* ThumbLoaderFunc)(ThumbLoader *tl, gpointer data);
@@ -745,6 +752,5 @@
 	gint unlink_on_error; /**< whether to remove temporary file on save failure, TRUE by default */
 };
 
-
 #endif
 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */