read external editors from .desktop files
[geeqie.git] / src / typedefs.h
index 96e4d31..16548db 100644 (file)
@@ -38,14 +38,11 @@ typedef enum {
        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 _SecureSaveInfo SecureSaveInfo;
 
 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 @@ struct _SecureSaveInfo {
        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: */