Enlightenment CVS committal

Author  : atmosphere
Project : e17
Module  : apps/entice

Dir     : e17/apps/entice/src/bin


Modified Files:
        entice.c entice.h prefs.c prefs.h signals_image.c 
        signals_image.h 


Log Message:
rm ~/.e/apps/entice/config.db; rerun autogen, and try the e key.  you can now send the 
current file to an image editor, like the gimp. the executable is a config opt, it 
tries to autodetect gimp-remote-2.0, it's a modified implementation of a patch I 
received from C. Wehrfritz.  I found it to be pretty useful, and it retains exif tags 
if you rotate images :)  The image filesize shrinks like crazy after it's saved in the 
gimp.  Don't know what kind of quality loss(if any) is happening
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entice/src/bin/entice.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -3 -r1.60 -r1.61
--- entice.c    7 Aug 2004 01:39:42 -0000       1.60
+++ entice.c    7 Sep 2004 03:49:35 -0000       1.61
@@ -50,6 +50,7 @@
       "entice,image,current,remove",
       "entice,image,next",
       "entice,image,prev",
+      "entice,image,current,edit",
       "entice,image,current,zoom,in",
       "entice,image,current,zoom,out",
       "entice,image,current,zoom,in,focused",
@@ -69,21 +70,24 @@
       "entice,thumbnail,scroll,stop",
       "entice,window,fit,image",
       "entice,window,fullscreen",
-      "entice,quit", NULL
+      "entice,quit",
+      "entice,debug", NULL
    };
    void (*funcs[]) (void *data, Evas_Object * o, const char *emission,
                     const char *source) =
    {
    _entice_delete_current, _entice_remove_current, _entice_image_next,
-         _entice_image_prev, _entice_zoom_in, _entice_zoom_out,
-         _entice_zoom_in_focused, _entice_zoom_out_focused,
-         _entice_zoom_default, _entice_zoom_fit, _entice_rotate_left,
-         _entice_rotate_right, _entice_flip_horizontal,
-         _entice_flip_vertical, _entice_image_align_seek,
-         _entice_image_align_drag, _entice_image_modified,
-         _entice_image_save, _entice_thumbs_scroll_next_start,
+         _entice_image_prev, _entice_image_edit, _entice_zoom_in,
+         _entice_zoom_out, _entice_zoom_in_focused,
+         _entice_zoom_out_focused, _entice_zoom_default, _entice_zoom_fit,
+         _entice_rotate_left, _entice_rotate_right,
+         _entice_flip_horizontal, _entice_flip_vertical,
+         _entice_image_align_seek, _entice_image_align_drag,
+         _entice_image_modified, _entice_image_save,
+         _entice_thumbs_scroll_next_start,
          _entice_thumbs_scroll_prev_start, _entice_thumbs_scroll_stop,
-         _entice_fit_window, _entice_fullscreen, _entice_quit, NULL};
+         _entice_fit_window, _entice_fullscreen, _entice_quit,
+         _entice_image_signal_debug, NULL};
    count = sizeof(signals) / sizeof(char *);
    for (i = 0; i < count; i++)
       edje_object_signal_callback_add(o, signals[i], "*", funcs[i], NULL);
@@ -967,6 +971,24 @@
    }
 }
 void
+entice_image_edit(void)
+{
+   char buf[PATH_MAX];
+
+   if (entice && entice->current)
+   {
+      if (entice_config_editor_get()
+          && entice_image_file_get(entice->current))
+      {
+         snprintf(buf, PATH_MAX, "%s %s", entice_config_editor_get(),
+                  entice_image_file_get(entice->current));
+         ecore_exe_run(buf, NULL);
+         edje_object_signal_emit(entice->edje,
+                                 "entice,image,current,edit,sent", "");
+      }
+   }
+}
+void
 entice_flip_vertical(void)
 {
    if (entice && entice->current)
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entice/src/bin/entice.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- entice.h    7 Apr 2004 21:16:03 -0000       1.16
+++ entice.h    7 Sep 2004 03:49:35 -0000       1.17
@@ -26,7 +26,7 @@
 
    Ecore_Evas *ee;              /* the evas window */
    Evas_Object *edje;           /* Main Edje_Object(theme) */
-   Evas_Object *current;        /* Object currently visible */
+   Evas_Object *current;        /* EnticeImage Object currently visible */
    Evas_Object *preview;        /* E_Thumb */
    Evas_Object *scroller;       /* E_Thumb */
    Evas_Object *container;      /* thumbnail container the edje swallows */
@@ -76,5 +76,6 @@
 
 void entice_image_horizontal_align_set(double align);
 void entice_image_vertical_align_set(double align);
+void entice_image_edit(void);
 
 #endif
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entice/src/bin/prefs.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- prefs.c     3 Apr 2004 02:47:59 -0000       1.17
+++ prefs.c     7 Sep 2004 03:49:35 -0000       1.18
@@ -10,7 +10,6 @@
 #include <unistd.h>
 
 #include "../config.h"
-/* #define PACKAGE_DATA_DIR "/usr/share/entice" */
 
 static Entice_Config *econfig = NULL;
 
@@ -61,6 +60,20 @@
 }
 
 /**
+ * entice_config_editor_get - get the path to the executable, DO NOT FREE THIS
+ * Returns - absolute path to the editor's executable
+ */
+const char *
+entice_config_editor_get(void)
+{
+   char *result = NULL;
+
+   if (econfig && econfig->editor)
+      result = econfig->editor;
+   return (result);
+}
+
+/**
  * entice_config_theme_get - get the theme name, DO NOT FREE THIS
  * Returns - absolute path to the theme's eet
  */
