projects
/
maevies
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ui: Several UI changes
[maevies]
/
ui
/
maeviesui
/
maeviesui
/
gui.py
diff --git
a/ui/maeviesui/maeviesui/gui.py
b/ui/maeviesui/maeviesui/gui.py
index
270c8c2
..
dd53b06
100644
(file)
--- a/
ui/maeviesui/maeviesui/gui.py
+++ b/
ui/maeviesui/maeviesui/gui.py
@@
-24,7
+24,6
@@
import hildon
import pygtk
import pango
import gobject
import pygtk
import pango
import gobject
-from random import randint
import random
pygtk.require("2.0")
import gtk
import random
pygtk.require("2.0")
import gtk
@@
-47,19
+46,16
@@
class Maevies(hildon.StackableWindow):
self.show_all()
self.show_all()
- def _create_box(self, title, action):
+ def _create_button(self, title, subtitle, action):
box = gtk.VBox()
box.set_border_width(20)
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)
button.connect("clicked", self._button_clicked, action)
- foot_label = gtk.Label()
- foot_label.set_text(title)
box.pack_start(button,
box.pack_start(button,
- expand = True, fill = True)
- box.pack_start(foot_label,
- expand = False, fill = False)
+ expand = True, fill = False)
return box
return box
@@
-67,14
+63,14
@@
class Maevies(hildon.StackableWindow):
contents = gtk.HBox()
contents.set_border_width(60)
contents.set_homogeneous(True)
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)
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)
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;
expand = True, fill = True)
return contents;
@@
-246,10
+242,6
@@
class MoviesListStore(gtk.ListStore):
}
self.append(row.values())
}
self.append(row.values())
-if __name__ == "__main__":
- maevies = Maevies()
- maevies.run()
-
class AboutDialog(gtk.Dialog):
def __init__(self, parent):
class AboutDialog(gtk.Dialog):
def __init__(self, parent):
@@
-283,7
+275,9
@@
class MovieDecorator:
return self._get_placeholder_pixbuf()
def _get_placeholder_pixbuf(self):
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
return pixbuf
+
+if __name__ == "__main__":
+ maevies = Maevies()
+ maevies.run()