Enlightenment CVS committal

Author  : jethomas
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_filelist.c ewl_filelist.h ewl_filelist_model.c 
        ewl_filelist_model.h 


Log Message:
Some logic corrections

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_filelist.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -3 -r1.47 -r1.48
--- ewl_filelist.c      15 Dec 2007 00:52:20 -0000      1.47
+++ ewl_filelist.c      17 Dec 2007 01:37:29 -0000      1.48
@@ -75,7 +75,7 @@
 
        fl->view_flag = EWL_FILELIST_VIEW_ICON;
        fl->multiselect = FALSE;
-       fl->skip_hidden = TRUE;
+       fl->show_dot = FALSE;
 
        fl->directory = NULL;
        fl->filter = NULL;
@@ -280,7 +280,7 @@
                if (data) ewl_filelist_model_data_unref(data);
                
                data = ewl_filelist_model_directory_new(fl->directory,
-                                                fl->skip_hidden, TRUE, 
fl->filter);
+                                                fl->show_dot, TRUE, 
fl->filter);
                ewl_mvc_data_set(EWL_MVC(fl->controller), data);
                ewl_mvc_dirty_set(EWL_MVC(fl->controller), TRUE);
 
@@ -422,10 +422,10 @@
        DCHECK_PARAM_PTR(fl);
        DCHECK_TYPE(fl, EWL_FILELIST_TYPE);
 
-       if (fl->skip_hidden == !!dot)
+       if (fl->show_dot == !!dot)
                DRETURN(DLEVEL_STABLE);
 
-       fl->skip_hidden = !!dot;
+       fl->show_dot = !!dot;
        dir = ewl_mvc_data_get(EWL_MVC(fl->controller));
 
        /* check if data and then call the model function */
@@ -449,7 +449,7 @@
        DCHECK_PARAM_PTR_RET(fl, FALSE);
        DCHECK_TYPE_RET(fl, EWL_FILELIST_TYPE, FALSE);
 
-       DRETURN_INT((unsigned int)fl->skip_hidden, DLEVEL_STABLE);
+       DRETURN_INT((unsigned int)fl->show_dot, DLEVEL_STABLE);
 }
 
 /**
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_filelist.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- ewl_filelist.h      9 Dec 2007 04:33:39 -0000       1.22
+++ ewl_filelist.h      17 Dec 2007 01:37:29 -0000      1.23
@@ -83,7 +83,7 @@
        Ewl_Filelist_Filter *filter;            /**< The file filter to employ 
*/
 
        unsigned char multiselect:1;    /**< Allow multiple file selctions */
-       unsigned char skip_hidden:1;    /**< Show . files */
+       unsigned char show_dot:1;       /**< Show . files */
 
        Ewl_Filelist_View view_flag;    /**< The view to use for controller */
 
@@ -148,7 +148,7 @@
        Ecore_List *files;
        Ecore_List *dirs;
        Ewl_Filelist_Filter *filter;
-       unsigned char skip_hidden:1;
+       unsigned char show_dot:1;
        unsigned int num_dirs;
        unsigned int num_files;
 };
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_filelist_model.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- ewl_filelist_model.c        9 Dec 2007 16:59:58 -0000       1.9
+++ ewl_filelist_model.c        17 Dec 2007 01:37:29 -0000      1.10
@@ -29,7 +29,7 @@
  */
 Ewl_Filelist_Directory *
 ewl_filelist_model_directory_new(const char *path,
-                                       unsigned char skip_hidden,
+                                       unsigned char show_dot,
                                        unsigned int show_dot_dot,
                                        Ewl_Filelist_Filter *filter)
 {
@@ -107,7 +107,7 @@
        dir->files = ecore_list_new();
        dir->dirs = ecore_list_new();
        dir->name = ecore_string_instance(path);
-       dir->skip_hidden = !!skip_hidden;
+       dir->show_dot = !!show_dot;
        dir->filter = filter;
        dir->num_dirs = nd;
        dir->num_files = nf;
@@ -347,7 +347,7 @@
        file = ecore_list_index_goto(fld->dirs, parent);
        snprintf(path, PATH_MAX, "%s/%s", fld->name, file->name);
        subdir = ewl_filelist_model_directory_new
-                                       (path, fld->skip_hidden,
+                                       (path, fld->show_dot,
                                        FALSE, fld->filter);
 
        DRETURN_PTR(subdir, DLEVEL_STABLE);
@@ -397,17 +397,17 @@
  */
 unsigned int
 ewl_filelist_model_show_dot_files_set(Ewl_Filelist_Directory *dir,
-                                                       unsigned int 
skip_hidden)
+                                                       unsigned int show_dot)
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(dir, FALSE);
        
        /* If nothing has changed, leave */
-       if (skip_hidden == !!dir->skip_hidden)
+       if (show_dot == !!dir->show_dot)
                DRETURN_INT(FALSE, DLEVEL_STABLE);
 
        /* Else set value in */
-       dir->skip_hidden = !!skip_hidden;
+       dir->show_dot = !!show_dot;
 
        /* Refilter the files */
        ewl_filelist_model_filter(dir);
@@ -425,7 +425,7 @@
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(dir, FALSE);
-       DRETURN_INT((unsigned int)dir->skip_hidden, DLEVEL_STABLE);
+       DRETURN_INT((unsigned int)dir->show_dot, DLEVEL_STABLE);
 }
 
 /**
@@ -448,7 +448,7 @@
 
 
        /* Hidden files first */
-       if (dir->skip_hidden)
+       if (!dir->show_dot)
        {
 
                /* Run through files and filter hidden first, then others */
@@ -554,8 +554,9 @@
        DCHECK_PARAM_PTR_RET(dir, FALSE);
        DCHECK_PARAM_PTR_RET(file, FALSE);
 
+       /* If there's no filter return all files */
        if (!filter)
-               DRETURN_INT(FALSE, DLEVEL_STABLE);
+               DRETURN_INT(TRUE, DLEVEL_STABLE);
 
        /* First check mime types */
        if (filter->mime_list)
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_filelist_model.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- ewl_filelist_model.h        9 Dec 2007 04:33:39 -0000       1.7
+++ ewl_filelist_model.h        17 Dec 2007 01:37:29 -0000      1.8
@@ -10,7 +10,7 @@
  */
 
 Ewl_Filelist_Directory *ewl_filelist_model_directory_new(const char *path,
-                                               unsigned char skip_hidden,
+                                               unsigned char show_dot,
                                                unsigned int show_dot_dot,
                                                Ewl_Filelist_Filter *filter);
 unsigned int ewl_filelist_model_data_count(void *data);
@@ -27,7 +27,7 @@
                                                unsigned int column);
 
 unsigned int ewl_filelist_model_show_dot_files_set(Ewl_Filelist_Directory *dir,
-                                               unsigned int skip_hidden);
+                                               unsigned int show_dot);
 unsigned int ewl_filelist_model_show_dot_files_get(Ewl_Filelist_Directory 
*dir);
 
 unsigned int ewl_filelist_model_filter_set(Ewl_Filelist_Directory *dir,



-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to