summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
6cfc05f)
* Changed MainWindow buttons
* Replaced movie placeholder image with a maemo stock one
* Reduced timeout so tests are quicker
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
- 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 = 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)
- expand = True, fill = True)
- box.pack_start(foot_label,
- expand = False, fill = False)
+ expand = True, fill = False)
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;
}
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):
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)
+
+if __name__ == "__main__":
+ maevies = Maevies()
+ maevies.run()
os.pardir,
os.pardir,
'data'))
os.pardir,
os.pardir,
'data'))
-
-PLACEHOLDER_IMAGE = os.path.join(LOCAL_DATA_DIR, 'placeholderimage.png')
-
-IMAGE_WIDTH = 100
-
-IMAGE_HEIGHT = 60
-
-TIMEOUT_TIME_MILLIS = 2000
+TIMEOUT_TIME_MILLIS = 500