@@ -207,6 +220,12 @@
                   free(econfig->theme);
                econfig->theme = str;
             }
+            if ((str = e_db_str_get(db, "/entice/editor")))
+            {
+               if (econfig->editor)
+                  free(econfig->editor);
+               econfig->editor = str;
+            }
             if (!e_db_int_get(db, "/entice/engine", &econfig->engine))
                econfig->engine = SOFTWARE_X11;
             if (!e_db_int_get
@@ -290,11 +309,12 @@
       "entice,quit", "entice,image,current,rotate,left",
       "entice,image,current,rotate,right",
       "entice,image,current,flip,horizontal",
-      "entice,image,current,flip,vertical", "entice,image,current,remove"
+      "entice,image,current,flip,vertical", "entice,image,current,remove",
+      "entice,image,current,edit"
    };
    char *keys[] =
       { "equal", "minus", "f", "space", "BackSpace", "n", "w", "q", "Left",
-      "Right", "Up", "Down", "d"
+      "Right", "Up", "Down", "d", "e"
    };
    count = sizeof(signals) / sizeof(char *);
 
@@ -311,7 +331,11 @@
       {
          e_db_str_set(db, "/entice/theme", "default.eet");
          e_db_int_set(db, "/entice/engine", 0);
-
+#ifndef GIMP_REMOTE_BIN
+         e_db_str_set(db, "/entice/editor", "");
+#else
+         e_db_str_set(db, "/entice/editor", GIMP_REMOTE_BIN);
+#endif
          for (i = 0; i < count; i++)
          {
             snprintf(buf, PATH_MAX, "/entice/keys/up/%i/symbol", i);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entice/src/bin/prefs.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- prefs.h     22 Jan 2004 19:39:13 -0000      1.6
+++ prefs.h     7 Sep 2004 03:49:36 -0000       1.7
@@ -15,6 +15,8 @@
 {
    char *theme;
    char *db;
+   char *editor;
+
    int engine;
    int image_quality;
 
@@ -43,5 +45,6 @@
 void entice_config_geometry_get(int *x, int *y, int *w, int *h);
 void entice_config_geometry_set(int x, int y, int w, int h);
 int entice_config_image_quality_get(void);
+const char *entice_config_editor_get(void);
 
 #endif
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entice/src/bin/signals_image.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- signals_image.c     27 Apr 2004 23:06:24 -0000      1.13
+++ signals_image.c     7 Sep 2004 03:49:36 -0000       1.14
@@ -514,3 +514,17 @@
       entice_image_vertical_align_set(dy);
    }
 }
+
+void
+_entice_image_signal_debug(void *data, Evas_Object * o, const char *emission,
+                           const char *source)
+{
+   fprintf(stderr, "Emission: %s - Source: %s\n", emission, source);
+}
+
+void
+_entice_image_edit(void *data, Evas_Object * o, const char *emission,
+                   const char *source)
+{
+   entice_image_edit();
+}
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entice/src/bin/signals_image.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- signals_image.h     7 Apr 2004 21:16:04 -0000       1.6
+++ signals_image.h     7 Sep 2004 03:49:36 -0000       1.7
@@ -66,4 +66,8 @@
                               const char *emission, const char *source);
 void _entice_image_align_seek(void *data, Evas_Object * o,
                               const char *emission, const char *source);
+void _entice_image_signal_debug(void *data, Evas_Object * o,
+                                const char *emission, const char *source);
+void _entice_image_edit(void *data, Evas_Object * o, const char *emission,
+                        const char *source);
 #endif




-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to