From 974ba5cae1a3194d243a9252f90bc694db22efec Mon Sep 17 00:00:00 2001 From: Abraxa Date: Thu, 28 Aug 2008 22:22:31 +0000 Subject: [PATCH] Add FRAMETIME constant to remove magic number supplied to edje.frametime_set() Make EvasCanvas.__init__() honor the WIDTH and HEIGHT constants git-svn-id: http://www.neo1973-germany.de/svn@99 46df4e5c-bc4e-4628-a0fc-830ba316316d --- epydial/epydial.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/epydial/epydial.py b/epydial/epydial.py index 154cd40..14cd52c 100755 --- a/epydial/epydial.py +++ b/epydial/epydial.py @@ -7,6 +7,7 @@ __license__ = "GPL3" WIDTH = 480 HEIGHT = 640 +FRAMETIME = 1.0 / 20 FULLSCREEN = True TITLE = "epydial" WM_INFO = ("epydial", "epydial") @@ -145,7 +146,7 @@ class dialer_main(edje_group): class TestView(object): def __init__(self): - edje.frametime_set(1.0 / 20) + edje.frametime_set(FRAMETIME) self.evas_canvas = EvasCanvas(fullscreen=FULLSCREEN, engine="x11-16", size="480x640") self.groups = {} @@ -165,7 +166,7 @@ class EvasCanvas(object): print "warning: x11-16 is not supported, fallback to x11" f = ecore.evas.SoftwareX11 - self.evas_obj = f(w=480, h=640) + self.evas_obj = f(w=WIDTH, h=HEIGHT) self.evas_obj.callback_delete_request = self.on_delete_request self.evas_obj.callback_resize = self.on_resize