3 gtk.HILDON_SIZE_AUTO = -1
4 gtk.HILDON_SIZE_AUTO_WIDTH = -1
5 gtk.HILDON_SIZE_FINGER_HEIGHT = 32
6 gtk.HILDON_SIZE_THUMB_HEIGHT = 48
8 BUTTON_ARRANGEMENT_VERTICAL = 1
10 def hildon_gtk_window_set_progress_indicator(wnd, onoff):
13 class Program(gtk.Window):
17 gtk.Window.__init__(self, type=gtk.WINDOW_TOPLEVEL)
18 self.set_app_paintable(True)
19 self._vbox = gtk.VBox()
20 self._title = gtk.Label("Jamaendo")
21 self._backbtn = gtk.Button("<<<")
22 self._hbox = gtk.HBox()
23 self._hbox.pack_start(self._title, True)
24 self._hbox.pack_start(self._backbtn, False)
25 self._notebook = gtk.Notebook()
26 self._notebook.set_size_request(800, 445)
27 self._notebook.set_show_tabs(False)
28 self._vbox.pack_start(self._hbox, False)
29 self._vbox.pack_start(self._notebook, True)
32 Program.instance = self
33 self._backbtn.connect('clicked', self.on_back)
37 background, mask = gtk.gdk.pixbuf_new_from_file(bgimg).render_pixmap_and_mask()
38 self.set_app_paintable(True)
40 self.window.set_back_pixmap(background, False)
45 def add_window(self, wnd):
48 def push_stackable(self, wnd):
49 while self._notebook.get_n_pages() > 0:
50 p = self._notebook.get_nth_page(0)
52 self._notebook.remove_page(0)
55 idx = self._notebook.append_page(wnd)
56 self._notebook.set_current_page(idx)
60 def popped_stackable(self, wnd=None):
63 def pop_stackable(self):
64 while self._notebook.get_n_pages() > 0:
65 p = self._notebook.get_nth_page(0)
66 self._notebook.remove_page(0)
69 tail = self._stack.pop()
70 self.push_stackable(tail)
72 def on_back(self, *args):
75 class StackableWindow(gtk.Frame):
77 gtk.Frame.__init__(self)
79 Program.instance.push_stackable(self)
80 self.connect('destroy', self.on_destroy)
81 def set_app_menu(self, menu):
84 def set_title(self, title):
85 Program.instance._title.set_text(title)#_notebook.set_tab_label_text(self, title)
87 def on_destroy(self, *args):
88 Program.instance.popped_stackable(self)
90 class AppMenu(object):
94 def append(self, widget):
100 class GtkButton(gtk.Button):
101 def __init__(self, size):
102 gtk.Button.__init__(self)
105 class Button(gtk.Button):
106 def __init__(self, size, layout):
107 gtk.Button.__init__(self)
109 def set_text(self, title, subtitle):
110 self.set_label(title)
112 class PannableArea(gtk.ScrolledWindow):