Fixing the window switching bug on Maemo
authorEd Page <eopage@byu.net>
Sat, 22 May 2010 01:01:23 +0000 (20:01 -0500)
committerEd Page <eopage@byu.net>
Sat, 22 May 2010 01:01:23 +0000 (20:01 -0500)
src/MormonChannel.py
src/mormonchannel_gtk.py
src/util/go_utils.py
src/windows/_base.py

index 733e0b9..333caff 100755 (executable)
@@ -33,7 +33,8 @@ if __name__ == "__main__":
                if e.errno != 17:
                        raise
 
                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:])
        _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:])
index ffcddfd..e05ad60 100755 (executable)
@@ -3,7 +3,6 @@
 
 """
 @bug For some reason, the back/close button doesn't work when I nest multiple levels
 
 """
 @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
 
 @todo Re-use windows for better performance
 @todo Make radio program updates only happen when the app has focus to reduce CPU wakes
index ccfc78a..d066542 100644 (file)
@@ -264,6 +264,7 @@ class AutoSignal(object):
 
        @misc.log_exception(_moduleLogger)
        def __on_destroy(self, widget):
 
        @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[:]
                for widget, id in self.__disconnectPool:
                        widget.disconnect(id)
                del self.__disconnectPool[:]
index 0f73621..c166b3d 100644 (file)
@@ -66,9 +66,9 @@ class BasicWindow(gobject.GObject, go_utils.AutoSignal):
                self._layout.pack_start(self._errorBanner.toplevel, False, True)
 
                self._window = gtk.Window()
                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)
                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)
 
                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)