示例#1
0
static void
gocomics_create_menu (void)
{
    Evas_Object *o;
    int i;

    /* Create List */
    ENNA_OBJECT_DEL(mod->list);
    o = enna_list_add(enna->layout);

    for (i = 0; gocomics_list_map[i].name; i++)
    {
        Enna_File *item;

        item = calloc(1, sizeof(Enna_File));
        item->label   = (char *) gocomics_list_map[i].name;
        item->uri     = (char *) gocomics_list_map[i].id;
        item->type = ENNA_FILE_FILE;
        enna_list_file_append(o, item, gocomics_select_comic, (void *) item);
    }

    enna_list_select_nth(o, 0);
    mod->list = o;
    elm_object_part_content_set(mod->layout, "service.browser.swallow", o);
}
示例#2
0
文件: games_sys.c 项目: GeeXboX/enna
static void
games_sys_create_games_list(void)
{
    Evas_Object *o;
    char gamesdir[4096];

    /* Create List */
    ENNA_OBJECT_DEL(mod->o_list);
    o = enna_list_add(enna->evas);

    /* Populate list */
    mod->count = 0;
    sprintf(gamesdir, "%s/games", enna_config_home_get());
    _parse_directory(o, gamesdir);
    _parse_directory(o, "/usr/share/applications");

    /* Select the first and 'show' */
    enna_list_select_nth(o, 0);
    mod->o_list = o;
    edje_object_part_swallow(mod->o_edje, "service.browser.swallow", o);
    games_service_total_show(mod->count);
}