Change my mind on how I wanted to initialize the lists.
SVN revision: 28655
This commit is contained in:
parent
0ca324cbbf
commit
ba0a27c3ea
|
@ -11,7 +11,7 @@ static int list_image_ids(void *notused, int argc, char **argv, char **col);
|
|||
static int image_id, album_id;
|
||||
|
||||
/*Ephoto databasing ecore global variables*/
|
||||
static Ecore_List *albums = NULL, *images_list = NULL, *image_ids = NULL;
|
||||
static Ecore_List *albums, *images_list, *image_ids;
|
||||
|
||||
/*Open the sqlite3 database. Create the database if it does not already exits.*/
|
||||
sqlite3 *ephoto_db_init(void)
|
||||
|
@ -20,6 +20,10 @@ sqlite3 *ephoto_db_init(void)
|
|||
char path2[PATH_MAX];
|
||||
sqlite3 *db;
|
||||
|
||||
albums = ecore_list_new();
|
||||
images_list = ecore_dlist_new();
|
||||
image_ids = ecore_list_new();
|
||||
|
||||
snprintf(path, PATH_MAX, "%s/.ephoto/.ephoto_database", getenv("HOME"));
|
||||
snprintf(path2, PATH_MAX, "%s/.ephoto", getenv("HOME"));
|
||||
|
||||
|
|
|
@ -55,8 +55,8 @@ void create_main_gui(void)
|
|||
|
||||
em = NULL;
|
||||
em = calloc(1, sizeof(Ephoto_Main));
|
||||
em->albums = NULL;
|
||||
em->images = NULL;
|
||||
em->albums = ecore_list_new();
|
||||
em->images = ecore_dlist_new();
|
||||
|
||||
em->win = ewl_window_new();
|
||||
ewl_window_title_set(EWL_WINDOW(em->win), "Ephoto!");
|
||||
|
@ -189,7 +189,7 @@ static void populate(Ewl_Widget *w, void *event, void *data)
|
|||
album = data;
|
||||
}
|
||||
|
||||
if (em->images)
|
||||
if (!ecore_list_is_empty(em->images))
|
||||
{
|
||||
ecore_dlist_destroy(em->images);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue