E CVS: libs/evolve devilhorns

2007-10-23 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : devilhorns
Project : e17
Module  : libs/evolve

Dir : e17/libs/evolve/src/lib


Modified Files:
evolve_lib.c 


Log Message:
Fix evolve building against current etk.

===
RCS file: /cvs/e/e17/libs/evolve/src/lib/evolve_lib.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- evolve_lib.c19 Jul 2007 10:44:49 -  1.2
+++ evolve_lib.c23 Oct 2007 17:59:08 -  1.3
@@ -38,7 +38,7 @@
EET_DATA_DESCRIPTOR_ADD_SUB(_prop_def_val_edd, Etk_Property_Value, str, it, 
type)

 

 #define PROP_DEF_VAL_VALUE_NEWI(str, it, type) \

-   EET_DATA_DESCRIPTOR_ADD_BASIC(_prop_def_val_value_edd, 
Etk_Property_Value_Value, str, it, type)

+   EET_DATA_DESCRIPTOR_ADD_BASIC(_prop_def_val_value_edd, Etk_Property_Value, 
str, it, type)

 

 #define EVOLVE_WIDGET_PACKING_PROP_NEWI(str, it, type) \

EET_DATA_DESCRIPTOR_ADD_BASIC(_evolve_widget_packing_prop_edd, 
Evolve_Widget_Property, str, it, type)

@@ -88,15 +88,15 @@
evas_init();

ecore_file_init();



-   _prop_def_val_value_edd = NEWD(Etk_Property_Value_Value, 
Etk_Property_Value_Value);

-   PROP_DEF_VAL_VALUE_NEWI(iv, int_value, EET_T_INT);

-   PROP_DEF_VAL_VALUE_NEWI(ib, bool_value, EET_T_INT);

-   PROP_DEF_VAL_VALUE_NEWI(cv, char_value, EET_T_CHAR);

-   PROP_DEF_VAL_VALUE_NEWI(fv, float_value, EET_T_FLOAT);

-   PROP_DEF_VAL_VALUE_NEWI(dv, double_value, EET_T_DOUBLE);

-   PROP_DEF_VAL_VALUE_NEWI(sv, short_value, EET_T_SHORT);

-   PROP_DEF_VAL_VALUE_NEWI(lv, long_value, EET_T_LONG_LONG);

-   PROP_DEF_VAL_VALUE_NEWI(tv, string_value, EET_T_STRING);

+   _prop_def_val_value_edd = NEWD(Etk_Property_Value, Etk_Property_Value);

+   PROP_DEF_VAL_VALUE_NEWI(iv, value.int_value, EET_T_INT);

+   PROP_DEF_VAL_VALUE_NEWI(ib, value.bool_value, EET_T_INT);

+   PROP_DEF_VAL_VALUE_NEWI(cv, value.char_value, EET_T_CHAR);

+   PROP_DEF_VAL_VALUE_NEWI(fv, value.float_value, EET_T_FLOAT);

+   PROP_DEF_VAL_VALUE_NEWI(dv, value.double_value, EET_T_DOUBLE);

+   PROP_DEF_VAL_VALUE_NEWI(sv, value.short_value, EET_T_SHORT);

+   PROP_DEF_VAL_VALUE_NEWI(lv, value.long_value, EET_T_LONG_LONG);

+   PROP_DEF_VAL_VALUE_NEWI(tv, value.string_value, EET_T_STRING);



_prop_def_val_edd = NEWD(Etk_Property_Value, Etk_Property_Value);

PROP_DEF_VAL_NEWS(va, value, _prop_def_val_value_edd);




-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: apps/e morlenxus

2007-10-23 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : morlenxus
Project : e17
Module  : apps/e

Dir : e17/apps/e/src/modules/fileman


Modified Files:
e_fwin.c 


Log Message:
This adds an editable execute entry to the efm 'open with' dialog.
Btw. the opened apps don't get the selected files as argument (not broken by 
this patch).
Might fix that later...

===
RCS file: /cvs/e/e17/apps/e/src/modules/fileman/e_fwin.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- e_fwin.c22 Oct 2007 07:38:25 -  1.12
+++ e_fwin.c23 Oct 2007 21:57:15 -  1.13
@@ -50,6 +50,8 @@
E_Fwin *fwin;
char   *app1, *app2;
Evas_Object*o_ilist, *o_fm;
+   Evas_Object*o_entry;
+   char   *exec_cmd;
 };
 
 typedef enum
