Making text on lists more thumb friendly
[watersofshiloah] / src / windows / radio.py
index 0f80479..12d6394 100644 (file)
@@ -4,6 +4,7 @@ import logging
 import gobject
 import gtk
 
+import hildonize
 import util.misc as misc_utils
 import banners
 import presenter
@@ -16,8 +17,8 @@ _moduleLogger = logging.getLogger(__name__)
 
 class RadioWindow(windows._base.BasicWindow):
 
-       def __init__(self, player, store, node):
-               windows._base.BasicWindow.__init__(self, player, store)
+       def __init__(self, app, player, store, node):
+               windows._base.BasicWindow.__init__(self, app, player, store)
                self._node = node
                self._childNode = None
 
@@ -40,15 +41,20 @@ class RadioWindow(windows._base.BasicWindow):
 
                textrenderer = gtk.CellRendererText()
                timeColumn = gtk.TreeViewColumn("Time")
+               timeColumn.set_property("sizing", gtk.TREE_VIEW_COLUMN_FIXED)
+               timeColumn.set_property("fixed-width", 80)
                timeColumn.pack_start(textrenderer, expand=True)
                timeColumn.add_attribute(textrenderer, "text", 0)
 
                textrenderer = gtk.CellRendererText()
+               hildonize.set_cell_thumb_selectable(textrenderer)
                titleColumn = gtk.TreeViewColumn("Program")
+               titleColumn.set_property("sizing", gtk.TREE_VIEW_COLUMN_FIXED)
                titleColumn.pack_start(textrenderer, expand=True)
                titleColumn.add_attribute(textrenderer, "text", 1)
 
                self._treeView = gtk.TreeView()
+               self._treeView.set_property("fixed-height-mode", True)
                self._treeView.set_headers_visible(False)
                self._treeView.set_model(self._programmingModel)
                self._treeView.append_column(timeColumn)