From aedb86b36d28ee430f319d0e8d30f97a112b1d9e Mon Sep 17 00:00:00 2001 From: Abraxa Date: Sun, 31 Aug 2008 04:15:56 +0000 Subject: [PATCH] Add Dialer.get_evas() Rename parameters from "main" to "screen_manager", as that's what the Dialer class is git-svn-id: http://www.neo1973-germany.de/svn@109 46df4e5c-bc4e-4628-a0fc-830ba316316d --- epydial/epydial.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/epydial/epydial.py b/epydial/epydial.py index d2be6ce..e536d2f 100755 --- a/epydial/epydial.py +++ b/epydial/epydial.py @@ -36,8 +36,7 @@ from pyneo.sys_support import pr_set_name from ConfigParser import SafeConfigParser class EdjeGroup(edje.Edje): - def __init__(self, main, group): - self.main = main + def __init__(self, group_manager, group): # Theme file name is formed as follows: # Last two group name parts, combined by underscore @@ -49,19 +48,19 @@ class EdjeGroup(edje.Edje): raise IOError("Edje theme file for group %s not found: %s" % (group, file_name)) try: - edje.Edje.__init__(self, self.main.evas_canvas.evas_obj.evas, file=file_name, group=group) + edje.Edje.__init__(self, group_manager.get_evas(), file=file_name, group=group) except edje.EdjeLoadError, e: raise SystemExit("Error loading %s: %s" % (file_name, e)) - self.size = self.main.evas_canvas.evas_obj.evas.size + self.size = group_manager.get_evas().size class InCallScreen(EdjeGroup): - def __init__(self, main): - EdjeGroup.__init__(self, main, INCALL_SCREEN_NAME) + def __init__(self, screen_manager): + EdjeGroup.__init__(self, screen_manager, INCALL_SCREEN_NAME) class MainScreen(EdjeGroup): - def __init__(self, main): - EdjeGroup.__init__(self, main, MAIN_SCREEN_NAME) + def __init__(self, screen_manager): + EdjeGroup.__init__(self, screen_manager, MAIN_SCREEN_NAME) self.text = [] dbus_ml = e_dbus.DBusEcoreMainLoop() @@ -186,6 +185,9 @@ class Dialer(object): else: screen.hide() + def get_evas(self): + return self.evas_canvas.evas_obj.evas + class EvasCanvas(object): def __init__(self, fullscreen, engine_name): if engine_name == "x11":