This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository xdg-desktop-portal-efl.
View the commit online.
commit ea4a0ca3ef31ae29659064a1f3cfcd1c6113495e
Author: Carsten Haitzler (Rasterman) <[email protected]>
AuthorDate: Thu Nov 26 10:48:33 2026 +0000
add a show hidden files checkbox
---
src/bin/dialog_filechooser.c | 38 ++++++++++++++++++++++++++++++++++++--
src/tests/dialog_worker_test.c | 2 +-
2 files changed, 37 insertions(+), 3 deletions(-)
diff --git a/src/bin/dialog_filechooser.c b/src/bin/dialog_filechooser.c
index e83d355..2f02fde 100644
--- a/src/bin/dialog_filechooser.c
+++ b/src/bin/dialog_filechooser.c
@@ -41,6 +41,14 @@ _filter_selected(void *data, Evas_Object *obj, void *event)
if (index >= 0) d->active = eina_list_nth(d->filters, index);
}
+static void
+_hidden_changed(void *data, Evas_Object *obj, void *event EINA_UNUSED)
+{
+ Dialog *d = data;
+
+ elm_fileselector_hidden_visible_set(d->content, elm_check_state_get(obj));
+}
+
static void
_accept(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
{
@@ -238,7 +246,7 @@ _key_down(void *data, Evas_Object *obj, Evas_Object *source EINA_UNUSED,
void
dialog_file_show(Dialog *d)
{
- Evas_Object *o, *win, *options_row, *buttons, *entry;
+ Evas_Object *o, *win, *filter_row, *filters, *options_row, *buttons, *entry;
const char *folder;
const char *home;
const char *file;
@@ -271,7 +279,6 @@ dialog_file_show(Dialog *d)
{
Eina_List *l;
Filter *f;
- Evas_Object *filters;
// The first appended filter is selected by default.
EINA_LIST_FOREACH(d->filters, l, f)
@@ -305,6 +312,33 @@ dialog_file_show(Dialog *d)
elm_box_pack_end(d->box, o);
evas_object_show(o);
+ filter_row = o = elm_box_add(win);
+ elm_box_horizontal_set(o, EINA_TRUE);
+ elm_box_padding_set(o, ELM_SCALE_SIZE(8), ELM_SCALE_SIZE(0));
+ evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0);
+ evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
+ elm_box_pack_end(d->box, o);
+ evas_object_show(o);
+
+ o = elm_check_add(win);
+ evas_object_name_set(o, "portal-show-hidden");
+ elm_object_text_set(o, "Show hidden files");
+ elm_check_state_set(o, elm_fileselector_hidden_visible_get(d->content));
+ evas_object_smart_callback_add(o, "changed", _hidden_changed, d);
+ evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0);
+ evas_object_size_hint_align_set(o, 0.0, 0.5);
+ elm_box_pack_end(filter_row, o);
+ evas_object_show(o);
+
+ filters = elm_object_part_content_unset(d->content, "elm.swallow.filters");
+ if (filters)
+ {
+ evas_object_name_set(filters, "portal-file-filter");
+ evas_object_size_hint_align_set(filters, 1.0, 0.5);
+ elm_box_pack_end(filter_row, filters);
+ evas_object_show(filters);
+ }
+
options_row = o = elm_box_add(win);
elm_box_horizontal_set(o, EINA_TRUE);
elm_box_padding_set(o, ELM_SCALE_SIZE(8), ELM_SCALE_SIZE(0));
diff --git a/src/tests/dialog_worker_test.c b/src/tests/dialog_worker_test.c
index b7c890b..b6f1950 100644
--- a/src/tests/dialog_worker_test.c
+++ b/src/tests/dialog_worker_test.c
@@ -51,7 +51,7 @@ _click(void *data EINA_UNUSED)
{
if (change_filter && !filter_changed)
{
- Evas_Object *menu = elm_object_part_content_get(fs, "elm.swallow.filters");
+ Evas_Object *menu = _find("portal-file-filter");
Eina_Iterator *children;
Eo *child;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.