@@ -82,6 +84,7 @@
 static void _e_fwin_cb_ilist_selected(void *data, Evas_Object *obj, void 
*event_info);
 static void _e_fwin_cb_fm_selection_change(void *data, Evas_Object *obj, void 
*event_info);
 static void _e_fwin_cb_fm_selected(void *data, Evas_Object *obj, void 
*event_info);
+static void _e_fwin_cb_exec_cmd_changed(void *data, void *data2);
 static void _e_fwin_cb_open(void *data, E_Dialog *dia);
 static void _e_fwin_cb_close(void *data, E_Dialog *dia);
 static void _e_fwin_cb_dialog_free(void *obj);
@@ -702,6 +705,7 @@
 _e_fwin_cb_fm_selection_change(void *data, Evas_Object *obj, void *event_info)
 {
E_Fwin_Apps_Dialog *fad;
+   Efreet_Desktop *desktop = NULL;
Evas_List *sel;
E_Fm2_Icon_Info *ici;

@@ -709,11 +713,14 @@
E_FREE(fad-app1);
if (fad-o_ilist) e_widget_ilist_unselect(fad-o_ilist);
E_FREE(fad-app2);
+   e_widget_entry_text_set(fad-o_entry, NULL);
sel = e_fm2_selected_list_get(obj);
if (sel)
  {
ici = sel-data;
fad-app2 = strdup(ici-file);
+   desktop = efreet_util_desktop_file_id_find(ici-file);
+   if (desktop-exec) e_widget_entry_text_set(fad-o_entry, desktop-exec);
evas_list_free(sel);
  }
 }
@@ -728,6 +735,30 @@
 }
 
 static void
+_e_fwin_cb_exec_cmd_changed(void *data, void *data2)
+{
+   E_Fwin_Apps_Dialog *fad;
+   Efreet_Desktop *desktop;
+   
+   fad = data;
+   if (!fad) return;
+   if (!fad-app1  !fad-app2) return;
+
+   if (fad-app1) 
+ desktop = efreet_util_desktop_file_id_find(fad-app1);
+   else if (fad-app2) 
+ desktop = efreet_util_desktop_file_id_find(fad-app2);
+
+   if (!desktop) return;
+   if (!strcmp (desktop-exec, fad-exec_cmd)) return;
+
+   fad-app1 = NULL;
+   fad-app2 = NULL;
+   if (fad-o_ilist) e_widget_ilist_unselect(fad-o_ilist);
+   if (fad-o_fm) e_fm2_select_set(fad-o_fm, NULL, 0);
+}
+
+static void
 _e_fwin_cb_open(void *data, E_Dialog *dia)
 {
E_Fwin_Apps_Dialog *fad;
@@ -742,7 +773,7 @@
  desktop = efreet_util_desktop_file_id_find(fad-app1);
else if (fad-app2) 
  desktop = efreet_util_desktop_file_id_find(fad-app2);
-   if (desktop)
+   if (desktop || strcmp (fad-exec_cmd, ))
  {
getcwd(pcwd, sizeof(pcwd));
chdir(e_fm2_real_path_get(fad-fwin-fm_obj));
@@ -763,9 +794,7 @@
   */
  buf[0] = 0;
  ext = _e_fwin_file_is_exec(ici);
- if (ext != E_FWIN_EXEC_NONE)
-   _e_fwin_file_exec(fad-fwin, ici, ext);
- else
+ if (ext == E_FWIN_EXEC_NONE)
{
   if (!((ici-link)  (ici-mount)))
 {
@@ -781,18 +810,30 @@
  }
 }
}
+ else
+   _e_fwin_file_exec(fad-fwin, ici, ext);
  if (buf[0] != 0)
{
-  if (ici-mime)
+  if (ici-mime  desktop)
 e_exehist_mime_desktop_add(ici-mime, desktop);
   ecore_list_append(files, strdup(ici-file));
}
   }
 evas_list_free(selected);
 if (fad-fwin-win)
-  e_exec(fad-fwin-win-border-zone, desktop, NULL, files, 
fwin);
+  {
+ if (desktop)
+   e_exec(fad-fwin-win-border-zone, desktop, NULL, files, 
fwin);
+ else
+   e_exec(fad-fwin-win-border-zone, NULL, fad-exec_cmd, 
files, fwin);
+  }
 else if (fad-fwin-zone)
