Continually update the selected row in the radio program, switching to a new day...
[watersofshiloah] / src / windows / source.py
index acf964e..56a745d 100644 (file)
@@ -17,8 +17,8 @@ _moduleLogger = logging.getLogger(__name__)
 
 class SourceSelector(windows._base.BasicWindow):
 
-       def __init__(self, player, store, index):
-               windows._base.BasicWindow.__init__(self, player, store)
+       def __init__(self, app, player, store, index):
+               windows._base.BasicWindow.__init__(self, app, player, store)
                self._languages = []
                self._index = index
 
@@ -26,30 +26,22 @@ class SourceSelector(windows._base.BasicWindow):
 
                self._radioButton = self._create_button("radio", "Radio")
                self._radioButton.connect("clicked", self._on_source_selected, stream_index.SOURCE_RADIO)
-               self._radioWrapper = gtk.VBox()
-               self._radioWrapper.pack_start(self._radioButton, False, True)
 
                self._conferenceButton = self._create_button("conferences", "Conferences")
                self._conferenceButton.connect("clicked", self._on_source_selected, stream_index.SOURCE_CONFERENCES)
-               self._conferenceWrapper = gtk.VBox()
-               self._conferenceWrapper.pack_start(self._conferenceButton, False, True)
 
                self._magazineButton = self._create_button("magazines", "Magazines")
                self._magazineButton.connect("clicked", self._on_source_selected, stream_index.SOURCE_MAGAZINES)
-               self._magazineWrapper = gtk.VBox()
-               self._magazineWrapper.pack_start(self._magazineButton, False, True)
 
                self._scriptureButton = self._create_button("scriptures", "Scriptures")
                self._scriptureButton.connect("clicked", self._on_source_selected, stream_index.SOURCE_SCRIPTURES)
-               self._scriptureWrapper = gtk.VBox()
-               self._scriptureWrapper.pack_start(self._scriptureButton, False, True)
 
                self._buttonLayout = gtk.VButtonBox()
                self._buttonLayout.set_layout(gtk.BUTTONBOX_SPREAD)
-               self._buttonLayout.pack_start(self._radioWrapper, True, True)
-               self._buttonLayout.pack_start(self._conferenceWrapper, True, True)
-               self._buttonLayout.pack_start(self._magazineWrapper, True, True)
-               self._buttonLayout.pack_start(self._scriptureWrapper, True, True)
+               self._buttonLayout.pack_start(self._radioButton, True, True)
+               self._buttonLayout.pack_start(self._conferenceButton, True, True)
+               self._buttonLayout.pack_start(self._magazineButton, True, True)
+               self._buttonLayout.pack_start(self._scriptureButton, True, True)
 
                self._separator = gtk.HSeparator()
                self._playcontrol = playcontrol.NavControl(player, store)
@@ -88,7 +80,8 @@ class SourceSelector(windows._base.BasicWindow):
                image = self._store.get_image_from_store(self._store.STORE_LOOKUP[icon])
 
                label = gtk.Label()
-               label.set_text(message)
+               label.set_use_markup(True)
+               label.set_markup("<big>%s</big>" % message)
 
                buttonLayout = gtk.HBox(False, 5)
                buttonLayout.pack_start(image, False, False)
@@ -117,7 +110,7 @@ class SourceSelector(windows._base.BasicWindow):
                        Source = windows.magazines.MagazinesWindow
                elif node.id == stream_index.SOURCE_SCRIPTURES:
                        Source = windows.scriptures.ScripturesWindow
-               sourceWindow = Source(self._player, self._store, node)
+               sourceWindow = Source(self._app, self._player, self._store, node)
                sourceWindow.window.set_modal(True)
                sourceWindow.window.set_transient_for(self._window)
                sourceWindow.window.set_default_size(*self._window.get_size())