Revision: 1519
          http://geeqie.svn.sourceforge.net/geeqie/?rev=1519&view=rev
Author:   zas_
Date:     2009-03-12 22:39:06 +0000 (Thu, 12 Mar 2009)

Log Message:
-----------
Make ishidden() static to filedata.c and rename it is_hidden_file().

Modified Paths:
--------------
    trunk/src/filedata.c
    trunk/src/filefilter.c
    trunk/src/filefilter.h

Modified: trunk/src/filedata.c
===================================================================
--- trunk/src/filedata.c        2009-03-12 22:35:45 UTC (rev 1518)
+++ trunk/src/filedata.c        2009-03-12 22:39:06 UTC (rev 1519)
@@ -829,6 +829,13 @@
        return flist_filtered;
 }
 
+static gboolean is_hidden_file(const gchar *name)
+{
+       if (name[0] != '.') return FALSE;
+       if (name[1] == '\0' || (name[1] == '.' && name[2] == '\0')) return 
FALSE;
+       return TRUE;
+}
+
 static gboolean filelist_read_real(FileData *dir_fd, GList **files, GList 
**dirs, gboolean follow_symlinks)
 {
        DIR *dp;
@@ -864,7 +871,7 @@
                const gchar *name = dir->d_name;
                gchar *filepath;
 
-               if (!options->file_filter.show_hidden_files && ishidden(name))
+               if (!options->file_filter.show_hidden_files && 
is_hidden_file(name))
                        continue;
 
                filepath = g_build_filename(pathl, name, NULL);
@@ -997,7 +1004,7 @@
                FileData *fd = (FileData *)(work->data);
                const gchar *name = fd->name;
 
-               if ((!options->file_filter.show_hidden_files && ishidden(name)) 
||
+               if ((!options->file_filter.show_hidden_files && 
is_hidden_file(name)) ||
                    (!is_dir_list && !filter_name_exists(name)) ||
                    (is_dir_list && name[0] == '.' && (strcmp(name, 
GQ_CACHE_LOCAL_THUMB) == 0 ||
                                                       strcmp(name, 
GQ_CACHE_LOCAL_METADATA) == 0)) )

Modified: trunk/src/filefilter.c
===================================================================
--- trunk/src/filefilter.c      2009-03-12 22:35:45 UTC (rev 1518)
+++ trunk/src/filefilter.c      2009-03-12 22:39:06 UTC (rev 1519)
@@ -37,13 +37,6 @@
 static GList *file_sidecar_list = NULL; /* files with allowed sidecar */
 
 
-gint ishidden(const gchar *name)
-{
-       if (name[0] != '.') return FALSE;
-       if (name[1] == '\0' || (name[1] == '.' && name[2] == '\0')) return 
FALSE;
-       return TRUE;
-}
-
 static FilterEntry *filter_entry_new(const gchar *key, const gchar 
*description,
                                     const gchar *extensions, FileFormatClass 
file_class, 
                                     gboolean writable, gboolean allow_sidecar, 
gboolean enabled)

Modified: trunk/src/filefilter.h
===================================================================
--- trunk/src/filefilter.h      2009-03-12 22:35:45 UTC (rev 1518)
+++ trunk/src/filefilter.h      2009-03-12 22:39:06 UTC (rev 1519)
@@ -50,7 +50,5 @@
 gchar *sidecar_ext_to_string(void);
 GList *sidecar_ext_get_list(void);
 
-gint ishidden(const gchar *name);
-
 #endif
 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn

Reply via email to