forked from enlightenment/efl
* Fileselector: honor folder_only when using EIO
* Fileselector test: add a check to enable/disable buttons Updated Changelog and NEW, also add myself as authors... btw: the EIO code in the Fileselector is crazy-complex, about 200 lines of code just to have the list of files ina dir... :/ SVN revision: 70965
This commit is contained in:
parent
6d47da0101
commit
be531ba2af
|
@ -44,3 +44,6 @@
|
||||||
|
|
||||||
* Added focus key event handling for the colorselector
|
* Added focus key event handling for the colorselector
|
||||||
|
|
||||||
|
2012-05-13 Dave Andreoli
|
||||||
|
* Fileselector: honor folder_only when using EIO
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ Fixes:
|
||||||
* Genlist : Fixed genlist expandable effect bug when we expand/contract items with many children very quickly.
|
* Genlist : Fixed genlist expandable effect bug when we expand/contract items with many children very quickly.
|
||||||
* Genlist : Realize move items during tree effect only when the item is not in the queue.
|
* Genlist : Realize move items during tree effect only when the item is not in the queue.
|
||||||
* Add missing files in the tarball.
|
* Add missing files in the tarball.
|
||||||
|
* Fileselector : honor the folder_only option when using EIO
|
||||||
|
|
||||||
Improvements:
|
Improvements:
|
||||||
|
|
||||||
|
|
|
@ -82,6 +82,19 @@ _expandable_clicked(void *data,
|
||||||
elm_fileselector_expandable_set(fs, EINA_TRUE);
|
elm_fileselector_expandable_set(fs, EINA_TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_buttons_clicked(void *data,
|
||||||
|
Evas_Object *obj __UNUSED__,
|
||||||
|
void *event_info __UNUSED__)
|
||||||
|
{
|
||||||
|
Evas_Object *fs = data;
|
||||||
|
printf("Toggle Buttons\n");
|
||||||
|
if (elm_fileselector_buttons_ok_cancel_get(fs))
|
||||||
|
elm_fileselector_buttons_ok_cancel_set(fs, EINA_FALSE);
|
||||||
|
else
|
||||||
|
elm_fileselector_buttons_ok_cancel_set(fs, EINA_TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_sel_get_clicked(void *data,
|
_sel_get_clicked(void *data,
|
||||||
Evas_Object *obj __UNUSED__,
|
Evas_Object *obj __UNUSED__,
|
||||||
|
@ -188,6 +201,13 @@ test_fileselector(void *data __UNUSED__,
|
||||||
elm_box_pack_end(hbox, bt);
|
elm_box_pack_end(hbox, bt);
|
||||||
evas_object_show(bt);
|
evas_object_show(bt);
|
||||||
|
|
||||||
|
bt = elm_check_add(win);
|
||||||
|
elm_object_text_set(bt, "buttons");
|
||||||
|
elm_check_state_set(bt, elm_fileselector_buttons_ok_cancel_get(fs));
|
||||||
|
evas_object_smart_callback_add(bt, "changed", _buttons_clicked, fs);
|
||||||
|
elm_box_pack_end(hbox, bt);
|
||||||
|
evas_object_show(bt);
|
||||||
|
|
||||||
hbox = elm_box_add(win);
|
hbox = elm_box_add(win);
|
||||||
elm_box_horizontal_set(hbox, EINA_TRUE);
|
elm_box_horizontal_set(hbox, EINA_TRUE);
|
||||||
elm_box_pack_end(vbox, hbox);
|
elm_box_pack_end(vbox, hbox);
|
||||||
|
|
|
@ -336,15 +336,19 @@ _anchors_do(Evas_Object *obj,
|
||||||
|
|
||||||
#ifdef HAVE_EIO
|
#ifdef HAVE_EIO
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_ls_filter_cb(void *data __UNUSED__,
|
_ls_filter_cb(void *data,
|
||||||
Eio_File *handler,
|
Eio_File *handler,
|
||||||
const Eina_File_Direct_Info *info)
|
const Eina_File_Direct_Info *info)
|
||||||
{
|
{
|
||||||
|
Listing_Request *lreq = data;
|
||||||
const char *filename;
|
const char *filename;
|
||||||
|
|
||||||
if (info->path[info->name_start] == '.')
|
if (info->path[info->name_start] == '.')
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
|
|
||||||
|
if (lreq->sd->only_folder && info->type != EINA_FILE_DIR)
|
||||||
|
return EINA_FALSE;
|
||||||
|
|
||||||
filename = eina_stringshare_add(info->path);
|
filename = eina_stringshare_add(info->path);
|
||||||
eio_file_associate_direct_add
|
eio_file_associate_direct_add
|
||||||
(handler, "filename", filename, EINA_FREE_CB(eina_stringshare_del));
|
(handler, "filename", filename, EINA_FREE_CB(eina_stringshare_del));
|
||||||
|
|
Loading…
Reference in New Issue