*API BREAK* see the discussion in the mailing list. misc and e_modules will follow
SVN revision: 30970
This commit is contained in:
parent
aaab7ef651
commit
32f813ff0d
|
@ -166,9 +166,9 @@ int main(int argc, char **argv)
|
|||
db = ephoto_db_init();
|
||||
images = ecore_list_new();
|
||||
images = get_images(path);
|
||||
while (!ecore_list_is_empty(images))
|
||||
while (!ecore_list_empty_is(images))
|
||||
{
|
||||
name = ecore_list_remove_first(images);
|
||||
name = ecore_list_first_remove(images);
|
||||
ephoto_db_add_image(db, album, basename(name), name);
|
||||
}
|
||||
ephoto_db_close(db);
|
||||
|
@ -185,9 +185,9 @@ int main(int argc, char **argv)
|
|||
albums = ecore_list_new();
|
||||
albums = ephoto_db_list_albums(db);
|
||||
ephoto_db_close(db);
|
||||
while(!ecore_list_is_empty(albums))
|
||||
while(!ecore_list_empty_is(albums))
|
||||
{
|
||||
album = ecore_list_remove_first(albums);
|
||||
album = ecore_list_first_remove(albums);
|
||||
printf("%s\n", album);
|
||||
}
|
||||
ecore_list_destroy(albums);
|
||||
|
@ -207,9 +207,9 @@ int main(int argc, char **argv)
|
|||
db = ephoto_db_init();
|
||||
images = ephoto_db_list_images(db, album);
|
||||
ephoto_db_close(db);
|
||||
while(!ecore_list_is_empty(images))
|
||||
while(!ecore_list_empty_is(images))
|
||||
{
|
||||
path = ecore_list_remove_first(images);
|
||||
path = ecore_list_first_remove(images);
|
||||
printf("%s\n", path);
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -11,15 +11,15 @@ Ecore_List *get_directories(const char *directory)
|
|||
{
|
||||
ls = ecore_list_new();
|
||||
files = ecore_list_new();
|
||||
ecore_list_set_free_cb(files, free);
|
||||
ecore_list_free_cb_set(files, free);
|
||||
if (strcmp(directory, "/"))
|
||||
{
|
||||
ecore_list_append(files, strdup(".."));
|
||||
}
|
||||
ls = ecore_file_ls(directory);
|
||||
while (!ecore_list_is_empty(ls))
|
||||
while (!ecore_list_empty_is(ls))
|
||||
{
|
||||
file = ecore_list_remove_first(ls);
|
||||
file = ecore_list_first_remove(ls);
|
||||
if (strncmp(file, ".", 1))
|
||||
{
|
||||
if (strcmp(directory, "/"))
|
||||
|
@ -43,7 +43,7 @@ Ecore_List *get_directories(const char *directory)
|
|||
{
|
||||
files = NULL;
|
||||
}
|
||||
ecore_list_goto_first(files);
|
||||
ecore_list_first_goto(files);
|
||||
return files;
|
||||
}
|
||||
|
||||
|
@ -58,12 +58,12 @@ Ecore_List *get_images(const char *directory)
|
|||
{
|
||||
ls = ecore_list_new();
|
||||
files = ecore_dlist_new();
|
||||
ecore_dlist_set_free_cb(files, free);
|
||||
ecore_dlist_free_cb_set(files, free);
|
||||
|
||||
ls = ecore_file_ls(directory);
|
||||
while (!ecore_list_is_empty(ls))
|
||||
while (!ecore_list_empty_is(ls))
|
||||
{
|
||||
file = ecore_list_remove_first(ls);
|
||||
file = ecore_list_first_remove(ls);
|
||||
if (strncmp(file, ".", 1))
|
||||
{
|
||||
if (strcmp(directory, "/"))
|
||||
|
@ -95,6 +95,6 @@ Ecore_List *get_images(const char *directory)
|
|||
{
|
||||
files = NULL;
|
||||
}
|
||||
ecore_dlist_goto_first(files);
|
||||
ecore_dlist_first_goto(files);
|
||||
return files;
|
||||
}
|
||||
|
|
|
@ -180,7 +180,7 @@ static int list_albums(void *notused, int argc, char **argv, char **col)
|
|||
/*Return a list of albums in the albums table*/
|
||||
Ecore_List *ephoto_db_list_albums(sqlite3 *db)
|
||||
{
|
||||
if(!ecore_list_is_empty(albums))
|
||||
if(!ecore_list_empty_is(albums))
|
||||
{
|
||||
ecore_list_destroy(albums);
|
||||
}
|
||||
|
@ -226,11 +226,11 @@ Ecore_List *ephoto_db_list_images(sqlite3 *db, const char *album)
|
|||
char command[PATH_MAX];
|
||||
char *id;
|
||||
|
||||
if(!ecore_list_is_empty(images_list))
|
||||
if(!ecore_list_empty_is(images_list))
|
||||
{
|
||||
ecore_dlist_destroy(images_list);
|
||||
}
|
||||
if(!ecore_list_is_empty(image_ids))
|
||||
if(!ecore_list_empty_is(image_ids))
|
||||
{
|
||||
ecore_list_destroy(image_ids);
|
||||
}
|
||||
|
@ -245,9 +245,9 @@ Ecore_List *ephoto_db_list_images(sqlite3 *db, const char *album)
|
|||
album_id);
|
||||
sqlite3_exec(db, command, list_image_ids, 0, 0);
|
||||
|
||||
while(!ecore_list_is_empty(image_ids))
|
||||
while(!ecore_list_empty_is(image_ids))
|
||||
{
|
||||
id = ecore_list_remove_first(image_ids);
|
||||
id = ecore_list_first_remove(image_ids);
|
||||
snprintf(command, PATH_MAX, "SELECT path FROM images WHERE id"
|
||||
" = '%s'", id);
|
||||
sqlite3_exec(db, command, list_images, 0, 0);
|
||||
|
|
|
@ -163,7 +163,7 @@ static void previous_image(Ewl_Widget *w, void *event, void *data)
|
|||
image = ecore_dlist_current(em->images);
|
||||
if(!image)
|
||||
{
|
||||
ecore_dlist_goto_last(em->images);
|
||||
ecore_dlist_last_goto(em->images);
|
||||
image = ecore_dlist_current(em->images);
|
||||
}
|
||||
ewl_image_file_path_set(EWL_IMAGE(em->eimage), image);
|
||||
|
@ -181,7 +181,7 @@ static void next_image(Ewl_Widget *w, void *event, void *data)
|
|||
image = ecore_dlist_current(em->images);
|
||||
if(!image)
|
||||
{
|
||||
ecore_dlist_goto_first(em->images);
|
||||
ecore_dlist_first_goto(em->images);
|
||||
image = ecore_dlist_current(em->images);
|
||||
}
|
||||
ewl_image_file_path_set(EWL_IMAGE(em->eimage), image);
|
||||
|
|
|
@ -20,8 +20,8 @@ Ecore_Hash *get_exif_data(const char *file)
|
|||
args[0] = file;
|
||||
|
||||
exif_info = ecore_hash_new(ecore_str_hash, ecore_str_compare);
|
||||
ecore_hash_set_free_key(exif_info, free);
|
||||
ecore_hash_set_free_value(exif_info, free);
|
||||
ecore_hash_free_key_cb_set(exif_info, free);
|
||||
ecore_hash_free_value_cb_set(exif_info, free);
|
||||
|
||||
loader = exif_loader_new();
|
||||
exif_loader_write_file(loader, *args);
|
||||
|
@ -92,7 +92,7 @@ static void add_exif_to_container(Ewl_Widget *w, void *event, void *data)
|
|||
win = data;
|
||||
|
||||
values = ecore_list_new();
|
||||
ecore_list_set_free_cb(values, free);
|
||||
ecore_list_free_cb_set(values, free);
|
||||
|
||||
img = get_image();
|
||||
if(!img) return;
|
||||
|
@ -105,9 +105,9 @@ static void add_exif_to_container(Ewl_Widget *w, void *event, void *data)
|
|||
else
|
||||
{
|
||||
keys = ecore_hash_keys(exif_info);
|
||||
while (!ecore_list_is_empty(keys))
|
||||
while (!ecore_list_empty_is(keys))
|
||||
{
|
||||
key = ecore_list_remove_first(keys);
|
||||
key = ecore_list_first_remove(keys);
|
||||
value = ecore_hash_get(exif_info, key);
|
||||
|
||||
snprintf(text, PATH_MAX, "%s: %s", key, value);
|
||||
|
|
|
@ -31,7 +31,7 @@ static void iterate(char *point2)
|
|||
{
|
||||
char *point1;
|
||||
|
||||
ecore_dlist_goto_first(em->images);
|
||||
ecore_dlist_first_goto(em->images);
|
||||
while(ecore_dlist_current(em->images))
|
||||
{
|
||||
point1 = ecore_dlist_current(em->images);
|
||||
|
@ -132,7 +132,7 @@ static void *list_data_fetch(void *data, unsigned int row, unsigned int column)
|
|||
const char *image;
|
||||
void *val = NULL;
|
||||
|
||||
image = ecore_dlist_goto_index(em->images, row);
|
||||
image = ecore_dlist_index_goto(em->images, row);
|
||||
if (image)
|
||||
{
|
||||
val = (void *)image;
|
||||
|
@ -146,7 +146,7 @@ static unsigned int list_data_count(void *data)
|
|||
{
|
||||
int val;
|
||||
|
||||
val = ecore_list_nodes(em->images);
|
||||
val = ecore_list_count(em->images);
|
||||
|
||||
return val;
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ static void update_view(Ewl_Widget *w, void *event, void *data)
|
|||
{
|
||||
populate_directories(NULL, NULL, NULL);
|
||||
}
|
||||
ecore_dlist_goto_first(em->images);
|
||||
ecore_dlist_first_goto(em->images);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -269,7 +269,7 @@ void populate_albums(Ewl_Widget *w, void *event, void *data)
|
|||
album = ewl_widget_name_get(w);
|
||||
em->current_album = strdup(album);
|
||||
}
|
||||
if (!ecore_list_is_empty(em->albums))
|
||||
if (!ecore_list_empty_is(em->albums))
|
||||
{
|
||||
ecore_list_destroy(em->albums);
|
||||
}
|
||||
|
@ -278,7 +278,7 @@ void populate_albums(Ewl_Widget *w, void *event, void *data)
|
|||
em->albums = ephoto_db_list_albums(em->db);
|
||||
ewl_mvc_data_set(EWL_MVC(em->atree), em->albums);
|
||||
|
||||
if (!ecore_dlist_is_empty(em->images))
|
||||
if (!ecore_dlist_empty_is(em->images))
|
||||
{
|
||||
ecore_dlist_destroy(em->images);
|
||||
}
|
||||
|
@ -286,7 +286,7 @@ void populate_albums(Ewl_Widget *w, void *event, void *data)
|
|||
em->images = ecore_dlist_new();
|
||||
em->images = ephoto_db_list_images(em->db, em->current_album);
|
||||
|
||||
ecore_dlist_goto_first(em->images);
|
||||
ecore_dlist_first_goto(em->images);
|
||||
|
||||
ewl_container_reset(EWL_CONTAINER(em->fbox));
|
||||
while (ecore_dlist_current(em->images))
|
||||
|
@ -307,7 +307,7 @@ void populate_albums(Ewl_Widget *w, void *event, void *data)
|
|||
ewl_widget_configure(em->fbox_vbox);
|
||||
|
||||
ewl_mvc_data_set(EWL_MVC(em->ltree), em->images);
|
||||
ecore_dlist_goto_first(em->images);
|
||||
ecore_dlist_first_goto(em->images);
|
||||
|
||||
if (ecore_dlist_current(em->images))
|
||||
{
|
||||
|
@ -333,7 +333,7 @@ void populate_directories(Ewl_Widget *w, void *event, void *data)
|
|||
directory = ewl_widget_name_get(w);
|
||||
em->current_directory = strdup(directory);
|
||||
}
|
||||
if (!ecore_list_is_empty(em->directories))
|
||||
if (!ecore_list_empty_is(em->directories))
|
||||
{
|
||||
ecore_list_destroy(em->directories);
|
||||
}
|
||||
|
@ -341,10 +341,10 @@ void populate_directories(Ewl_Widget *w, void *event, void *data)
|
|||
em->directories = ecore_list_new();
|
||||
em->directories = get_directories(em->current_directory);
|
||||
|
||||
ecore_dlist_goto_first(em->directories);
|
||||
ecore_dlist_first_goto(em->directories);
|
||||
ewl_mvc_data_set(EWL_MVC(em->dtree), em->directories);
|
||||
|
||||
if (!ecore_list_is_empty(em->images))
|
||||
if (!ecore_list_empty_is(em->images))
|
||||
{
|
||||
ecore_dlist_destroy(em->images);
|
||||
}
|
||||
|
@ -352,7 +352,7 @@ void populate_directories(Ewl_Widget *w, void *event, void *data)
|
|||
em->images = ecore_dlist_new();
|
||||
em->images = get_images(em->current_directory);
|
||||
|
||||
ecore_dlist_goto_first(em->images);
|
||||
ecore_dlist_first_goto(em->images);
|
||||
|
||||
ewl_container_reset(EWL_CONTAINER(em->fbox));
|
||||
while (ecore_dlist_current(em->images))
|
||||
|
@ -373,7 +373,7 @@ void populate_directories(Ewl_Widget *w, void *event, void *data)
|
|||
ewl_widget_configure(em->fbox_vbox);
|
||||
|
||||
ewl_mvc_data_set(EWL_MVC(em->ltree), em->images);
|
||||
ecore_dlist_goto_first(em->images);
|
||||
ecore_dlist_first_goto(em->images);
|
||||
|
||||
if (ecore_dlist_current(em->images))
|
||||
{
|
||||
|
@ -523,7 +523,7 @@ static void *album_data_fetch(void *data, unsigned int row, unsigned int column)
|
|||
const char *album;
|
||||
void *val = NULL;
|
||||
|
||||
album = ecore_list_goto_index(em->albums, row);
|
||||
album = ecore_list_index_goto(em->albums, row);
|
||||
if (album)
|
||||
{
|
||||
val = (void *)album;
|
||||
|
@ -538,7 +538,7 @@ static void *directory_data_fetch(void *data, unsigned int row, unsigned int col
|
|||
const char *directory;
|
||||
void *val = NULL;
|
||||
|
||||
directory = ecore_list_goto_index(em->directories, row);
|
||||
directory = ecore_list_index_goto(em->directories, row);
|
||||
if (directory)
|
||||
{
|
||||
val = (void *)directory;
|
||||
|
@ -552,7 +552,7 @@ static unsigned int album_data_count(void *data)
|
|||
{
|
||||
int val;
|
||||
|
||||
val = ecore_list_nodes(em->albums);
|
||||
val = ecore_list_count(em->albums);
|
||||
|
||||
return val;
|
||||
}
|
||||
|
@ -562,7 +562,7 @@ static unsigned int directory_data_count(void *data)
|
|||
{
|
||||
int val;
|
||||
|
||||
val = ecore_list_nodes(em->directories);
|
||||
val = ecore_list_count(em->directories);
|
||||
|
||||
return val;
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ static void iterate(char *point2)
|
|||
{
|
||||
char *point1;
|
||||
|
||||
ecore_dlist_goto_first(em->images);
|
||||
ecore_dlist_first_goto(em->images);
|
||||
while(ecore_dlist_current(em->images))
|
||||
{
|
||||
point1 = ecore_dlist_current(em->images);
|
||||
|
|
|
@ -61,7 +61,7 @@ static void previous_image(Ewl_Widget *w, void *event, void *data)
|
|||
image = ecore_dlist_current(em->images);
|
||||
if(!image)
|
||||
{
|
||||
ecore_dlist_goto_last(em->images);
|
||||
ecore_dlist_last_goto(em->images);
|
||||
image = ecore_dlist_current(em->images);
|
||||
}
|
||||
ewl_image_file_path_set(EWL_IMAGE(em->simage), image);
|
||||
|
@ -80,7 +80,7 @@ static void next_image(Ewl_Widget *w, void *event, void *data)
|
|||
image = ecore_dlist_current(em->images);
|
||||
if(!image)
|
||||
{
|
||||
ecore_dlist_goto_first(em->images);
|
||||
ecore_dlist_first_goto(em->images);
|
||||
image = ecore_dlist_current(em->images);
|
||||
}
|
||||
ewl_image_file_path_set(EWL_IMAGE(em->simage), image);
|
||||
|
|
|
@ -38,7 +38,7 @@ static void show_first_image(Ewl_Widget *w, void *event, void *data)
|
|||
{
|
||||
char *image_path;
|
||||
|
||||
ecore_dlist_goto_first(em->images);
|
||||
ecore_dlist_first_goto(em->images);
|
||||
image_path = ecore_dlist_current(em->images);
|
||||
|
||||
ewl_image_file_set(EWL_IMAGE(w), image_path, NULL);
|
||||
|
|
Loading…
Reference in New Issue