Enlightenment CVS committal
Author : pfritz
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/tools/ewl_config
Modified Files:
ewl_config.c
Log Message:
simplify
===================================================================
RCS file: /cvs/e/e17/libs/ewl/tools/ewl_config/ewl_config.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -3 -r1.48 -r1.49
--- ewl_config.c 3 Oct 2007 23:55:06 -0000 1.48
+++ ewl_config.c 4 Oct 2007 00:06:12 -0000 1.49
@@ -39,7 +39,7 @@
static void ec_cb_revert(Ewl_Widget *w, void *ev, void *data);
static void ec_cb_win_hide(Ewl_Widget *w, void *ev, void *data);
-int ec_themes_get(DIR *rep, Ecore_List *list, const char *v, int *count);
+int ec_themes_get(DIR *rep, Ecore_List *list, const char *v);
typedef struct Ec_Gui_Menu_Item Ec_Gui_Menu_Item;
struct Ec_Gui_Menu_Item
@@ -322,7 +322,7 @@
Ecore_List *list;
const char *v;
int val;
- int i = 0, sel = -1;
+ int sel = -1;
char *home_dir, path[PATH_MAX];
box = ewl_hbox_new();
@@ -354,7 +354,7 @@
{
int ret;
- ret = ec_themes_get(rep, list, v, &i);
+ ret = ec_themes_get(rep, list, v);
if (ret >= 0)
sel = ret;
}
@@ -367,7 +367,7 @@
{
int ret;
- ret = ec_themes_get(rep, list, v, &i);
+ ret = ec_themes_get(rep, list, v);
if (ret >= 0)
sel = ret;
}
@@ -791,7 +791,7 @@
}
int
-ec_themes_get(DIR *rep, Ecore_List *list, const char *v, int *count)
+ec_themes_get(DIR *rep, Ecore_List *list, const char *v)
{
struct dirent *file;
int z = -1;
@@ -801,7 +801,7 @@
int len;
len = strlen(file->d_name);
-
+
if ((len >= 4) &&
(!strcmp(file->d_name + len - 4, ".edj")))
{
@@ -810,13 +810,10 @@
t = strdup(file->d_name);
*(t + len - 4) = '\0';
- if (!strcmp(t, v))
- {
- z = *count;
- }
-
ecore_list_append(list, t);
- (*count)++;
+
+ if (!strcmp(t, v))
+ z = ecore_list_count(list) - 1;
}
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs