import pygtk
import pango
import gobject
-from random import randint
import random
pygtk.require("2.0")
import gtk
self.show_all()
- def _create_box(self, title, action):
+ def _create_button(self, title, subtitle, action):
box = gtk.VBox()
box.set_border_width(20)
- button = gtk.Button()
+ button = hildon.Button(gtk.HILDON_SIZE_THUMB_HEIGHT,
+ hildon.BUTTON_ARRANGEMENT_VERTICAL, title, subtitle)
button.connect("clicked", self._button_clicked, action)
- foot_label = gtk.Label()
- foot_label.set_text(title)
box.pack_start(button,
- expand = True, fill = True)
- box.pack_start(foot_label,
- expand = False, fill = False)
+ expand = True, fill = False)
return box
contents = gtk.HBox()
contents.set_border_width(60)
contents.set_homogeneous(True)
- contents.pack_start(self._create_box(title = "On Theaters",
- action = self.ACTION_THEATERS),
+ contents.pack_start(self._create_button("On Theaters", "Movies playing",
+ self.ACTION_THEATERS),
expand = True, fill = True)
- contents.pack_start(self._create_box(title = "Favorites",
- action = self.ACTION_FAVORITES),
+ contents.pack_start(self._create_button("Favorites", "Your saved searches",
+ self.ACTION_FAVORITES),
expand = True, fill = True)
- contents.pack_start(self._create_box(title = "Search",
- action = self.ACTION_SEARCH),
+ contents.pack_start(self._create_button("Search", "Enter a new search",
+ self.ACTION_SEARCH),
expand = True, fill = True)
return contents;
}
self.append(row.values())
-if __name__ == "__main__":
- maevies = Maevies()
- maevies.run()
-
class AboutDialog(gtk.Dialog):
def __init__(self, parent):
return self._get_placeholder_pixbuf()
def _get_placeholder_pixbuf(self):
- pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(constants.PLACEHOLDER_IMAGE,
- constants.IMAGE_WIDTH,
- constants.IMAGE_HEIGHT)
+ pixbuf = gtk.IconTheme().load_icon('general_video_file', 48, 0)
return pixbuf
+
+if __name__ == "__main__":
+ maevies = Maevies()
+ maevies.run()