-  e_exec(fad-fwin-zone, desktop, NULL, files, fwin);
+  {
+ if (desktop)
+   e_exec(fad-fwin-zone, desktop, NULL, files, fwin);
+ else
+   e_exec(fad-fwin-zone, NULL, fad-exec_cmd, files, fwin);
+  }
 ecore_list_destroy(files);
  }
chdir(pcwd);
@@ -962,7 +1003,7 @@
E_Fwin *fwin2 = NULL;
E_Dialog *dia;
Evas_Coord mw, mh;
-   Evas_Object *o, *ocon, *of, *oi, *mt;

E CVS: libs/epsilon barbieri

2007-10-23 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/epsilon

Dir : e17/libs/epsilon/src/lib


Modified Files:
Epsilon.c epsilon_thumb.c 


Log Message:
Remove leaks and micro optimizations.

This patch remove some leaks and use of uninitialized memory (as
reported by valgrind on x86).

Also some micro-optimizations to handle strings/path creation better
and more uniformly, do bit less stats.

Code is also a bit cleaner.

===
RCS file: /cvs/e/e17/libs/epsilon/src/lib/Epsilon.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -3 -r1.37 -r1.38
--- Epsilon.c   1 Sep 2007 13:37:53 -   1.37
+++ Epsilon.c   23 Oct 2007 22:04:53 -  1.38
@@ -23,15 +23,24 @@
 #endif
 #define THUMB_SIZE_NORMAL 128
 #define THUMB_SIZE_LARGE 256
+#define THUMB_SIZE_FAIL -1
 #include exiftags/exif.h
 
 #include Ecore.h
 
 #include Evas.h
 #include Ecore_Evas.h
+#include Ecore_File.h
 #include Edje.h
 #include dlfcn.h
 
+static char *PATH_DIR_LARGE = NULL;
+static char *PATH_DIR_NORMAL = NULL;
+static char *PATH_DIR_FAIL = NULL;
+static unsigned LEN_DIR_LARGE = 0;
+static unsigned LEN_DIR_NORMAL = 0;
+static unsigned LEN_DIR_FAIL = 0;
+
 
 static Ecore_Hash* plugins_mime;
 
@@ -45,10 +54,11 @@
  */
 extern Epsilon_Exif_Info *epsilon_exif_info_get (Epsilon * e);
 
+static int _epsilon_exists_ext(Epsilon *e, const char *ext, char *path, int 
path_size, time_t *mtime);
 static char *epsilon_hash (const char *file);
-static int _epsilon_png_mtime_get (const char *file);
+static time_t _epsilon_png_mtime_get (const char *file);
 #ifdef HAVE_EPEG_H
-static int _epsilon_jpg_mtime_get (const char *file);
+static time_t _epsilon_jpg_mtime_get (const char *file);
 #endif
 #ifdef HAVE_PNG_H
 static FILE *_epsilon_open_png_file_reading (const char *filename);
@@ -91,6 +101,8 @@
free (e-hash);
   if (e-src)
free (e-src);
+  if (e-thumb)
+   free (e-thumb);
   free (e);
 }
 }
@@ -112,16 +124,12 @@
return plugin;
 }
 
