forked from enlightenment/enlightenment
More Formatting...man this was a mess
SVN revision: 19163
This commit is contained in:
parent
d20ad6001b
commit
4d260a8c32
|
@ -2,7 +2,7 @@
|
||||||
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||||
*/
|
*/
|
||||||
#include "e.h"
|
#include "e.h"
|
||||||
|
|
||||||
/* PROTOTYPES - same all the time */
|
/* PROTOTYPES - same all the time */
|
||||||
typedef struct _CFData CFData;
|
typedef struct _CFData CFData;
|
||||||
typedef struct _E_Cfg_Mod_Data E_Cfg_Mod_Data;
|
typedef struct _E_Cfg_Mod_Data E_Cfg_Mod_Data;
|
||||||
|
@ -30,10 +30,9 @@ struct _CFData
|
||||||
Evas_Object *mod_name;
|
Evas_Object *mod_name;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
Evas_Object *configure, *enable, *disable;
|
Evas_Object *configure, *enable, *disable;
|
||||||
Evas_Object *load, *unload, *loaded, *unloaded;
|
Evas_Object *load, *unload, *loaded, *unloaded;
|
||||||
}
|
} gui;
|
||||||
gui;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _E_Cfg_Mod_Data
|
struct _E_Cfg_Mod_Data
|
||||||
|
@ -50,7 +49,7 @@ e_int_config_modules(E_Container *con)
|
||||||
{
|
{
|
||||||
E_Config_Dialog *cfd;
|
E_Config_Dialog *cfd;
|
||||||
E_Config_Dialog_View v;
|
E_Config_Dialog_View v;
|
||||||
|
|
||||||
/* methods */
|
/* methods */
|
||||||
v.create_cfdata = _create_data;
|
v.create_cfdata = _create_data;
|
||||||
v.free_cfdata = _free_data;
|
v.free_cfdata = _free_data;
|
||||||
|
@ -60,40 +59,40 @@ e_int_config_modules(E_Container *con)
|
||||||
v.advanced.create_widgets = _advanced_create_widgets;
|
v.advanced.create_widgets = _advanced_create_widgets;
|
||||||
/* create config diaolg for NULL object/data */
|
/* create config diaolg for NULL object/data */
|
||||||
cfd = e_config_dialog_new(con, _("Modules Settings"), NULL, 0, &v, NULL);
|
cfd = e_config_dialog_new(con, _("Modules Settings"), NULL, 0, &v, NULL);
|
||||||
return cfd;
|
return cfd;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME : redo this to setup list of loaded and unloaded modules in one pass (easy):)*/
|
/* FIXME : redo this to setup list of loaded and unloaded modules in one pass (easy):)*/
|
||||||
void
|
void
|
||||||
_e_config_module_list(Evas_List **b,char *dir,int loaded)
|
_e_config_module_list(Evas_List **b,char *dir,int loaded)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Evas_List *l;
|
||||||
l = *b;
|
l = *b;
|
||||||
char fullpath[PATH_MAX];
|
char fullpath[PATH_MAX];
|
||||||
if ((ecore_file_exists(dir)) && (ecore_file_is_dir(dir)))
|
if ((ecore_file_exists(dir)) && (ecore_file_is_dir(dir)))
|
||||||
{
|
{
|
||||||
Ecore_List *mods;
|
Ecore_List *mods;
|
||||||
mods = ecore_file_ls(dir);
|
mods = ecore_file_ls(dir);
|
||||||
if (mods)
|
if (mods)
|
||||||
|
{
|
||||||
|
char *mod;
|
||||||
|
int i = 0;
|
||||||
|
while ((mod = ecore_list_next(mods)))
|
||||||
|
{
|
||||||
|
snprintf(fullpath, sizeof(fullpath), "%s/%s", dir, mod);
|
||||||
|
if (ecore_file_is_dir(fullpath))
|
||||||
{
|
{
|
||||||
char *mod;
|
E_Module *m;
|
||||||
int i = 0;
|
m = e_module_find(mod);
|
||||||
while ((mod = ecore_list_next(mods)))
|
|
||||||
{
|
if(!m && !loaded)
|
||||||
snprintf(fullpath, sizeof(fullpath), "%s/%s", dir, mod);
|
l = evas_list_append(l,mod);
|
||||||
if (ecore_file_is_dir(fullpath))
|
else if(m && loaded)
|
||||||
{
|
l = evas_list_append(l,m);
|
||||||
E_Module *m;
|
|
||||||
m = e_module_find(mod);
|
|
||||||
|
|
||||||
if(!m && !loaded)
|
|
||||||
l = evas_list_append(l,mod);
|
|
||||||
else if(m && loaded)
|
|
||||||
l = evas_list_append(l,m);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
*b=l;
|
*b=l;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,45 +103,45 @@ _e_config_mod_cb_standard(void *data)
|
||||||
E_Config_Dialog *cfd;
|
E_Config_Dialog *cfd;
|
||||||
CFData *cfdata;
|
CFData *cfdata;
|
||||||
E_Module *m;
|
E_Module *m;
|
||||||
|
|
||||||
d = data;
|
d = data;
|
||||||
cfd = d->cfd;
|
cfd = d->cfd;
|
||||||
cfdata = cfd->cfdata;
|
cfdata = cfd->cfdata;
|
||||||
|
|
||||||
if(cfd->view_type == E_CONFIG_DIALOG_CFDATA_TYPE_BASIC)
|
if(cfd->view_type == E_CONFIG_DIALOG_CFDATA_TYPE_BASIC)
|
||||||
{
|
{
|
||||||
m = d->mod;
|
m = d->mod;
|
||||||
cfd->data=m;
|
cfd->data=m;
|
||||||
if(m->enabled)
|
if(m->enabled)
|
||||||
{
|
{
|
||||||
e_widget_disabled_set(cfdata->gui.enable, 1);
|
e_widget_disabled_set( cfdata->gui.enable, 1);
|
||||||
e_widget_disabled_set(cfdata->gui.disable, 0);
|
e_widget_disabled_set( cfdata->gui.disable, 0);
|
||||||
if(m->func.config)
|
if(m->func.config)
|
||||||
e_widget_disabled_set(cfdata->gui.configure, 0);
|
e_widget_disabled_set( cfdata->gui.configure, 0);
|
||||||
else
|
else
|
||||||
e_widget_disabled_set(cfdata->gui.configure, 1);
|
e_widget_disabled_set( cfdata->gui.configure, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
e_widget_disabled_set(cfdata->gui.configure, 1);
|
e_widget_disabled_set( cfdata->gui.configure, 1);
|
||||||
e_widget_disabled_set(cfdata->gui.enable, 0);
|
e_widget_disabled_set( cfdata->gui.enable, 0);
|
||||||
e_widget_disabled_set(cfdata->gui.disable, 1);
|
e_widget_disabled_set( cfdata->gui.disable, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else /* Load / Unload menu */
|
else /* Load / Unload menu */
|
||||||
{
|
{
|
||||||
if(!d->loaded)/* unloaded module was clicked */
|
if(!d->loaded)/* unloaded module was clicked */
|
||||||
{
|
{
|
||||||
cfd->data=d->mod_name;
|
cfd->data=d->mod_name;
|
||||||
e_widget_disabled_set(cfdata->gui.load,0);
|
e_widget_disabled_set(cfdata->gui.load, 0);
|
||||||
e_widget_disabled_set(cfdata->gui.unload,1);
|
e_widget_disabled_set(cfdata->gui.unload, 1);
|
||||||
e_widget_disabled_set(cfdata->gui.loaded,1);
|
e_widget_disabled_set(cfdata->gui.loaded, 1);
|
||||||
}
|
}
|
||||||
else /* this is a loaded module */
|
else /* this is a loaded module */
|
||||||
{
|
{
|
||||||
cfd->data=d->mod;
|
cfd->data=d->mod;
|
||||||
e_widget_disabled_set(cfdata->gui.load,1);
|
e_widget_disabled_set(cfdata->gui.load, 1);
|
||||||
e_widget_disabled_set(cfdata->gui.unload,0);
|
e_widget_disabled_set(cfdata->gui.unload, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -155,10 +154,10 @@ _module_load(void *data, void *data2)
|
||||||
CFData *cfdata;
|
CFData *cfdata;
|
||||||
Evas_Object *ob;
|
Evas_Object *ob;
|
||||||
|
|
||||||
cfd = data;
|
cfd = data;
|
||||||
cfdata = cfd->cfdata;
|
cfdata = cfd->cfdata;
|
||||||
e_module_new(cfd->data);
|
e_module_new(cfd->data);
|
||||||
|
|
||||||
cfd->view_dirty=1;
|
cfd->view_dirty=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,11 +167,11 @@ _module_unload(void *data, void *data2)
|
||||||
E_Module *m;
|
E_Module *m;
|
||||||
E_Config_Dialog *cfd;
|
E_Config_Dialog *cfd;
|
||||||
CFData *cfdata;
|
CFData *cfdata;
|
||||||
|
|
||||||
cfd = data;
|
cfd = data;
|
||||||
m = cfd->data;
|
m = cfd->data;
|
||||||
cfdata = cfd->cfdata;
|
cfdata = cfd->cfdata;
|
||||||
|
|
||||||
e_module_disable(m);
|
e_module_disable(m);
|
||||||
e_object_del(E_OBJECT(m));
|
e_object_del(E_OBJECT(m));
|
||||||
e_config_save_queue();
|
e_config_save_queue();
|
||||||
|
@ -186,7 +185,7 @@ _module_enable(void *data, void *data2)/* this enables and disables :) */
|
||||||
CFData *cfdata;
|
CFData *cfdata;
|
||||||
E_Module *m;
|
E_Module *m;
|
||||||
E_Cfg_Mod_Data *d;
|
E_Cfg_Mod_Data *d;
|
||||||
|
|
||||||
cfd = data;
|
cfd = data;
|
||||||
m = cfd->data;
|
m = cfd->data;
|
||||||
|
|
||||||
|
@ -194,19 +193,19 @@ _module_enable(void *data, void *data2)/* this enables and disables :) */
|
||||||
{
|
{
|
||||||
e_module_save(m);
|
e_module_save(m);
|
||||||
e_module_disable(m);
|
e_module_disable(m);
|
||||||
|
|
||||||
e_widget_disabled_set(cfdata->gui.configure, 1);
|
e_widget_disabled_set( cfdata->gui.configure, 1);
|
||||||
e_widget_disabled_set(cfdata->gui.enable, 0);
|
e_widget_disabled_set( cfdata->gui.enable, 0);
|
||||||
e_widget_disabled_set(cfdata->gui.disable, 1);
|
e_widget_disabled_set( cfdata->gui.disable, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
e_module_enable(m);
|
e_module_enable(m);
|
||||||
|
|
||||||
if(m->func.config)
|
if(m->func.config)
|
||||||
e_widget_disabled_set(cfdata->gui.configure, 0);
|
e_widget_disabled_set( cfdata->gui.configure, 0);
|
||||||
e_widget_disabled_set(cfdata->gui.enable, 1);
|
e_widget_disabled_set( cfdata->gui.enable, 1);
|
||||||
e_widget_disabled_set(cfdata->gui.disable, 0);
|
e_widget_disabled_set( cfdata->gui.disable, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -216,45 +215,47 @@ _module_configure(void *data, void *data2)
|
||||||
E_Config_Dialog *cfd;
|
E_Config_Dialog *cfd;
|
||||||
CFData *cfdata;
|
CFData *cfdata;
|
||||||
E_Module *m;
|
E_Module *m;
|
||||||
|
|
||||||
cfd = data;
|
cfd = data;
|
||||||
m = cfd->data;
|
m = cfd->data;
|
||||||
cfdata = cfd->cfdata;
|
cfdata = cfd->cfdata;
|
||||||
if(m->func.config)
|
if(m->func.config)
|
||||||
{
|
{
|
||||||
m->func.config(m);
|
m->func.config(m);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
printf("Can't run config no module!!!\n");// Debug!!
|
printf("Can't run config no module!!!\n");// Debug!!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**--CREATE--**/
|
/**--CREATE--**/
|
||||||
static void
|
static void
|
||||||
_fill_data(CFData *cfdata)
|
_fill_data(CFData *cfdata)
|
||||||
{
|
{
|
||||||
char buf[4096];
|
char buf[4096];
|
||||||
char fullpath[PATH_MAX];
|
char fullpath[PATH_MAX];
|
||||||
Evas_List *l=NULL;
|
Evas_List *l=NULL;
|
||||||
|
|
||||||
cfdata->umods = NULL;
|
cfdata->umods = NULL;
|
||||||
|
|
||||||
cfdata->mods= NULL;
|
cfdata->mods= NULL;
|
||||||
//e_module_list();
|
//e_module_list();
|
||||||
|
|
||||||
/* We could use e_module_list() but this method gives us alphabetical order */
|
/* We could use e_module_list() but this method gives us alphabetical order */
|
||||||
for(l = e_path_dir_list_get(path_modules);l;l = l->next)
|
for(l = e_path_dir_list_get(path_modules);l;l = l->next)
|
||||||
{
|
{
|
||||||
E_Path_Dir *epd;
|
E_Path_Dir *epd;
|
||||||
epd = l->data;
|
epd = l->data;
|
||||||
_e_config_module_list(&(cfdata->mods),epd->dir,1);
|
_e_config_module_list(&(cfdata->mods),epd->dir,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(l = e_path_dir_list_get(path_modules);l;l = l->next)
|
for(l = e_path_dir_list_get(path_modules);l;l = l->next)
|
||||||
{
|
{
|
||||||
E_Path_Dir *epd;
|
E_Path_Dir *epd;
|
||||||
epd = l->data;
|
epd = l->data;
|
||||||
_e_config_module_list(&(cfdata->umods),epd->dir,0);
|
_e_config_module_list(&(cfdata->umods),epd->dir,0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
|
@ -265,10 +266,10 @@ _create_data(E_Config_Dialog *cfd)
|
||||||
* the running systems/config in the apply methods
|
* the running systems/config in the apply methods
|
||||||
*/
|
*/
|
||||||
CFData *cfdata;
|
CFData *cfdata;
|
||||||
|
|
||||||
cfdata = E_NEW(CFData, 1);
|
cfdata = E_NEW(CFData, 1);
|
||||||
_fill_data(cfdata);
|
_fill_data(cfdata);
|
||||||
|
|
||||||
return cfdata;
|
return cfdata;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -283,14 +284,13 @@ _free_data(E_Config_Dialog *cfd, CFData *cfdata)
|
||||||
static int
|
static int
|
||||||
_basic_apply_data(E_Config_Dialog *cfd, CFData *cfdata)
|
_basic_apply_data(E_Config_Dialog *cfd, CFData *cfdata)
|
||||||
{
|
{
|
||||||
return 1; /* Apply was OK */
|
return 1; /* Apply was OK */
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_advanced_apply_data(E_Config_Dialog *cfd, CFData *cfdata)
|
_advanced_apply_data(E_Config_Dialog *cfd, CFData *cfdata)
|
||||||
{
|
{
|
||||||
|
return 1; /* Apply was OK */
|
||||||
return 1; /* Apply was OK */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**--GUI--**/
|
/**--GUI--**/
|
||||||
|
@ -302,12 +302,12 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, CFData *cfdata)
|
||||||
E_Radio_Group *rg;
|
E_Radio_Group *rg;
|
||||||
Evas_List *l;
|
Evas_List *l;
|
||||||
E_Module *m;
|
E_Module *m;
|
||||||
|
|
||||||
_fill_data(cfdata);
|
_fill_data(cfdata);
|
||||||
cfd->hide_buttons = 1;
|
cfd->hide_buttons = 1;
|
||||||
|
|
||||||
o = e_widget_list_add(evas, 0, 1);
|
o = e_widget_list_add(evas, 0, 1);
|
||||||
of = e_widget_framelist_add(evas, "Modules", 1);
|
of = e_widget_framelist_add(evas, "Modules", 1);
|
||||||
ob = e_widget_ilist_add(evas,16,16,NULL);
|
ob = e_widget_ilist_add(evas,16,16,NULL);
|
||||||
for(l = cfdata->mods;l;l = l->next)
|
for(l = cfdata->mods;l;l = l->next)
|
||||||
{
|
{
|
||||||
|
@ -329,19 +329,19 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, CFData *cfdata)
|
||||||
e_widget_ilist_go(ob);
|
e_widget_ilist_go(ob);
|
||||||
e_widget_framelist_object_append(of, ob);
|
e_widget_framelist_object_append(of, ob);
|
||||||
e_widget_list_object_append(o, of, 1, 1, 0.5);
|
e_widget_list_object_append(o, of, 1, 1, 0.5);
|
||||||
|
|
||||||
of = e_widget_frametable_add(evas, "Actions", 1);
|
of = e_widget_frametable_add(evas, "Actions", 1);
|
||||||
|
|
||||||
ob = e_widget_button_add(evas, "Enable", NULL, _module_enable, cfd, NULL);
|
ob = e_widget_button_add(evas, "Enable", NULL, _module_enable, cfd, NULL);
|
||||||
cfdata->gui.enable = ob;
|
cfdata->gui.enable = ob;
|
||||||
e_widget_disabled_set(ob, 1);
|
e_widget_disabled_set(ob, 1);
|
||||||
e_widget_frametable_object_append(of, ob, 0, 0, 1, 1, 32, 32, 1, 1);
|
e_widget_frametable_object_append(of, ob, 0, 0, 1, 1, 32, 32, 1, 1);
|
||||||
|
|
||||||
ob = e_widget_button_add(evas, "Disable", NULL, _module_enable, cfd, NULL);
|
ob = e_widget_button_add(evas, "Disable", NULL, _module_enable, cfd, NULL);
|
||||||
cfdata->gui.disable = ob;
|
cfdata->gui.disable = ob;
|
||||||
e_widget_disabled_set(ob, 1);
|
e_widget_disabled_set(ob, 1);
|
||||||
e_widget_frametable_object_append(of, ob, 0, 1, 1, 1, 32, 32, 1, 1);
|
e_widget_frametable_object_append(of, ob, 0, 1, 1, 1, 32, 32, 1, 1);
|
||||||
|
|
||||||
ob = e_widget_button_add(evas, "Configure", NULL, _module_configure, cfd, NULL);
|
ob = e_widget_button_add(evas, "Configure", NULL, _module_configure, cfd, NULL);
|
||||||
cfdata->gui.configure=ob;
|
cfdata->gui.configure=ob;
|
||||||
e_widget_disabled_set(ob, 1);
|
e_widget_disabled_set(ob, 1);
|
||||||
|
@ -359,27 +359,27 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, CFData *cfdata)
|
||||||
E_Radio_Group *rg;
|
E_Radio_Group *rg;
|
||||||
Evas_List *l;
|
Evas_List *l;
|
||||||
E_Module *m;
|
E_Module *m;
|
||||||
|
|
||||||
_fill_data(cfdata);
|
_fill_data(cfdata);
|
||||||
cfd->hide_buttons = 1;
|
cfd->hide_buttons = 1;
|
||||||
|
|
||||||
o = e_widget_list_add(evas, 0, 1);
|
o = e_widget_list_add(evas, 0, 1);
|
||||||
|
|
||||||
of = e_widget_framelist_add(evas, "Loaded", 1);
|
of = e_widget_framelist_add(evas, "Loaded", 1);
|
||||||
ob = e_widget_ilist_add(evas,16,16,NULL);
|
ob = e_widget_ilist_add(evas,16,16,NULL);
|
||||||
for(l = cfdata->mods;l;l = l->next)
|
for(l = cfdata->mods;l;l = l->next)
|
||||||
{
|
{
|
||||||
E_Cfg_Mod_Data *cb_data;
|
E_Cfg_Mod_Data *cb_data;
|
||||||
m = l->data;
|
m = l->data;
|
||||||
sob = e_icon_add(evas);
|
sob = e_icon_add(evas);
|
||||||
if (m->icon_file)
|
if (m->icon_file)
|
||||||
e_icon_file_set(sob,m->icon_file);
|
e_icon_file_set(sob,m->icon_file);
|
||||||
cb_data = E_NEW(E_Cfg_Mod_Data, 1);
|
cb_data = E_NEW(E_Cfg_Mod_Data, 1);
|
||||||
cb_data->cfd = cfd;
|
cb_data->cfd = cfd;
|
||||||
cb_data->loaded = 1;
|
cb_data->loaded = 1;
|
||||||
cb_data->mod = m;
|
cb_data->mod = m;
|
||||||
e_widget_ilist_append(ob, sob, m->name, _e_config_mod_cb_standard, cb_data, m->name);
|
e_widget_ilist_append(ob, sob, m->name, _e_config_mod_cb_standard, cb_data, m->name);
|
||||||
}
|
}
|
||||||
cfdata->gui.loaded = ob;
|
cfdata->gui.loaded = ob;
|
||||||
e_widget_ilist_go(ob);
|
e_widget_ilist_go(ob);
|
||||||
e_widget_min_size_set(ob, 120, 120);
|
e_widget_min_size_set(ob, 120, 120);
|
||||||
|
@ -391,33 +391,33 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, CFData *cfdata)
|
||||||
cfdata->gui.load = ob;
|
cfdata->gui.load = ob;
|
||||||
e_widget_disabled_set(ob, 1);
|
e_widget_disabled_set(ob, 1);
|
||||||
e_widget_list_object_append(of, ob, 1, 1, 0.5);
|
e_widget_list_object_append(of, ob, 1, 1, 0.5);
|
||||||
|
|
||||||
ob = e_widget_button_add(evas, "Unload", NULL, _module_unload, cfd, NULL);
|
ob = e_widget_button_add(evas, "Unload", NULL, _module_unload, cfd, NULL);
|
||||||
cfdata->gui.unload = ob;
|
cfdata->gui.unload = ob;
|
||||||
e_widget_disabled_set(ob, 1);
|
e_widget_disabled_set(ob, 1);
|
||||||
e_widget_list_object_append(of, ob, 1, 1, 0.5);
|
e_widget_list_object_append(of, ob, 1, 1, 0.5);
|
||||||
e_widget_list_object_append(o, of, 1, 1, 0.5);
|
e_widget_list_object_append(o, of, 1, 1, 0.5);
|
||||||
|
|
||||||
of = e_widget_framelist_add(evas, "Unloaded", 1);
|
of = e_widget_framelist_add(evas, "Unloaded", 1);
|
||||||
ob = e_widget_ilist_add(evas,16,16,NULL);
|
ob = e_widget_ilist_add(evas,16,16,NULL);
|
||||||
for(l = cfdata->umods;l;l = l->next)
|
for(l = cfdata->umods;l;l = l->next)
|
||||||
{
|
{
|
||||||
char *mod;
|
char *mod;
|
||||||
char *icon;
|
char *icon;
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
E_Cfg_Mod_Data *cb_data;
|
E_Cfg_Mod_Data *cb_data;
|
||||||
|
|
||||||
mod = l->data;
|
mod = l->data;
|
||||||
sob = e_icon_add(evas);
|
sob = e_icon_add(evas);
|
||||||
snprintf(buf, sizeof(buf), "%s/module_icon.png", mod);
|
snprintf(buf, sizeof(buf), "%s/module_icon.png", mod);
|
||||||
icon = e_path_find(path_modules, buf);
|
icon = e_path_find(path_modules, buf);
|
||||||
e_icon_file_set(sob,icon);
|
e_icon_file_set(sob,icon);
|
||||||
cb_data = E_NEW(CFData,1);
|
cb_data = E_NEW(CFData,1);
|
||||||
cb_data->cfd = cfd;
|
cb_data->cfd = cfd;
|
||||||
cb_data->loaded = 0;
|
cb_data->loaded = 0;
|
||||||
cb_data->mod_name = strdup(mod);
|
cb_data->mod_name = strdup(mod);
|
||||||
e_widget_ilist_append(ob, sob, mod, _e_config_mod_cb_standard, cb_data, mod);
|
e_widget_ilist_append(ob, sob, mod, _e_config_mod_cb_standard, cb_data, mod);
|
||||||
}
|
}
|
||||||
cfdata->gui.unloaded = ob;
|
cfdata->gui.unloaded = ob;
|
||||||
e_widget_ilist_go(ob);
|
e_widget_ilist_go(ob);
|
||||||
e_widget_min_size_set(ob, 120, 120);
|
e_widget_min_size_set(ob, 120, 120);
|
||||||
|
|
Loading…
Reference in New Issue