aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authordavemds <dave@gurumeditation.it>2014-01-08 22:06:29 +0100
committerdavemds <dave@gurumeditation.it>2014-01-08 22:06:29 +0100
commitbd063f0ecef750a7b26f0359360dff5fb1712da9 (patch)
tree90195371926d2637cf4fc637d6827105c75f257a /examples
parentadd new Clock.pause property (since 1.9) (diff)
downloadpython-efl-bd063f0ecef750a7b26f0359360dff5fb1712da9.tar.gz
add new Filesector.sort_method property (since 1.9)
Diffstat (limited to 'examples')
-rw-r--r--examples/elementary/test_fileselector.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/examples/elementary/test_fileselector.py b/examples/elementary/test_fileselector.py
index c2d477f..de4dc5c 100644
--- a/examples/elementary/test_fileselector.py
+++ b/examples/elementary/test_fileselector.py
@@ -12,7 +12,7 @@ from efl.elementary.label import Label
from efl.elementary.button import Button
from efl.elementary.check import Check
from efl.elementary.list import List
-from efl.elementary.fileselector import Fileselector
+from efl.elementary.fileselector import Fileselector, ELM_FILESELECTOR_SORT_LAST
from efl.elementary.fileselector_button import FileselectorButton
from efl.elementary.fileselector_entry import FileselectorEntry
from efl.elementary.separator import Separator
@@ -46,6 +46,10 @@ def ck_cb_buttons(bt, fs):
print("Toggle buttons_ok_cancel")
fs.buttons_ok_cancel = not fs.buttons_ok_cancel
+def ck_cb_hidden(bt, fs):
+ print("Toggle hidden_visible")
+ fs.hidden_visible = not fs.hidden_visible
+
def bt_cb_sel_get(bt, fs):
print("Get Selected:" + fs.selected_get())
@@ -56,6 +60,9 @@ def bt_cb_mode_cycle(bt, fs):
mode = fs.mode + 1
fs.mode_set(mode if mode < 2 else 0)
+def bt_cb_sort_cycle(bt, fs):
+ sort_method = fs.sort_method + 1
+ fs.sort_method = sort_method if sort_method < ELM_FILESELECTOR_SORT_LAST else 0
def fileselector_clicked(obj, item=None):
win = StandardWindow("fileselector", "File selector test", autodel=True,
@@ -102,6 +109,11 @@ def fileselector_clicked(obj, item=None):
hbox.pack_end(ck)
ck.show()
+ ck = Check(win, text="hidden", state=fs.hidden_visible)
+ ck.callback_changed_add(ck_cb_hidden, fs)
+ hbox.pack_end(ck)
+ ck.show()
+
hbox = Box(win, horizontal=True)
vbox.pack_end(hbox)
hbox.show()
@@ -121,6 +133,11 @@ def fileselector_clicked(obj, item=None):
hbox.pack_end(bt)
bt.show()
+ bt = Button(win, text="sort_method cycle")
+ bt.callback_clicked_add(bt_cb_sort_cycle, fs)
+ hbox.pack_end(bt)
+ bt.show()
+
win.resize(240, 350)
win.show()