-
 EAPI void
 epsilon_init (void)
 {
-  int i = 0;
-  struct stat status;
   char buf[PATH_MAX];
-  const char *dirs[] = { .thumbnails, .thumbnails/normal,
-.thumbnails/large, .thumbnails/fail
-  };
+  int base_len;
+  char *home;
 
struct dirent *de;
char* type;
@@ -129,14 +137,27 @@
Epsilon_Plugin *plugin;
char plugin_path[1024];
 
-  for (i = 0; i  4; i++)
-{
-  snprintf (buf, sizeof(buf), %s/%s, getenv (HOME), dirs[i]);
-  if (!stat (buf, status))
-   continue;
-  else
-   mkdir (buf, S_IRUSR | S_IWUSR | S_IXUSR);
-}
+  home = getenv(HOME);
+  base_len = snprintf(buf, sizeof(buf), %s/.thumbnails, home);
+  if (!PATH_DIR_LARGE) {
+ strncpy(buf + base_len, /large, PATH_MAX - base_len);
+ PATH_DIR_LARGE = strdup(buf);
+ LEN_DIR_LARGE = strlen(buf);
+  }
+  if (!PATH_DIR_NORMAL) {
+ strncpy(buf + base_len, /normal, PATH_MAX - base_len);
+ PATH_DIR_NORMAL = strdup(buf);
+ LEN_DIR_NORMAL = strlen(buf);
+  }
+  if (!PATH_DIR_FAIL) {
+ strncpy(buf + base_len, /fail/epsilon, PATH_MAX - base_len);
+ PATH_DIR_FAIL = strdup(buf);
+ LEN_DIR_FAIL = strlen(buf);
+  }
+
+  ecore_file_mkpath(PATH_DIR_LARGE);
+  ecore_file_mkpath(PATH_DIR_NORMAL);
+  ecore_file_mkpath(PATH_DIR_FAIL);
 
   plugins_mime = ecore_hash_new(ecore_str_hash, ecore_str_compare);
 
@@ -199,41 +220,28 @@
 EAPI const char *
 epsilon_thumb_file_get (Epsilon * e)
 {
-  int i = 0;
-  struct stat status;
+  time_t mtime;
   char buf[PATH_MAX];
-  const char *dirs[] = { .thumbnails/normal, .thumbnails/large,
-.thumbnails/fail
-  };
 
   if (!e)
 return (NULL);
   if (e-thumb)
 return (e-thumb);
-  for (i = 0; i  3; i++)
-{
 #ifdef HAVE_EPEG_H
-  snprintf (buf, sizeof(buf), %s/%s/%s.jpg, getenv (HOME), dirs[i],
-   e-hash);
-  if (stat (buf, status) == 0)
-   {
- e-thumb = strdup (buf);
- break;
-   }
+  if (_epsilon_exists_ext(e, jpg, buf, sizeof(buf), mtime))
+{
+   e-thumb = strdup(buf);
+   return (e-thumb);
+}
 #endif
 #ifdef HAVE_PNG_H
-  snprintf (buf, sizeof(buf), %s/%s/%s.png, getenv (HOME), dirs[i],
-   e-hash);
-  if (stat (buf, status) == 0)
-   {
- if (e-thumb)
-   free (e-thumb);
- e-thumb = strdup (buf);
- break;
-   }
-#endif
+  if (_epsilon_exists_ext(e, png, buf, sizeof(buf), mtime))
+{
+   e-thumb = strdup (buf);
+   return (e-thumb);
 }
-  return (e-thumb);
+#endif
+  return (NULL);
 }
 
 static char *
@@ -416,99 +424,116 @@
else return NULL;
 }
 
+static void
+_epsilon_file_name(unsigned thumb_size, const char *hash, const char *ext, 
char *path, int path_size)
+{
+   char *dir;
+   int dir_len;
+
+   if (thumb_size == THUMB_SIZE_LARGE)
+ {
+   dir = PATH_DIR_LARGE;
+   dir_len = LEN_DIR_LARGE;
+ }
+   else if (thumb_size == 

E CVS: libs/epsilon barbieri

2007-10-23 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/epsilon

Dir : e17/libs/epsilon/src/bin


Modified Files:
epsilon_thumb_test.c epsilon_thumbd.c 


Log Message:
Remove leaks and micro optimizations.

This patch remove some leaks and use of uninitialized memory (as
reported by valgrind on x86).

Also some micro-optimizations to handle strings/path creation better
and more uniformly, do bit less stats.

Code is also a bit cleaner.

===
RCS file: /cvs/e/e17/libs/epsilon/src/bin/epsilon_thumb_test.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- epsilon_thumb_test.c29 Jul 2007 00:38:09 -  1.7
+++ epsilon_thumb_test.c23 Oct 2007 22:04:53 -  1.8
@@ -69,6 +69,7 @@
}
free(realpath);
}
+   ecore_list_destroy(files);
 
ecore_main_loop_begin();
 
===
RCS file: /cvs/e/e17/libs/epsilon/src/bin/epsilon_thumbd.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- epsilon_thumbd.c3 Aug 2007 02:20:05 -   1.9
+++ epsilon_thumbd.c23 Oct 2007 22:04:53 -  1.10
@@ -121,6 +121,7 @@
buf = epsilond_socket_path(EPSILOND_SOCK);
 
if (debug) printf(socket name %s\n, buf);
+   free(buf);
 
/*
 * Setup the IPC server to handle completed notifications
@@ -242,6 +243,7 @@
 *  Free thumbnail data associated with this client.
 */
epsilond_client_clean(cl);
+   free(cl);
 
break;
}
@@ -279,6 +281,7 @@
 *  Free thumbnail data associated with this client.
 */
epsilond_client_clean(cl);
+   free(cl);
 
break;
}



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/epsilon barbieri

