summaryrefslogtreecommitdiff
path: root/legacy/efreet/src/lib/efreet_menu.c
diff options
context:
space:
mode:
authorSebastian Dransfeld <sd@tango.flipp.net>2012-10-21 04:53:18 +0000
committerSebastian Dransfeld <sd@tango.flipp.net>2012-10-21 04:53:18 +0000
commit199bef6051fd5e35ded4b45e1f5319ad36cd1a6b (patch)
tree98d37a2969144aff99e7c727cb20f678dc9d25e9 /legacy/efreet/src/lib/efreet_menu.c
parent878bfd2616728368debf671db3d73187c0b99594 (diff)
efreet: move common function to base
SVN revision: 78293
Diffstat (limited to '')
-rw-r--r--legacy/efreet/src/lib/efreet_menu.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/legacy/efreet/src/lib/efreet_menu.c b/legacy/efreet/src/lib/efreet_menu.c
index 8cefea8ab9..fe6ebee007 100644
--- a/legacy/efreet/src/lib/efreet_menu.c
+++ b/legacy/efreet/src/lib/efreet_menu.c
@@ -854,41 +854,6 @@ efreet_menu_dump(Efreet_Menu *menu, const char *indent)
854 854
855/** 855/**
856 * @internal 856 * @internal
857 * @param user_dir The user directory to work with
858 * @param system_dirs The system directories to work with
859 * @param suffix The path suffix to add
860 * @return Returns the list of directories
861 * @brief Creates the list of directories based on the user
862 * dir, system dirs and given suffix.
863 *
864 * Needs EAPI because of helper binaries
865 */
866EAPI Eina_List *
867efreet_default_dirs_get(const char *user_dir, Eina_List *system_dirs,
868 const char *suffix)
869{
870 const char *xdg_dir;
871 char dir[PATH_MAX];
872 Eina_List *list = NULL;
873 Eina_List *l;
874
875 EINA_SAFETY_ON_NULL_RETURN_VAL(user_dir, NULL);
876 EINA_SAFETY_ON_NULL_RETURN_VAL(suffix, NULL);
877
878 snprintf(dir, sizeof(dir), "%s/%s", user_dir, suffix);
879 list = eina_list_append(list, eina_stringshare_add(dir));
880
881 EINA_LIST_FOREACH(system_dirs, l, xdg_dir)
882 {
883 snprintf(dir, sizeof(dir), "%s/%s", xdg_dir, suffix);
884 list = eina_list_append(list, eina_stringshare_add(dir));
885 }
886
887 return list;
888}
889
890/**
891 * @internal
892 * @return Returns a new Efreet_Menu_Internal struct 857 * @return Returns a new Efreet_Menu_Internal struct
893 * @brief Allocates and initializes a new Efreet_Menu_Internal structure 858 * @brief Allocates and initializes a new Efreet_Menu_Internal structure
894 */ 859 */