Cleaning up in prep for release
authorEd Page <eopage@byu.net>
Fri, 28 May 2010 02:27:22 +0000 (21:27 -0500)
committerEd Page <eopage@byu.net>
Fri, 28 May 2010 02:27:22 +0000 (21:27 -0500)
src/constants.py
src/mormonchannel_gtk.py
src/windows/_base.py
support/builddeb.py

index e7239ca..b5ff820 100644 (file)
@@ -2,9 +2,9 @@ import os
 
 __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_
index 1624f1c..e706a94 100755 (executable)
@@ -133,27 +133,15 @@ class MormonChannelProgram(hildonize.get_app_class()):
                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:
index e4396a7..1e7a79f 100644 (file)
@@ -63,7 +63,6 @@ class BasicWindow(gobject.GObject, go_utils.AutoSignal):
                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)
@@ -75,6 +74,31 @@ class BasicWindow(gobject.GObject, go_utils.AutoSignal):
                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
@@ -97,6 +121,7 @@ class BasicWindow(gobject.GObject, go_utils.AutoSignal):
                                        e.section,
                                )
                        )
+                       windowInFullscreen = self._windowInFullscreen
 
                if windowInFullscreen:
                        self._window.fullscreen()
@@ -107,6 +132,10 @@ class BasicWindow(gobject.GObject, go_utils.AutoSignal):
                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
 
@@ -533,3 +562,18 @@ class PresenterWindow(BasicWindow):
        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()
index 203beaf..4a460f6 100755 (executable)
@@ -12,12 +12,16 @@ import constants
 
 
 __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__ = """
@@ -70,12 +74,13 @@ def build_package(distribution):
                "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([
        ])