2007-10-23 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/epsilon

Dir : e17/libs/epsilon/src/include


Modified Files:
epsilon_private.h 


Log Message:
Remove leaks and micro optimizations.

This patch remove some leaks and use of uninitialized memory (as
reported by valgrind on x86).

Also some micro-optimizations to handle strings/path creation better
and more uniformly, do bit less stats.

Code is also a bit cleaner.

===
RCS file: /cvs/e/e17/libs/epsilon/src/include/epsilon_private.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- epsilon_private.h   24 Sep 2006 12:52:07 -  1.3
+++ epsilon_private.h   23 Oct 2007 22:04:53 -  1.4
@@ -28,7 +28,6 @@
unsigned int status;
unsigned int thumbsize;
unsigned int bufsize;
-   struct Epsilon_Client* cl;
 };
 
 typedef struct Epsilon_Ipc_End Epsilon_Ipc_End;



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: apps/e devilhorns

2007-10-23 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : devilhorns
Project : e17
Module  : apps/e

Dir : e17/apps/e/src/modules/fileman


Modified Files:
e_fwin.c 


Log Message:
Formatting fixes.

===
RCS file: /cvs/e/e17/apps/e/src/modules/fileman/e_fwin.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- e_fwin.c23 Oct 2007 21:57:15 -  1.13
+++ e_fwin.c23 Oct 2007 22:40:54 -  1.14
@@ -46,12 +46,12 @@
 
 struct _E_Fwin_Apps_Dialog
 {
-   E_Dialog   *dia;
-   E_Fwin *fwin;
-   char   *app1, *app2;
-   Evas_Object*o_ilist, *o_fm;
-   Evas_Object*o_entry;
-   char   *exec_cmd;
+   E_Dialog*dia;
+   E_Fwin  *fwin;
+   char*app1, *app2;
+   Evas_Object *o_ilist, *o_fm;
+   Evas_Object *o_entry;
+   char*exec_cmd;
 };
 
 typedef enum
@@ -526,8 +526,8 @@
fwin-overlay_file = _e_fwin_custom_file_path_eval(fwin, ef, 
fwin-overlay_file, X-Enlightenment-Directory-Overlay);
fwin-scrollframe_file = _e_fwin_custom_file_path_eval(fwin, ef, 
fwin-scrollframe_file, X-Enlightenment-Directory-Scrollframe);
fwin-theme_file = _e_fwin_custom_file_path_eval(fwin, ef, 
fwin-theme_file, X-Enlightenment-Directory-Theme);
-// FIXME: there is no way to just unref an efreet desktop - free completely
-// frees - doesnt just unref.
+   // FIXME: there is no way to just unref an efreet desktop - free 
completely
+   // frees - doesnt just unref.
efreet_desktop_free(ef);
  }
if (fwin-under_obj)
@@ -742,7 +742,7 @@

fad = data;
if (!fad) return;
-   if (!fad-app1  !fad-app2) return;
+   if ((!fad-app1)  (!fad-app2)) return;
 
if (fad-app1) 
  desktop = efreet_util_desktop_file_id_find(fad-app1);
@@ -750,10 +750,10 @@
  desktop = efreet_util_desktop_file_id_find(fad-app2);
 
if (!desktop) return;
-   if (!strcmp (desktop-exec, fad-exec_cmd)) return;
+   if (!strcmp(desktop-exec, fad-exec_cmd)) return;
 
-   fad-app1 = NULL;
-   fad-app2 = NULL;
+   E_FREE(fad-app1);
+   E_FREE(fad-app2);
if (fad-o_ilist) e_widget_ilist_unselect(fad-o_ilist);
if (fad-o_fm) e_fm2_select_set(fad-o_fm, NULL, 0);
 }
@@ -773,7 +773,7 @@
  desktop = efreet_util_desktop_file_id_find(fad-app1);
else if (fad-app2) 
  desktop = efreet_util_desktop_file_id_find(fad-app2);
-   if (desktop || strcmp (fad-exec_cmd, ))
+   if ((desktop) || (strcmp(fad-exec_cmd, )))
  {
getcwd(pcwd, sizeof(pcwd));
chdir(e_fm2_real_path_get(fad-fwin-fm_obj));
@@ -860,6 +860,7 @@
fad = dia-data;
E_FREE(fad-app1);
E_FREE(fad-app2);
+   E_FREE(fad-exec_cmd);
fad-fwin-fad = NULL;
free(fad);
 }



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs