From 305d76e7ff66c6e1c003d24d39e6b293cb8344c1 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 21 May 2010 20:01:23 -0500 Subject: [PATCH] Fixing the window switching bug on Maemo --- src/MormonChannel.py | 3 ++- src/mormonchannel_gtk.py | 1 - src/util/go_utils.py | 1 + src/windows/_base.py | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/MormonChannel.py b/src/MormonChannel.py index 733e0b9..333caff 100755 --- a/src/MormonChannel.py +++ b/src/MormonChannel.py @@ -33,7 +33,8 @@ if __name__ == "__main__": if e.errno != 17: raise - logging.basicConfig(level=logging.DEBUG, filename=constants._user_logpath_) + logFormat = '(%(asctime)s) %(levelname)-5s %(threadName)s.%(name)s: %(message)s' + logging.basicConfig(level=logging.DEBUG, filename=constants._user_logpath_, format=logFormat) _moduleLogger.info("%s %s-%s" % (constants.__app_name__, constants.__version__, constants.__build__)) _moduleLogger.info("OS: %s" % (os.uname()[0], )) _moduleLogger.info("Kernel: %s (%s) for %s" % os.uname()[2:]) diff --git a/src/mormonchannel_gtk.py b/src/mormonchannel_gtk.py index ffcddfd..e05ad60 100755 --- a/src/mormonchannel_gtk.py +++ b/src/mormonchannel_gtk.py @@ -3,7 +3,6 @@ """ @bug For some reason, the back/close button doesn't work when I nest multiple levels -@bug When switching from conference to magazines, it randomly jumps around and duplicates windows @todo Re-use windows for better performance @todo Make radio program updates only happen when the app has focus to reduce CPU wakes diff --git a/src/util/go_utils.py b/src/util/go_utils.py index ccfc78a..d066542 100644 --- a/src/util/go_utils.py +++ b/src/util/go_utils.py @@ -264,6 +264,7 @@ class AutoSignal(object): @misc.log_exception(_moduleLogger) def __on_destroy(self, widget): + _moduleLogger.info("Destroy: %r (%s to clean up)" % (self, len(self.__disconnectPool))) for widget, id in self.__disconnectPool: widget.disconnect(id) del self.__disconnectPool[:] diff --git a/src/windows/_base.py b/src/windows/_base.py index 0f73621..c166b3d 100644 --- a/src/windows/_base.py +++ b/src/windows/_base.py @@ -66,9 +66,9 @@ class BasicWindow(gobject.GObject, go_utils.AutoSignal): self._layout.pack_start(self._errorBanner.toplevel, False, True) self._window = gtk.Window() - go_utils.AutoSignal.__init__(self, self.window) self._window.add(self._layout) self._window = hildonize.hildonize_window(self._app, self._window) + go_utils.AutoSignal.__init__(self, self.window) self._window.set_icon(self._store.get_pixbuf_from_store(self._store.STORE_LOOKUP["icon"])) self._window.connect("key-press-event", self._on_key_press) -- 1.7.9.5