forked from enlightenment/edi
whitespace fixes
This commit is contained in:
parent
be30e5e24c
commit
1899233c01
|
@ -96,23 +96,23 @@ load_tree(char *path, Elm_Object_Item *parent)
|
|||
iter = eina_file_stat_ls(path);
|
||||
if (iter)
|
||||
{
|
||||
EINA_ITERATOR_FOREACH(iter, info)
|
||||
{
|
||||
name = info->path + info->name_start;
|
||||
if (ignore_file(name)) continue;
|
||||
EINA_ITERATOR_FOREACH(iter, info)
|
||||
{
|
||||
name = info->path + info->name_start;
|
||||
if (ignore_file(name)) continue;
|
||||
|
||||
if (info->type == EINA_FILE_DIR)
|
||||
{
|
||||
newParent = elm_genlist_item_sorted_insert(list, &itc2, eina_stringshare_add(name),
|
||||
parent, ELM_GENLIST_ITEM_NONE, _item_sort, _item_sel, eina_stringshare_add(info->path));
|
||||
load_tree(info->path, newParent);
|
||||
}
|
||||
else if (info->type == EINA_FILE_REG)
|
||||
{
|
||||
elm_genlist_item_sorted_insert(list, &itc, eina_stringshare_add(name),
|
||||
parent, ELM_GENLIST_ITEM_NONE, _item_sort, _item_sel, eina_stringshare_add(info->path));
|
||||
}
|
||||
}
|
||||
if (info->type == EINA_FILE_DIR)
|
||||
{
|
||||
newParent = elm_genlist_item_sorted_insert(list, &itc2, eina_stringshare_add(name),
|
||||
parent, ELM_GENLIST_ITEM_NONE, _item_sort, _item_sel, eina_stringshare_add(info->path));
|
||||
load_tree(info->path, newParent);
|
||||
}
|
||||
else if (info->type == EINA_FILE_REG)
|
||||
{
|
||||
elm_genlist_item_sorted_insert(list, &itc, eina_stringshare_add(name),
|
||||
parent, ELM_GENLIST_ITEM_NONE, _item_sort, _item_sel, eina_stringshare_add(info->path));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -203,12 +203,12 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
|
|||
args = ecore_getopt_parse(&optdesc, values, argc, argv);
|
||||
if (args < 0)
|
||||
{
|
||||
EINA_LOG_CRIT("Could not parse arguments.");
|
||||
goto end;
|
||||
EINA_LOG_CRIT("Could not parse arguments.");
|
||||
goto end;
|
||||
}
|
||||
else if (quit_option)
|
||||
{
|
||||
goto end;
|
||||
goto end;
|
||||
}
|
||||
|
||||
elm_app_info_set(elm_main, "edi", "images/edi.png");
|
||||
|
|
|
@ -28,7 +28,7 @@ _get_item_for_path(const char *path)
|
|||
{
|
||||
Eina_List *list, *item;
|
||||
Elm_Object_Item *it;
|
||||
|
||||
|
||||
list = elm_naviframe_items_get(nf);
|
||||
EINA_LIST_FOREACH(list, item, it)
|
||||
{
|
||||
|
@ -46,7 +46,7 @@ _edi_mainview_open_file_text(const char *path)
|
|||
{
|
||||
Evas_Object *txt;
|
||||
Elm_Object_Item *it, *tab;
|
||||
|
||||
|
||||
it = _get_item_for_path(path);
|
||||
if (it)
|
||||
{
|
||||
|
@ -73,20 +73,20 @@ static void
|
|||
_edi_mainview_open_stat_done(void *data, Eio_File *handler EINA_UNUSED, const Eina_Stat *stat)
|
||||
{
|
||||
const char *path;
|
||||
|
||||
|
||||
path = data;
|
||||
if (S_ISREG(stat->mode))
|
||||
{
|
||||
_edi_mainview_open_file_text(path);
|
||||
}
|
||||
|
||||
|
||||
eina_stringshare_del(path);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
edi_mainview_open_path(const char *path)
|
||||
{
|
||||
eio_file_direct_stat(path, _edi_mainview_open_stat_done, dummy,
|
||||
eio_file_direct_stat(path, _edi_mainview_open_stat_done, dummy,
|
||||
eina_stringshare_add(path));
|
||||
}
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@ edi_init(void)
|
|||
_edi_lib_log_dom = eina_log_domain_register("edi", EINA_COLOR_CYAN);
|
||||
if (_edi_lib_log_dom < 0)
|
||||
{
|
||||
EINA_LOG_ERR("Edi can not create its log domain.");
|
||||
goto shutdown_eina;
|
||||
EINA_LOG_ERR("Edi can not create its log domain.");
|
||||
goto shutdown_eina;
|
||||
}
|
||||
|
||||
// Put here your initialization logic of your library
|
||||
|
@ -44,8 +44,8 @@ edi_shutdown(void)
|
|||
if (_edi_init != 0) return _edi_init;
|
||||
|
||||
eina_log_timing(_edi_lib_log_dom,
|
||||
EINA_LOG_STATE_START,
|
||||
EINA_LOG_STATE_SHUTDOWN);
|
||||
EINA_LOG_STATE_START,
|
||||
EINA_LOG_STATE_SHUTDOWN);
|
||||
|
||||
// Put here your shutdown logic
|
||||
|
||||
|
|
|
@ -81,33 +81,33 @@ main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
|
|||
args = ecore_getopt_parse(&optdesc, values, argc, argv);
|
||||
if (args < 0)
|
||||
{
|
||||
EINA_LOG_CRIT("Could not parse arguments.");
|
||||
goto end;
|
||||
EINA_LOG_CRIT("Could not parse arguments.");
|
||||
goto end;
|
||||
}
|
||||
else if (quit_option)
|
||||
{
|
||||
goto end;
|
||||
goto end;
|
||||
}
|
||||
else if (list_option)
|
||||
{
|
||||
fprintf(stdout, "Available tests :\n");
|
||||
for (i = 0; i < sizeof (tests) / sizeof (tests[0]); i++)
|
||||
fprintf(stdout, "\t%s\n", tests[i].name);
|
||||
goto end;
|
||||
fprintf(stdout, "Available tests :\n");
|
||||
for (i = 0; i < sizeof (tests) / sizeof (tests[0]); i++)
|
||||
fprintf(stdout, "\t%s\n", tests[i].name);
|
||||
goto end;
|
||||
}
|
||||
|
||||
s = suite_create("Edi");
|
||||
|
||||
for (i = 0; i < sizeof (tests) / sizeof (tests[0]); i++)
|
||||
{
|
||||
if (test && strcmp(tests[i].name, test))
|
||||
continue ;
|
||||
if (test && strcmp(tests[i].name, test))
|
||||
continue ;
|
||||
|
||||
tc = tcase_create(tests[i].name);
|
||||
tcase_set_timeout(tc, 0);
|
||||
tc = tcase_create(tests[i].name);
|
||||
tcase_set_timeout(tc, 0);
|
||||
|
||||
tests[i].build(tc);
|
||||
suite_add_tcase(s, tc);
|
||||
tests[i].build(tc);
|
||||
suite_add_tcase(s, tc);
|
||||
}
|
||||
|
||||
sr = srunner_create(s);
|
||||
|
|
Loading…
Reference in New Issue