__pretty_app_name__ = "Mormon Channel"
__app_name__ = "MormonChannel"
-__version__ = "0.1.0"
+__version__ = "1.0.0"
__build__ = 0
-__app_magic__ = 0xdeadbeef
+__app_magic__ = 0x1AFF5
_data_path_ = os.path.join(os.path.expanduser("~"), ".%s" % __app_name__)
_user_settings_ = "%s/settings.ini" % _data_path_
_cache_path_ = "%s/cache" % _data_path_
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()
-
def run():
gobject.threads_init()
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:
self._errorBanner = banners.StackingBanner()
self._layout = gtk.VBox()
- self._layout.pack_start(self._errorBanner.toplevel, False, True)
self._window = gtk.Window()
self._window.add(self._layout)
self._window.connect("window-state-event", self._on_window_state_change)
self._window.connect("destroy", self._on_destroy)
+ if hildonize.GTK_MENU_USED:
+ aboutMenuItem = gtk.MenuItem("About")
+ aboutMenuItem.connect("activate", self._on_about)
+
+ helpMenu = gtk.Menu()
+ helpMenu.append(aboutMenuItem)
+
+ helpMenuItem = gtk.MenuItem("Help")
+ helpMenuItem.set_submenu(helpMenu)
+
+ menuBar = gtk.MenuBar()
+ menuBar.append(helpMenuItem)
+
+ self._layout.pack_start(menuBar, False, False)
+ else:
+ aboutMenuItem = gtk.Button("About")
+ aboutMenuItem.connect("clicked", self._on_about)
+
+ appMenu = hildonize.hildon.AppMenu()
+ appMenu.append(aboutMenuItem)
+ appMenu.show_all()
+ self._window.set_app_menu(appMenu)
+
+ self._layout.pack_start(self._errorBanner.toplevel, False, True)
+
@property
def window(self):
return self._window
e.section,
)
)
+ windowInFullscreen = self._windowInFullscreen
if windowInFullscreen:
self._window.fullscreen()
raise NotImplementedError("On %s" % self)
@misc_utils.log_exception(_moduleLogger)
+ def _on_about(self, *args):
+ show_about()
+
+ @misc_utils.log_exception(_moduleLogger)
def _on_destroy(self, *args):
self._isDestroyed = True
def _on_node_search_error(self, e):
self._nextSearch = None
self._errorBanner.push_message(str(e))
+
+
+def show_about():
+ # @todo Turn this into a full-fledge window to keep it rotated
+ 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("(c) 2010 Intellectual Reserve, Inc. All rights reserved.")
+ dialog.set_website("http://www.lds.org")
+ comments = "Mormon Radio and Audiobook Player"
+ dialog.set_comments(comments)
+ dialog.set_authors(["The Church of Jesus Christ of Latter-day Saints"])
+ dialog.run()
+ dialog.destroy()
__appname__ = constants.__app_name__
-__description__ = """
+__description__ = """Player for inspirational streaming radio and audiobooks including the KJV Bible
+Supports streaming:
+* "Mormon Channel" inspirational radio station
+* Conference precedings and magazines from The Church of Jesus Christ of Latter-day Saints
+* Scriptures, including King James Version of the Bible and the Book of Mormon
.
-Homepage:
+Homepage: http://www.lds.org
"""
-__author__ = "Ed Page"
-__email__ = "eopage@byu.net"
+__author__ = "The Church of Jesus Christ of Latter-day Saints"
+__email__ = ""
__version__ = constants.__version__
__build__ = constants.__build__
__changelog__ = """
"python-gtk2 | python2.5-gtk2",
"python-xml | python2.5-xml",
"python-dbus | python2.5-dbus",
+ "python-gst0.10 | python2.5-gst0.10",
])
maemoSpecificDepends = ", python-osso | python2.5-osso, python-hildon | python2.5-hildon"
p.depends += {
"debian": ", python-glade2",
- "diablo": maemoSpecificDepends + ", python2.5-conic",
- "fremantle": maemoSpecificDepends + ", python-glade2, python-alarm",
+ "diablo": maemoSpecificDepends + "",
+ "fremantle": maemoSpecificDepends + ", python-glade2",
}[distribution]
p.recommends = ", ".join([
])