From af72b465e271c749c5ad9da8b71111d3b45101bc Mon Sep 17 00:00:00 2001 From: Kai Huuhko Date: Thu, 7 Nov 2013 13:05:14 +0200 Subject: [PATCH] Elementary: Fix small issues in examples --- examples/elementary/test_calendar.py | 3 ++- examples/elementary/test_entry.py | 18 +++++++++--------- examples/elementary/test_floating.py | 4 ++++ examples/elementary/test_popup.py | 2 +- 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/examples/elementary/test_calendar.py b/examples/elementary/test_calendar.py index f774653..befe3a2 100644 --- a/examples/elementary/test_calendar.py +++ b/examples/elementary/test_calendar.py @@ -9,7 +9,8 @@ from efl.elementary.button import Button from efl.elementary.calendar_elm import Calendar, \ ELM_DAY_MONDAY, ELM_DAY_THURSDAY, ELM_DAY_SATURDAY, \ ELM_CALENDAR_UNIQUE, ELM_CALENDAR_DAILY, ELM_CALENDAR_WEEKLY, \ - ELM_CALENDAR_MONTHLY, ELM_CALENDAR_ANNUALLY + ELM_CALENDAR_MONTHLY, ELM_CALENDAR_ANNUALLY, \ + ELM_CALENDAR_SELECT_MODE_NONE, ELM_CALENDAR_SELECT_MODE_ONDEMAND from datetime import datetime diff --git a/examples/elementary/test_entry.py b/examples/elementary/test_entry.py index 5141295..44fe8aa 100644 --- a/examples/elementary/test_entry.py +++ b/examples/elementary/test_entry.py @@ -158,14 +158,14 @@ def entry_scrolled_clicked(obj, item = None): # disabled entry en = ScrollableEntry(win, size_hint_weight=EXPAND_HORIZ, - size_hint_align=FILL_HORIZ, scrollbar_policy=SCROLL_POLICY_OFF, + size_hint_align=FILL_HORIZ, policy=SCROLL_POLICY_OFF, text="Disabled entry", single_line=True, disabled=True) en.show() bx.pack_end(en) # password entry en = ScrollableEntry(win, size_hint_weight=EXPAND_HORIZ, - size_hint_align=FILL_HORIZ, scrollbar_policy=SCROLL_POLICY_OFF, + size_hint_align=FILL_HORIZ, policy=SCROLL_POLICY_OFF, password=True, single_line=True, text="Access denied, give up!", disabled=True) en.show() @@ -173,7 +173,7 @@ def entry_scrolled_clicked(obj, item = None): # multi-line disable entry en = ScrollableEntry(win, size_hint_weight=EXPAND_BOTH, - size_hint_align=FILL_BOTH, scrollbar_policy=SCROLL_POLICY_ON, + size_hint_align=FILL_BOTH, policy=SCROLL_POLICY_ON, disabled=True) en.context_menu_item_add("Hello") en.context_menu_item_add("World") @@ -192,7 +192,7 @@ def entry_scrolled_clicked(obj, item = None): # Single line selected entry en = ScrollableEntry(win, size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ, text="This is a single line", - scrollbar_policy=SCROLL_POLICY_OFF, single_line=True) + policy=SCROLL_POLICY_OFF, single_line=True) en.select_all() en.show() bx.pack_end(en) @@ -200,7 +200,7 @@ def entry_scrolled_clicked(obj, item = None): # Filter test en = ScrollableEntry(win, size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ, text="Filter test", - scrollbar_policy=SCROLL_POLICY_OFF, single_line=True) + policy=SCROLL_POLICY_OFF, single_line=True) en.show() bx.pack_end(en) @@ -253,7 +253,7 @@ def entry_scrolled_clicked(obj, item = None): # en.size_hint_weight = EVAS_HINT_EXPAND, 0.0 # en.size_hint_align = EVAS_HINT_FILL, 0.5 # en.text = "And now only 30 bytes" - # en.scrollbar_policy = ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF + # en.policy = ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF # en.single_line = True # en.show() # bx.pack_end(en) @@ -264,13 +264,13 @@ def entry_scrolled_clicked(obj, item = None): # Single line password entry en_p = ScrollableEntry(win, size_hint_weight=EXPAND_HORIZ, - size_hint_align=FILL_HORIZ, scrollbar_policy=SCROLL_POLICY_OFF, + size_hint_align=FILL_HORIZ, policy=SCROLL_POLICY_OFF, text="Password here", single_line=True, password=True) en_p.show() bx.pack_end(en_p) # entry with icon/end widgets - en = ScrollableEntry(win, scrollbar_policy=SCROLL_POLICY_OFF, + en = ScrollableEntry(win, policy=SCROLL_POLICY_OFF, single_line=True, size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH, text="entry with icon and end objects") bt = Icon(win, standard="home", size_hint_min=(48, 48), @@ -286,7 +286,7 @@ def entry_scrolled_clicked(obj, item = None): # markup entry en = ScrollableEntry(win, size_hint_weight=EXPAND_BOTH, - size_hint_align=FILL_BOTH, scrollbar_policy=SCROLL_POLICY_ON) + size_hint_align=FILL_BOTH, policy=SCROLL_POLICY_ON) en.text = "This is an entry widget in this window that
"\ "uses markup like this for styling and
"\ "formatting like this, as well as
"\ diff --git a/examples/elementary/test_floating.py b/examples/elementary/test_floating.py index 5072bdb..aa1abc3 100644 --- a/examples/elementary/test_floating.py +++ b/examples/elementary/test_floating.py @@ -1,3 +1,7 @@ +#!/usr/bin/env python +# encoding: utf-8 + +import os from math import sin from efl import elementary diff --git a/examples/elementary/test_popup.py b/examples/elementary/test_popup.py index 718f255..dc253d2 100644 --- a/examples/elementary/test_popup.py +++ b/examples/elementary/test_popup.py @@ -23,7 +23,7 @@ def cb_bnt_close(btn, popup): popup.delete() def cb_btn_restack(btn, popup): - im = evas.FilledImage(popup.evas); + im = FilledImage(popup.evas); im.file = os.path.join(img_path, "mystrale_2.jpg") im.move(40, 40) im.resize(500, 320)