X-Git-Url: http://git.maemo.org/git/?p=watersofshiloah;a=blobdiff_plain;f=src%2Fmormonchannel_gtk.py;h=8565ebcc96fe82f9c663d6deb37ad6301d61493e;hp=1624f1c7828cb869815d116a660da6fbde91ed24;hb=f9f19fa907ef159a5275939170d696ff316f68d3;hpb=fc543aa8cc332c7b60bd37be65a3e3006beac70e diff --git a/src/mormonchannel_gtk.py b/src/mormonchannel_gtk.py index 1624f1c..8565ebc 100755 --- a/src/mormonchannel_gtk.py +++ b/src/mormonchannel_gtk.py @@ -2,6 +2,7 @@ # -*- coding: utf-8 -*- """ +@todo Add python-support support, http://svn.debian.org/viewsvn/collab-maint/deb-maint/python-support/trunk/README @todo Need to confirm id's are persistent (not just for todos but broken behavior on transition) @todo Track recent @todo Persisted Pause @@ -118,34 +119,36 @@ class MormonChannelProgram(hildonize.get_app_class()): gtk.main_quit() def quit(self): - self._save_settings() + try: + self._save_settings() + except Exception: + _moduleLogger.exception("Error saving settigns") - self._player.stop() - self._index.stop() - self._store.stop() + try: + self._player.stop() + except Exception: + _moduleLogger.exception("Error stopping player") + try: + self._index.stop() + except Exception: + _moduleLogger.exception("Error stopping index") + try: + self._store.stop() + except Exception: + _moduleLogger.exception("Error stopping store") try: self._deviceState.close() except AttributeError: pass # Either None or close was removed (in Fremantle) + except Exception: + _moduleLogger.exception("Error closing device state") try: self._osso_c.close() except AttributeError: pass # Either None or close was removed (in Fremantle) - - @misc_utils.log_exception(_moduleLogger) - def _on_show_about(self, widget = None, data = None): - dialog = gtk.AboutDialog() - dialog.set_position(gtk.WIN_POS_CENTER) - dialog.set_name(constants.__pretty_app_name__) - dialog.set_version(constants.__version__) - dialog.set_copyright("") - dialog.set_website("") - comments = "Mormon Radio and Audiobook Player" - dialog.set_comments(comments) - dialog.set_authors(["Ed Page "]) - dialog.run() - dialog.destroy() + except Exception: + _moduleLogger.exception("Error closing osso state") def run(): @@ -153,7 +156,9 @@ def run(): gtk.gdk.threads_init() l = dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) - hildonize.set_application_name("FMRadio") # Playback while silent on Maemo 5 + # HACK Playback while silent on Maemo 5 + hildonize.set_application_name("FMRadio") + app = MormonChannelProgram() if not PROFILE_STARTUP: try: