Enlightenment CVS committal

Author  : essiene
Project : e17
Module  : proto

Dir     : e17/proto/entrance_edit_gui/src/widgets


Modified Files:
        _ew_list.c _ew_list.h ew_edjelist.c ew_edjelist.h 
        ew_textlist.c ew_textlist.h 


Log Message:
- Started work on proper object managing overall. I've had some object 
corruption issues that seems to be caused by lost pointers. Time to byte this 
bullet.
- Theme and Background dialog now will only ever create one instance, no matter 
how many times you try to launch it.
- Prompted by entrance bloat issues, cleaned up some very silly memory usages. 
Its amazing the what you gain just by watching top while clicking away at your 
app. Awesome stuff.

===================================================================
RCS file: /cvs/e/e17/proto/entrance_edit_gui/src/widgets/_ew_list.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- _ew_list.c  25 Sep 2006 19:08:56 -0000      1.11
+++ _ew_list.c  27 Sep 2006 21:45:47 -0000      1.12
@@ -69,6 +69,7 @@
        if(ewld) 
        {
                ewld->func = NULL;
+               ewld->funcdata = NULL;
                ewld->data = calloc(255, sizeof(char));
        }
 
@@ -100,9 +101,8 @@
 {  
    Entrance_List_Data ewld =  etk_tree_row_data_get(row);
 
-   /*TODO: call ewld->func and pass it ewld->data? */
    if(ewld->func)
-     ewld->func();
+     ewld->func(ewld->funcdata);
 }
 
 
===================================================================
RCS file: /cvs/e/e17/proto/entrance_edit_gui/src/widgets/_ew_list.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- _ew_list.h  25 Sep 2006 19:08:56 -0000      1.5
+++ _ew_list.h  27 Sep 2006 21:45:47 -0000      1.6
@@ -2,8 +2,9 @@
 #define _EW_LIST_H
 
 typedef struct _Entrance_List_Data {
-       void (*func)(void);
+       void (*func)(void*);
        void *data;
+       void *funcdata;
 } *Entrance_List_Data;
 
 
@@ -42,6 +43,10 @@
                if(ewld->data) \
                { \
                        free(ewld->data); \
+               } \
+               if(ewld->funcdata) \
+               { \
+                       free(ewld->funcdata); \
                } \
                free(ewld); \
        } \
===================================================================
RCS file: /cvs/e/e17/proto/entrance_edit_gui/src/widgets/ew_edjelist.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- ew_edjelist.c       25 Sep 2006 19:08:56 -0000      1.6
+++ ew_edjelist.c       27 Sep 2006 21:45:47 -0000      1.7
@@ -19,7 +19,7 @@
 }
 
 void
-ew_edjelist_add(Entrance_List ew, const char *label, const char *edje, const 
char *group, void *data,  size_t size, void (*func) (void))
+ew_edjelist_add(Entrance_List ew, const char *label, const char *edje, const 
char *group, void *data,  size_t size, void (*func) (void*), void* funcdata)
 {
    Etk_Tree_Row *row;
    etk_tree_freeze(ETK_TREE(ew->owner));
@@ -34,6 +34,7 @@
           {
                   memcpy(ewld->data, data, size);
           }
+          ewld->funcdata = funcdata;
    }
    
    etk_tree_row_data_set(row, ewld);
===================================================================
RCS file: /cvs/e/e17/proto/entrance_edit_gui/src/widgets/ew_edjelist.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- ew_edjelist.h       25 Sep 2006 19:08:56 -0000      1.3
+++ ew_edjelist.h       27 Sep 2006 21:45:47 -0000      1.4
@@ -4,7 +4,7 @@
 #include "_ew_list.h"
 
 Entrance_List ew_edjelist_new(const char*, int, int, int, int);
-void ew_edjelist_add(Entrance_List, const char *, const char *, const char*, 
void *, size_t, void (*) (void));
+void ew_edjelist_add(Entrance_List, const char *, const char *, const char*, 
void *, size_t, void (*) (void*), void*);
 
 
 #endif
===================================================================
RCS file: /cvs/e/e17/proto/entrance_edit_gui/src/widgets/ew_textlist.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- ew_textlist.c       25 Sep 2006 19:08:56 -0000      1.6
+++ ew_textlist.c       27 Sep 2006 21:45:47 -0000      1.7
@@ -20,7 +20,7 @@
 
 void
 ew_textlist_add(Entrance_List ew, const char *label, void *data, size_t size,
-                              void (*func) (void))
+                              void (*func) (void*), void* funcdata)
 {
    Etk_Tree_Row *row;
    
@@ -39,6 +39,7 @@
                   int c = strlen(s);
                   memcpy(ewld->data, data, size);
           }
+          ewld->funcdata = funcdata;
    }
 
    etk_tree_row_data_set(row, ewld);
===================================================================
RCS file: /cvs/e/e17/proto/entrance_edit_gui/src/widgets/ew_textlist.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- ew_textlist.h       25 Sep 2006 19:08:56 -0000      1.3
+++ ew_textlist.h       27 Sep 2006 21:45:47 -0000      1.4
@@ -4,7 +4,7 @@
 #include "_ew_list.h"
 
 Entrance_List ew_textlist_new(const char*, int, int, int, int);
-void ew_textlist_add(Entrance_List, const char *, void *, size_t, void (*) 
(void));
+void ew_textlist_add(Entrance_List, const char *, void *, size_t, void (*) 
(void*), void*);
 
 
 #endif



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to