# -*- coding: utf-8 -*-
"""
-@todo backgrounds need some resizing
-@todo Re-use windows for better performance
-@bug For some reason, the back/close button doesn't work when I nest multiple levels
+@todo Add python-support support, http://svn.debian.org/viewsvn/collab-maint/deb-maint/python-support/trunk/README
+@todo Use XDG
@todo Need to confirm id's are persistent (not just for todos but broken behavior on transition)
@todo Track recent
@todo Persisted Pause
@todo Favorites
@todo Sleep timer
-@todo Reverse order option. Toggle between playing ascending/descending chronological order
@todo Podcast integration
+ @todo Default with BYU Devotionals, http://speeches.byu.edu/?act=help&page=podcast
+ @todo Mormon Messages
+@todo Reverse order option. Toggle between playing ascending/descending chronological order
+@todo Jump to website
+@todo Offline mode
+@todo Re-use windows for better performance
+@todo Make radio program updates only happen when the app has focus to reduce CPU wakes
"""
from __future__ import with_statement
gtk.main_quit()
def quit(self):
- self._save_settings()
+ try:
+ self._save_settings()
+ except Exception:
+ _moduleLogger.exception("Error saving settigns")
- 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 <eopage@byu.net>"])
- dialog.run()
- dialog.destroy()
+ except Exception:
+ _moduleLogger.exception("Error closing osso state")
def run():
gtk.gdk.threads_init()
l = dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
- hildonize.set_application_title(constants.__pretty_app_name__)
+ # HACK Playback while silent on Maemo 5
+ hildonize.set_application_name("FMRadio")
+
app = MormonChannelProgram()
if not PROFILE_STARTUP:
try: