-PROJECT_NAME=MormonChannel
+PROJECT_NAME=WatersOfShiloah
SOURCE_PATH=src
SOURCE=$(shell find $(SOURCE_PATH) -iname "*.py")
-PROGRAM=$(SOURCE_PATH)/mormonchannel_gtk.py
+PROGRAM=$(SOURCE_PATH)/watersofshiloah_gtk.py
DATA_PATH=data
DATA_TYPES=*.ini *.map *.glade *.png
DATA=$(foreach type, $(DATA_TYPES), $(shell find $(DATA_PATH) -iname "$(type)")) data/COPYING
-Copyright 2010 Intellectual Reserve, Inc.
+label_radio.png
+http://en.wikipedia.org/wiki/File:Radio-icon.svg
+FDL
+CC-A-SA 3.0 Unported
+
+label_magazines.png
+http://commons.wikimedia.org/wiki/File:Book-icon.svg
+FDL
+CC-A-SA 3.0 Unported
+CC-A-SA 2.5 Generic, 2.0 Generic, 1.0 Generic
+
+label_scriptures.png
+http://www.sshek.com/
+http://cdn.iconfinder.net/icondetails/46884/80/book_icon
+Free for Commercial Use (but not resale)
+
+label_rss.png
+http://cdn.iconfinder.net/icondetails/42454/32/broadcast_feed_rss_icon
+CC-A-SA 3.0 Unported
+
+label_conference.png
+http://cdn.iconfinder.net/icondetails/50702/48/man_person_user_icon
+http://www.mirkku.com/
+Free for Commercial Use
+
+background_magazines_p.jpg
+http://www.flickr.com/photos/sufw/4085028851/
+CC-A-SA 2.0 Generic
+background_magazines_l.jpg
+http://www.flickr.com/photos/jdsumsion/90539373/
+CC-A-SA 2.0 Generic
+
+background_conference_p.png
+http://www.flickr.com/photos/twopoos/46251335/
+CC-A-SA 2.0 Generic
+background_conference_l.png
+http://www.flickr.com/photos/cbrown1023/2668350108/
+CC-A 2.0 Generic
+
+background_scriptures_l.png
+http://www.flickr.com/photos/jmwk/3517372902/
+CC-A 2.0 Generic
+background_scriptures_p.png
+http://www.flickr.com/photos/29811338@N05/4949956227/
+CC-A 2.0 Generic
+
+button_play.png
+http://www.iconfinder.com/icondetails/50039/48/button_grey_play_icon
+http://www.mirkku.com/
+Free for Commercial Use
+
+button_pause.png
+http://www.iconfinder.com/icondetails/50038/48/button_grey_pause_icon
+http://www.mirkku.com/
+Free for Commercial Use
+
+button_stop.png
+http://www.iconfinder.com/icondetails/50042/48/button_grey_stop_icon
+http://www.mirkku.com/
+Free for Commercial Use
+
+button_prev.png
+http://www.iconfinder.com/icondetails/50041/48/button_grey_rewind_icon
+http://www.mirkku.com/
+Free for Commercial Use
+
+button_next.png
+http://www.iconfinder.com/icondetails/50036/48/button_fastforward_grey_icon
+http://www.mirkku.com/
+Free for Commercial Use
+
+button_add.png
+http://www.iconfinder.com/icondetails/50033/48/add_button_grey_icon
+http://www.mirkku.com/
+Free for Commercial Use
+
+button_remove.png
+http://www.iconfinder.com/icondetails/50035/48/button_delete_grey_icon
+http://www.mirkku.com/
+Free for Commercial Use
+
+button_favorite.png
+http://www.iconfinder.com/icondetails/50037/48/button_grey_heart_icon
+http://www.mirkku.com/
+Free for Commercial Use
+
+button_close.png
+http://www.iconfinder.com/icondetails/50034/48/button_close_grey_icon
+http://www.mirkku.com/
+Free for Commercial Use
+
+button_play_pressed.png
+http://www.iconfinder.com/icondetails/50029/48/button_green_play_icon
+http://www.mirkku.com/
+Free for Commercial Use
+
+button_pause_pressed.png
+http://www.iconfinder.com/icondetails/50058/48/button_red_pause_icon
+http://www.mirkku.com/
+Free for Commercial Use
+
+button_stop_pressed.png
+http://www.iconfinder.com/icondetails/50062/48/button_red_stop_icon
+http://www.mirkku.com/
+Free for Commercial Use
+
+button_prev_pressed.png
+http://www.iconfinder.com/icondetails/50031/48/button_green_rewind_icon
+http://www.mirkku.com/
+Free for Commercial Use
+
+button_next_pressed.png
+http://www.iconfinder.com/icondetails/50026/48/button_fastforward_green_icon
+http://www.mirkku.com/
+Free for Commercial Use
+
+button_add_pressed.png
+http://www.iconfinder.com/icondetails/50023/48/add_button_green_icon
+http://www.mirkku.com/
+Free for Commercial Use
+
+button_remove_pressed.png
+http://www.iconfinder.com/icondetails/50055/48/button_delete_red_icon
+http://www.mirkku.com/
+Free for Commercial Use
+
+button_favorite_pressed.png
+http://www.iconfinder.com/icondetails/50027/48/button_green_heart_icon
+http://www.mirkku.com/
+Free for Commercial Use
+
+button_close_pressed.png
+http://www.iconfinder.com/icondetails/50054/48/button_close_red_icon
+http://www.mirkku.com/
+Free for Commercial Use
+
+icon.png
+http://www.iconfinder.com/icondetails/16619/129/animal_coccinelle_eau_insect_ladybird_leaf_pool_water_icon
+http://iconka.com/2008/03/05/319/
+Free for public use with link to site
+++ /dev/null
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-"""
-Copyright (C) 2007 Christoph Würstle
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License version 2 as
-published by the Free Software Foundation.
-"""
-
-import os
-import sys
-import logging
-
-_moduleLogger = logging.getLogger(__name__)
-sys.path.append('../lib')
-
-
-import constants
-import mormonchannel_gtk
-
-
-if __name__ == "__main__":
- try:
- os.makedirs(constants._data_path_)
- except OSError, e:
- if e.errno != 17:
- raise
-
- try:
- os.makedirs(constants._cache_path_)
- except OSError, e:
- if e.errno != 17:
- raise
-
- 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("Hostname: %s" % os.uname()[1])
-
- mormonchannel_gtk.run()
--- /dev/null
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import os
+import sys
+import logging
+
+_moduleLogger = logging.getLogger(__name__)
+sys.path.append('../lib')
+
+
+import constants
+import watersofshiloah_gtk
+
+
+if __name__ == "__main__":
+ try:
+ os.makedirs(constants._data_path_)
+ except OSError, e:
+ if e.errno != 17:
+ raise
+
+ try:
+ os.makedirs(constants._cache_path_)
+ except OSError, e:
+ if e.errno != 17:
+ raise
+
+ 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("Hostname: %s" % os.uname()[1])
+
+ watersofshiloah_gtk.run()
import os
-__pretty_app_name__ = "Mormon Channel"
-__app_name__ = "mormonchannel"
+__pretty_app_name__ = "Waters of Shiloah"
+__app_name__ = "watersofshiloah"
__version__ = "1.0.0"
__build__ = 0
__app_magic__ = 0x1AFF5
class ImageStore(object):
STORE_LOOKUP = {
- "next": "next.png",
- "prev": "prev.png",
+ "next": "button_next.png",
+ "prev": "button_prev.png",
"home": "home.png",
- "pause": "pause.png",
- "play": "play.png",
- "stop": "stop.png",
- "pause_pressed": "pausepressed.png",
- "play_pressed": "playpressed.png",
- "stop_pressed": "stoppressed.png",
-
- "small_next": "small_next.png",
- "small_prev": "small_prev.png",
- "small_home": "small_home.png",
- "small_pause": "small_pause.png",
- "small_play": "small_play.png",
- "small_stop": "small_stop.png",
- "small_pause_pressed": "small_pausepressed.png",
- "small_play_pressed": "small_playpressed.png",
- "small_stop_pressed": "small_stoppressed.png",
-
- "loading": "loading.gif",
+ "pause": "button_pause.png",
+ "play": "button_play.png",
+ "stop": "button_stop.png",
+ "add": "button_add.png",
+ "remove": "button_remove.png",
+ "favorite": "button_favorite.png",
+ "next_pressed": "button_next_pressed.png",
+ "prev_pressed": "button_prev_pressed.png",
+ "home_pressed": "home_pressed.png",
+ "pause_pressed": "button_pause_pressed.png",
+ "play_pressed": "button_play_pressed.png",
+ "stop_pressed": "button_stop_pressed.png",
+ "add_pressed": "button_add_pressed.png",
+ "remove_pressed": "button_remove_pressed.png",
+ "favorite_pressed": "button_favorite_pressed.png",
"radio_header": "radio_header.png",
"conference_background": "background_conference_p.png",
"scripture_background": "background_scriptures_p.png",
"scripture_background_landscape": "background_scriptures_l.png",
- "conferences": "conference.png",
- "magazines": "magazines.png",
- "mormonmessages": "mormonmessages.png",
- "radio": "radio.png",
- "scriptures": "scriptures.png",
+ "conferences": "label_conference.png",
+ "magazines": "label_magazines.png",
+ "radio": "label_radio.png",
+ "scriptures": "label_scriptures.png",
- "more": "more.png",
+ "loading": "loading.gif",
"icon": "icon.png",
"nomagazineimage": "nomagazineimage.png",
}
+++ /dev/null
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-"""
-@todo Reverse order option. Toggle between playing ascending/descending chronological order
-"""
-
-from __future__ import with_statement
-
-import os
-import gc
-import logging
-import ConfigParser
-
-import gobject
-import dbus
-import dbus.mainloop.glib
-import gtk
-
-try:
- import osso
-except ImportError:
- osso = None
-
-import constants
-import hildonize
-import util.misc as misc_utils
-
-import imagestore
-import player
-import stream_index
-import windows
-
-
-_moduleLogger = logging.getLogger(__name__)
-PROFILE_STARTUP = False
-
-
-class MormonChannelProgram(hildonize.get_app_class()):
-
- def __init__(self):
- super(MormonChannelProgram, self).__init__()
- currentPath = os.path.abspath(__file__)
- storePath = os.path.join(os.path.split(os.path.dirname(currentPath))[0], "data")
- self._store = imagestore.ImageStore(storePath, constants._cache_path_)
- self._index = stream_index.AudioIndex()
- self._player = player.Player(self._index)
-
- self._store.start()
- self._index.start()
- try:
- if not hildonize.IS_HILDON_SUPPORTED:
- _moduleLogger.info("No hildonization support")
-
- if osso is not None:
- self._osso_c = osso.Context(constants.__app_name__, constants.__version__, False)
- self._deviceState = osso.DeviceState(self._osso_c)
- self._deviceState.set_device_state_callback(self._on_device_state_change, 0)
- else:
- _moduleLogger.info("No osso support")
- self._osso_c = None
- self._deviceState = None
-
- self._sourceSelector = windows.source.SourceSelector(self, self._player, self._store, self._index)
- self._sourceSelector.window.connect("destroy", self._on_destroy)
- self._sourceSelector.window.set_default_size(400, 800)
- self._sourceSelector.show()
- self._load_settings()
- except:
- self._index.stop()
- self._store.stop()
- raise
-
- def _save_settings(self):
- config = ConfigParser.SafeConfigParser()
-
- self._sourceSelector.save_settings(config, "Windows")
-
- with open(constants._user_settings_, "wb") as configFile:
- config.write(configFile)
-
- def _load_settings(self):
- config = ConfigParser.SafeConfigParser()
- config.read(constants._user_settings_)
-
- self._sourceSelector.load_settings(config, "Windows")
-
- @misc_utils.log_exception(_moduleLogger)
- def _on_device_state_change(self, shutdown, save_unsaved_data, memory_low, system_inactivity, message, userData):
- """
- For system_inactivity, we have no background tasks to pause
-
- @note Hildon specific
- """
- if memory_low:
- gc.collect()
-
- if save_unsaved_data or shutdown:
- self._save_settings()
-
- @misc_utils.log_exception(_moduleLogger)
- def _on_destroy(self, widget = None, data = None):
- try:
- self.quit()
- finally:
- gtk.main_quit()
-
- def quit(self):
- try:
- self._save_settings()
- except Exception:
- _moduleLogger.exception("Error saving settigns")
-
- 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)
- except Exception:
- _moduleLogger.exception("Error closing osso state")
-
-
-def run():
- gobject.threads_init()
- gtk.gdk.threads_init()
- l = dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
-
- # HACK Playback while silent on Maemo 5
- hildonize.set_application_name("FMRadio")
-
- app = MormonChannelProgram()
- if not PROFILE_STARTUP:
- try:
- gtk.main()
- except KeyboardInterrupt:
- app.quit()
- raise
- else:
- app.quit()
-
-
-if __name__ == "__main__":
- logging.basicConfig(level=logging.DEBUG)
- run()
--- /dev/null
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+"""
+@todo Reverse order option. Toggle between playing ascending/descending chronological order
+"""
+
+from __future__ import with_statement
+
+import os
+import gc
+import logging
+import ConfigParser
+
+import gobject
+import dbus
+import dbus.mainloop.glib
+import gtk
+
+try:
+ import osso
+except ImportError:
+ osso = None
+
+import constants
+import hildonize
+import util.misc as misc_utils
+
+import imagestore
+import player
+import stream_index
+import windows
+
+
+_moduleLogger = logging.getLogger(__name__)
+PROFILE_STARTUP = False
+
+
+class WatersOfShiloahProgram(hildonize.get_app_class()):
+
+ def __init__(self):
+ super(WatersOfShiloahProgram, self).__init__()
+ currentPath = os.path.abspath(__file__)
+ storePath = os.path.join(os.path.split(os.path.dirname(currentPath))[0], "data")
+ self._store = imagestore.ImageStore(storePath, constants._cache_path_)
+ self._index = stream_index.AudioIndex()
+ self._player = player.Player(self._index)
+
+ self._store.start()
+ self._index.start()
+ try:
+ if not hildonize.IS_HILDON_SUPPORTED:
+ _moduleLogger.info("No hildonization support")
+
+ if osso is not None:
+ self._osso_c = osso.Context(constants.__app_name__, constants.__version__, False)
+ self._deviceState = osso.DeviceState(self._osso_c)
+ self._deviceState.set_device_state_callback(self._on_device_state_change, 0)
+ else:
+ _moduleLogger.info("No osso support")
+ self._osso_c = None
+ self._deviceState = None
+
+ self._sourceSelector = windows.source.SourceSelector(self, self._player, self._store, self._index)
+ self._sourceSelector.window.connect("destroy", self._on_destroy)
+ self._sourceSelector.window.set_default_size(400, 800)
+ self._sourceSelector.show()
+ self._load_settings()
+ except:
+ self._index.stop()
+ self._store.stop()
+ raise
+
+ def _save_settings(self):
+ config = ConfigParser.SafeConfigParser()
+
+ self._sourceSelector.save_settings(config, "Windows")
+
+ with open(constants._user_settings_, "wb") as configFile:
+ config.write(configFile)
+
+ def _load_settings(self):
+ config = ConfigParser.SafeConfigParser()
+ config.read(constants._user_settings_)
+
+ self._sourceSelector.load_settings(config, "Windows")
+
+ @misc_utils.log_exception(_moduleLogger)
+ def _on_device_state_change(self, shutdown, save_unsaved_data, memory_low, system_inactivity, message, userData):
+ """
+ For system_inactivity, we have no background tasks to pause
+
+ @note Hildon specific
+ """
+ if memory_low:
+ gc.collect()
+
+ if save_unsaved_data or shutdown:
+ self._save_settings()
+
+ @misc_utils.log_exception(_moduleLogger)
+ def _on_destroy(self, widget = None, data = None):
+ try:
+ self.quit()
+ finally:
+ gtk.main_quit()
+
+ def quit(self):
+ try:
+ self._save_settings()
+ except Exception:
+ _moduleLogger.exception("Error saving settigns")
+
+ 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)
+ except Exception:
+ _moduleLogger.exception("Error closing osso state")
+
+
+def run():
+ gobject.threads_init()
+ gtk.gdk.threads_init()
+ l = dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
+
+ # HACK Playback while silent on Maemo 5
+ hildonize.set_application_name("FMRadio")
+
+ app = WatersOfShiloahProgram()
+ if not PROFILE_STARTUP:
+ try:
+ gtk.main()
+ except KeyboardInterrupt:
+ app.quit()
+ raise
+ else:
+ app.quit()
+
+
+if __name__ == "__main__":
+ logging.basicConfig(level=logging.DEBUG)
+ run()
+++ /dev/null
-[Desktop Entry]
-Encoding=UTF-8
-Version=1.0
-Type=Application
-Name=MormonChannel
-Exec=/usr/bin/run-standalone.sh /opt/MormonChannel/bin/MormonChannel.py
-Icon=MormonChannel
--- /dev/null
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Name=Waters of Shiloah
+Exec=/usr/bin/run-standalone.sh /opt/WatersOfShiloah/bin/WatersOfShiloah.py
+Icon=WatersOfShiloah
* 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: http://www.lds.org
+Homepage:
"""
-__author__ = "The Church of Jesus Christ of Latter-day Saints"
-__email__ = "lds-tech@ldschurch.org"
+__author__ = "Ed Page"
+__email__ = "eopage@byu.net"
__version__ = constants.__version__
__build__ = constants.__build__
__changelog__ = """
p.repository = "extras"
p.changelog = __changelog__
p.postinstall = __postinstall__
- p.icon = "48x48-MormonChannel.png"
- p["/opt/MormonChannel/bin"] = ["MormonChannel.py"]
+ p.icon = "48x48-WatersOfShiloah.png"
+ p["/opt/WatersOfShiloah/bin"] = ["WatersOfShiloah.py"]
for relPath, files in unflatten_files(find_files("src", ".")).iteritems():
- fullPath = "/opt/MormonChannel/lib"
+ fullPath = "/opt/WatersOfShiloah/lib"
if relPath:
fullPath += os.sep+relPath
p[fullPath] = list(
for (oldName, newName) in files
)
for relPath, files in unflatten_files(find_files("data", ".")).iteritems():
- fullPath = "/opt/MormonChannel/share"
+ fullPath = "/opt/WatersOfShiloah/share"
if relPath:
fullPath += os.sep+relPath
p[fullPath] = list(
"|".join((oldName, newName))
for (oldName, newName) in files
)
- p["/usr/share/applications/hildon"] = ["MormonChannel.desktop"]
- p["/usr/share/icons/hicolor/48x48/hildon"] = ["48x48-MormonChannel.png|MormonChannel.png"]
+ p["/usr/share/applications/hildon"] = ["WatersOfShiloah.desktop"]
+ p["/usr/share/icons/hicolor/48x48/hildon"] = ["48x48-WatersOfShiloah.png|WatersOfShiloah.png"]
if distribution == "debian":
print p