Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        Makefile.am e_fm.c e_fm.h e_fm_prop.c e_includes.h 
Added Files:
        e_fm_custom.c e_fm_custom.h 


Log Message:


move custom file stuff to another file - e_fm.[ch] is becoming a bit of a
monster.

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/Makefile.am,v
retrieving revision 1.184
retrieving revision 1.185
diff -u -3 -r1.184 -r1.185
--- Makefile.am 3 May 2007 23:19:40 -0000       1.184
+++ Makefile.am 4 May 2007 05:43:13 -0000       1.185
@@ -190,7 +190,8 @@
 e_mouse.h \
 e_order.h \
 e_exec.h \
-e_widget_font_preview.h
+e_widget_font_preview.h \
+e_fm_custom.h
  
 enlightenment_src = \
 e_user.c \
@@ -356,6 +357,7 @@
 e_order.c \
 e_exec.c \
 e_widget_font_preview.c \
+e_fm_custom.c \
 $(ENLIGHTENMENTHEADERS)
 
 enlightenment_SOURCES = \
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_fm.c,v
retrieving revision 1.153
retrieving revision 1.154
diff -u -3 -r1.153 -r1.154
--- e_fm.c      3 May 2007 23:19:40 -0000       1.153
+++ e_fm.c      4 May 2007 05:43:13 -0000       1.154
@@ -318,37 +318,6 @@
 EAPI int E_EVENT_REMOVABLE_ADD = 0;
 EAPI int E_EVENT_REMOVABLE_DEL = 0;
 
-/* externally accessible functions */
-EAPI E_Fm2_Custom_File *
-e_fm2_custom_file_get(const char *path)
-{
-   /* get any custom info for the path in our metadata - if non exists,
-    * return NULL. This may mean loading upa chunk of metadata off disk
-    * on demand and caching it */
-   return NULL;
-}
-
-EAPI void
-e_fm2_custom_file_set(const char *path, E_Fm2_Custom_File *cf)
-{
-   /* set custom metadata for a file path - save it to the metadata (or queue 
it) */
-}
-
-EAPI void e_fm2_custom_file_del(const char *path)
-{
-   /* delete a custom metadata entry for a path - save changes (or queue it) */
-}
-
-EAPI void e_fm2_custom_file_rename(const char *path, const char *new_path)
-{
-   /* rename file path a to file paht b in the metadata - if the path exists */
-}
-
-EAPI void e_fm2_custom_file_flush(void)
-{
-   /* free any loaded custom file data, sync changes to disk etc. */
-}
-
 /***/
 
 EAPI int
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_fm.h,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -3 -r1.41 -r1.42
--- e_fm.h      3 May 2007 12:44:10 -0000       1.41
+++ e_fm.h      4 May 2007 05:43:13 -0000       1.42
@@ -28,7 +28,6 @@
 typedef struct _E_Fm2_Config      E_Fm2_Config;
 typedef struct _E_Fm2_Icon        E_Fm2_Icon;
 typedef struct _E_Fm2_Icon_Info   E_Fm2_Icon_Info;
-typedef struct _E_Fm2_Custom_File E_Fm2_Custom_File;
 
 typedef struct _E_Fm2_Removable_Add E_Fm2_Removable_Add;
 typedef struct _E_Fm2_Removable_Del E_Fm2_Removable_Del;
@@ -124,28 +123,6 @@
    unsigned char     deleted : 1;
    unsigned char     broken_link : 1;
 };
-
-struct _E_Fm2_Custom_File
-{
-   struct {
-      int            x, y, w, h;
-      int            res_w, res_h;
-      unsigned char  valid;
-   } geom;
-   struct {
-      int            type;
-      const char    *icon;
-      unsigned char  valid;
-   } icon;
-   const char       *label;
-   /* FIXME: this will have more added */
-};
-
-EAPI E_Fm2_Custom_File    *e_fm2_custom_file_get(const char *path);
-EAPI void                  e_fm2_custom_file_set(const char *path, 
E_Fm2_Custom_File *cf);
-EAPI void                  e_fm2_custom_file_del(const char *path);
-EAPI void                  e_fm2_custom_file_rename(const char *path, const 
char *new_path);
-EAPI void                  e_fm2_custom_file_flush(void);
 
 EAPI int                   e_fm2_init(void);
 EAPI int                   e_fm2_shutdown(void);
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_fm_prop.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- e_fm_prop.c 4 May 2007 04:55:11 -0000       1.16
+++ e_fm_prop.c 4 May 2007 05:43:13 -0000       1.17
@@ -274,19 +274,23 @@
             E_Fm2_Custom_File *cf, cf0;
 
             cf = e_fm2_custom_file_get(buf);
-            if (!cf)
+            if (cf)
+              {
+                 cf->icon.type = cfdata->icon_type;
+                 if (cf->icon.icon)
+                   evas_stringshare_del(cf->icon.icon);
+                 cf->icon.icon = NULL;
+                 cf->icon.icon = evas_stringshare_add(cfdata->icon);
+                 cf->icon.valid = 1;
+              }
+            else
               {
                  memset(&cf0, 0, sizeof(E_Fm2_Custom_File));
                  cf = &cf0;
+                 cf->icon.type = cfdata->icon_type;
+                 cf->icon.icon = cfdata->icon;
+                 cf->icon.valid = 1;
               }
-            cf->icon.type = cfdata->icon_type;
-            if (cf->icon.icon)
-              evas_stringshare_del(cf->icon.icon);
-            cf->icon.icon = NULL;
-// don't leak for now      
-//          if (cfdata->icon)
-//            cf->icon.icon = evas_stringshare_add(cfdata->icon);
-            cf->icon.valid = 1;
             e_fm2_custom_file_set(buf, cf);
          }
        cfdata->picon_type = cfdata->icon_type;
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_includes.h,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -3 -r1.155 -r1.156
--- e_includes.h        3 May 2007 23:19:40 -0000       1.155
+++ e_includes.h        4 May 2007 05:43:13 -0000       1.156
@@ -166,3 +166,4 @@
 #include "e_order.h"
 #include "e_exec.h"
 #include "e_widget_font_preview.h"
+#include "e_fm_custom.h"



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to