formatting

SVN revision: 73281
This commit is contained in:
Mike Blumenkrantz 2012-07-04 12:42:30 +00:00
parent 5d2f230a26
commit 688ee47e83
1 changed files with 140 additions and 136 deletions

View File

@ -5,7 +5,7 @@ static void _e_configure_menu_add(void *data, E_Menu *m);
static void _e_configure_efreet_desktop_cleanup(void);
static void _e_configure_efreet_desktop_update(void);
static Eina_Bool _e_configure_cb_efreet_desktop_cache_update(void *data, int type, void *event);
static void _e_configure_registry_item_full_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func) (E_Container *con, const char *params), void (*generic_func) (E_Container *con, const char *params), Efreet_Desktop *desktop, const char *params);
static void _e_configure_registry_item_full_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func)(E_Container * con, const char *params), void (*generic_func)(E_Container *con, const char *params), Efreet_Desktop *desktop, const char *params);
static void _e_configure_registry_item_free(E_Configure_It *eci);
static void _configure_job(void *data);
@ -17,8 +17,9 @@ static Eina_List *handlers = NULL;
static E_Int_Menu_Augmentation *maug = NULL;
static Ecore_Job *update_job = NULL;
static struct {
void (*func) (const void *data, E_Container *con, const char *params, Efreet_Desktop *desktop);
static struct
{
void (*func)(const void *data, E_Container *con, const char *params, Efreet_Desktop *desktop);
const char *data;
} custom_desktop_exec = { NULL, NULL };
@ -63,7 +64,8 @@ e_configure_registry_call(const char *path, E_Container *con, const char *params
if (!params) params = eci->params;
if (eci->func) eci->func(con, params);
else if (eci->generic_func) eci->generic_func(con, params);
else if (eci->generic_func)
eci->generic_func(con, params);
else if (eci->desktop)
{
if (custom_desktop_exec.func)
@ -81,19 +83,19 @@ e_configure_registry_call(const char *path, E_Container *con, const char *params
}
EAPI void
e_configure_registry_item_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func) (E_Container *con, const char *params))
e_configure_registry_item_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func)(E_Container * con, const char *params))
{
_e_configure_registry_item_full_add(path, pri, label, icon_file, icon, func, NULL, NULL, NULL);
}
EAPI void
e_configure_registry_generic_item_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, void (*generic_func) (E_Container *con, const char *params))
e_configure_registry_generic_item_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, void (*generic_func)(E_Container *con, const char *params))
{
_e_configure_registry_item_full_add(path, pri, label, icon_file, icon, NULL, generic_func, NULL, NULL);
}
EAPI void
e_configure_registry_item_params_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func) (E_Container *con, const char *params), const char *params)
e_configure_registry_item_params_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func)(E_Container * con, const char *params), const char *params)
{
_e_configure_registry_item_full_add(path, pri, label, icon_file, icon, func, NULL, NULL, params);
}
@ -184,7 +186,7 @@ e_configure_registry_category_del(const char *path)
}
EAPI void
e_configure_registry_custom_desktop_exec_callback_set(void (*func) (const void *data, E_Container *con, const char *params, Efreet_Desktop *desktop), const void *data)
e_configure_registry_custom_desktop_exec_callback_set(void (*func)(const void *data, E_Container *con, const char *params, Efreet_Desktop *desktop), const void *data)
{
custom_desktop_exec.func = func;
custom_desktop_exec.data = data;
@ -269,13 +271,13 @@ _e_configure_efreet_desktop_cleanup(void)
E_Configure_Cat *ecat;
// printf("_e_configure_efreet_desktop_cleanup\n");
/* remove anything with a desktop entry */
/* remove anything with a desktop entry */
EINA_LIST_FOREACH(e_configure_registry, l, ecat)
{
E_Configure_It *eci;
Eina_List *ll, *ln;
EINA_LIST_FOREACH_SAFE(ecat->items, ll, ln, eci)
EINA_LIST_FOREACH_SAFE (ecat->items, ll, ln, eci)
if (eci->desktop)
{
_e_configure_registry_item_free(eci);
@ -350,7 +352,8 @@ _e_configure_efreet_desktop_update(void)
desktop->icon, 64);
}
if (desktop->name) label = desktop->name;
else if (desktop->generic_name) label = desktop->generic_name;
else if (desktop->generic_name)
label = desktop->generic_name;
else label = "???";
if (!cfg_cat_cfg)
{
@ -408,7 +411,7 @@ _e_configure_cb_efreet_desktop_cache_update(void *data __UNUSED__, int type __UN
}
static void
_e_configure_registry_item_full_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func) (E_Container *con, const char *params), void (*generic_func) (E_Container *con, const char *params), Efreet_Desktop *desktop, const char *params)
_e_configure_registry_item_full_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func)(E_Container * con, const char *params), void (*generic_func)(E_Container *con, const char *params), Efreet_Desktop *desktop, const char *params)
{
Eina_List *l;
char *cat;
@ -450,7 +453,7 @@ _e_configure_registry_item_full_add(const char *path, int pri, const char *label
goto done;
}
done:
done:
free(cat);
}
@ -465,3 +468,4 @@ _e_configure_registry_item_free(E_Configure_It *eci)
if (eci->params) eina_stringshare_del(eci->params);
free(eci);
}