1 # -*- coding: utf-8 -*-
3 ###########################################################################
5 # Copyright (C) 2010 Simón Pena <spenap@gmail.com>
7 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 ###########################################################################
25 class Maevies(gtk.Window):
29 gtk.Window.__init__(self)
30 self.set_title("Maevies - 0.1")
31 self.connect('delete-event',
32 lambda widget, event: gtk.main_quit())
34 self._contents = gtk.HBox()
35 self._contents.set_border_width(20)
36 self._contents.set_homogeneous(True)
37 self._contents.pack_start(self._get_content_box("On Theaters"),
38 expand=True, fill=True)
39 self._contents.pack_start(self._get_content_box("Favorites"),
40 expand=True, fill=True)
41 self._contents.pack_start(self._get_content_box("Search"),
42 expand=True, fill=True)
44 self.add(self._contents)
48 def _get_content_box(self, text):
49 favorites = gtk.VBox()
50 favorites.set_border_width(20)
53 foot_label = gtk.Label()
54 foot_label.set_text(text)
56 favorites.pack_start(button,
57 expand=True, fill=True)
58 favorites.pack_start(foot_label,
59 expand=False, fill=False)
67 if __name__ == "__main__":