Enlightenment CVS committal

Author  : englebass
Project : e17
Module  : libs/efreet

Dir     : e17/libs/efreet/src/lib


Modified Files:
        Efreet.h Makefile.am efreet_menu.c efreet_private.h 


Log Message:
Function to check whether a path resides inside a default directory.

===================================================================
RCS file: /cvs/e/e17/libs/efreet/src/lib/Efreet.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- Efreet.h    3 Feb 2007 13:05:30 -0000       1.1
+++ Efreet.h    7 Feb 2007 01:12:25 -0000       1.2
@@ -32,6 +32,7 @@
 #include "efreet_icon.h"
 #include "efreet_desktop.h"
 #include "efreet_menu.h"
+#include "efreet_utils.h"
 
 int efreet_init(void);
 int efreet_shutdown(void);
===================================================================
RCS file: /cvs/e/e17/libs/efreet/src/lib/Makefile.am,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- Makefile.am 3 Feb 2007 13:05:30 -0000       1.1
+++ Makefile.am 7 Feb 2007 01:12:25 -0000       1.2
@@ -14,7 +14,8 @@
 efreet_base.h \
 efreet_desktop.h \
 efreet_icon.h \
-efreet_menu.h
+efreet_menu.h \
+efreet_utils.h
 
 EFREETSOURCES = \
 efreet.c \
@@ -24,6 +25,7 @@
 efreet_ini.c \
 efreet_desktop.c \
 efreet_menu.c \
+efreet_utils.c \
 $(EFREETHEADERS)
 
 libefreet_la_SOURCES = \
===================================================================
RCS file: /cvs/e/e17/libs/efreet/src/lib/efreet_menu.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- efreet_menu.c       6 Feb 2007 02:16:33 -0000       1.3
+++ efreet_menu.c       7 Feb 2007 01:12:25 -0000       1.4
@@ -220,9 +220,6 @@
 static Ecore_Hash *efreet_menu_layout_cbs = NULL;
 
 static const char *efreet_menu_prefix_get(void);
-static Ecore_List *efreet_default_dirs_get(const char *user_dir, 
-                                                    Ecore_List *system_dirs, 
-                                                    const char *suffix);
 
 static Efreet_Menu_Internal *efreet_menu_by_name_find(Efreet_Menu_Internal 
*internal,
                                                     const char *name, 
@@ -837,6 +834,38 @@
 }
 
 /**
+ * @param user_dir: The user directory to work with
+ * @param system_dirs: The system directories to work with
+ * @param suffix: The path suffix to add
+ * @return Returns the list of directories
+ * @brief Creates the list of directories based on the user
+ * dir, system dirs and given suffix.
+ */
+Ecore_List *
+efreet_default_dirs_get(const char *user_dir, Ecore_List *system_dirs, 
+                                                    const char *suffix)
+{
+    const char *xdg_dir;
+    char dir[PATH_MAX];
+    Ecore_List *list;
+
+    list = ecore_list_new();
+    ecore_list_set_free_cb(list, ECORE_FREE_CB(free));
+
+    snprintf(dir, sizeof(dir), "%s/%s", user_dir, suffix);
+    ecore_list_append(list, strdup(dir));
+
+    ecore_list_goto_first(system_dirs);
+    while ((xdg_dir = ecore_list_next(system_dirs)))
+    {
+        snprintf(dir, sizeof(dir), "%s/%s", xdg_dir, suffix);
+        ecore_list_append(list, strdup(dir));
+    }
+
+    return list;
+}
+
+/**
  * @internal
  * @return Returns a new Efreet_Menu_Internal struct
  * @brief Allocates and initializes a new Efreet_Menu_Internal structure 
@@ -908,39 +937,6 @@
     else efreet_menu_prefix = strdup("");
 
     return efreet_menu_prefix;
-}
-
-/**
- * @internal
- * @param user_dir: The user directory to work with
- * @param system_dirs: The system directories to work with
- * @param suffix: The path suffix to add
- * @return Returns the list of directories
- * @brief Creates the list of directories based on the user
- * dir, system dirs and given suffix.
- */
-static Ecore_List *
-efreet_default_dirs_get(const char *user_dir, Ecore_List *system_dirs, 
-                                                    const char *suffix)
-{
-    const char *xdg_dir;
-    char dir[PATH_MAX];
-    Ecore_List *list;
-
-    list = ecore_list_new();
-    ecore_list_set_free_cb(list, ECORE_FREE_CB(free));
-
-    snprintf(dir, sizeof(dir), "%s/%s", user_dir, suffix);
-    ecore_list_append(list, strdup(dir));
-
-    ecore_list_goto_first(system_dirs);
-    while ((xdg_dir = ecore_list_next(system_dirs)))
-    {
-        snprintf(dir, sizeof(dir), "%s/%s", xdg_dir, suffix);
-        ecore_list_append(list, strdup(dir));
-    }
-
-    return list;
 }
 
 /**
===================================================================
RCS file: /cvs/e/e17/libs/efreet/src/lib/efreet_private.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- efreet_private.h    3 Feb 2007 13:05:30 -0000       1.1
+++ efreet_private.h    7 Feb 2007 01:12:25 -0000       1.2
@@ -160,6 +160,9 @@
 
 int efreet_menu_init(void);
 void efreet_menu_shutdown(void);
+Ecore_List *efreet_default_dirs_get(const char *user_dir, 
+                                    Ecore_List *system_dirs, 
+                                    const char *suffix);
 
 int efreet_ini_init(void);
 int efreet_ini_shutdown(void);



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to