Added 'helldon' to transparently port the thing to the desktop :P
[jamaendo] / helldon / __init__.py
1 import gtk
2
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
7
8 BUTTON_ARRANGEMENT_VERTICAL = 1
9
10 def hildon_gtk_window_set_progress_indicator(wnd, onoff):
11     pass
12
13 class Program(gtk.Window):
14     instance = None
15
16     def __init__(self):
17         gtk.Window.__init__(self, type=gtk.WINDOW_TOPLEVEL)
18         self._vbox = gtk.VBox()
19         self._title = gtk.Label("Jamaendo")
20         self._backbtn = gtk.Button("<<<")
21         self._hbox = gtk.HBox()
22         self._hbox.pack_start(self._title, True)
23         self._hbox.pack_start(self._backbtn, False)
24         self._notebook = gtk.Notebook()
25         self._notebook.set_size_request(800, 445)
26         self._notebook.set_show_tabs(False)
27         self._vbox.pack_start(self._hbox, False)
28         self._vbox.pack_start(self._notebook, True)
29         self.add(self._vbox)
30         self.show_all()
31         Program.instance = self
32
33     def add_window(self, wnd):
34         pass
35
36     def add_stackable(self, wnd):
37         idx = self._notebook.append_page(wnd)
38         self._notebook.set_current_page(idx)
39         wnd.show_all()
40         wnd._nb_index = idx
41
42 class StackableWindow(gtk.Frame):
43     def __init__(self):
44         gtk.Frame.__init__(self)
45         self._nb_index = 0
46         Program.instance.add_stackable(self)
47     def set_app_menu(self, menu):
48         pass
49
50     def set_title(self, title):
51         Program.instance._title.set_text(title)#_notebook.set_tab_label_text(self, title)
52
53 class AppMenu(object):
54     def __init__(self):
55         pass
56
57     def append(self, widget):
58         pass
59
60     def show_all(self):
61         pass
62
63 class GtkButton(gtk.Button):
64     def __init__(self, size):
65         gtk.Button.__init__(self)
66
67
68 class Button(gtk.Button):
69     def __init__(self, size, layout):
70         gtk.Button.__init__(self)
71
72     def set_text(self, title, subtitle):
73         self.set_label(title)
74
75 class PannableArea(gtk.ScrolledWindow):
76     pass