]>
Dogcows Code - chaz/openbox/blob - tests/hideshow.py
8 class FolderSelector(gtk
.Window
):
9 def __init__(self
, jules
):
10 gtk
.Window
.__init
__(self
, gtk
.WINDOW_TOPLEVEL
)
11 print "init folder selector", self
, jules
12 self
.set_title("Select Folder")
15 self
.set_size_request(140, 200)
17 self
.list_model
= gtk
.ListStore(gobject
.TYPE_STRING
)
18 self
.tree
= gtk
.TreeView(self
.list_model
)
19 self
.folder_column
= gtk
.TreeViewColumn('Folder')
20 self
.tree
.append_column(self
.folder_column
)
22 self
.folder_cell
= gtk
.CellRendererText()
23 self
.folder_column
.pack_start(self
.folder_cell
, True)
24 self
.folder_column
.add_attribute(self
.folder_cell
, 'text', 0)
26 self
.tree
.set_search_column(0)
28 self
.icon_theme
= gtk
.icon_theme_get_default()
32 self
.tree
.columns_autosize()
35 class Jules(gtk
.Window
):
37 gtk
.Window
.__init
__(self
, gtk
.WINDOW_TOPLEVEL
)
38 self
.set_title("Jules")
39 self
.set_size_request(150, 320)
40 self
.connect("delete_event", self
.on_delete_event
)
41 self
.connect("destroy", self
.on_destroy
)
42 self
.scroll
= gtk
.ScrolledWindow()
44 self
.tree_model
= gtk
.TreeStore(gobject
.TYPE_STRING
,
46 self
.tree
= gtk
.TreeView(self
.tree_model
)
47 self
.file_column
= gtk
.TreeViewColumn('name', gtk
.CellRendererText(),
49 self
.file_column
.set_sort_indicator(True)
50 self
.file_column
.set_clickable(True)
51 self
.file_column
.set_sort_column_id(1)
52 self
.tree
.append_column(self
.file_column
)
53 self
.tree
.set_headers_clickable(True)
54 self
.tree
.set_search_column(0)
56 self
.scroll
.add(self
.tree
)
60 self
.project_selector
= FolderSelector(self
)
61 self
.project_selector
.hide()
62 self
.project_selector
.hide()
64 self
.project_selector
.show()
66 def on_delete_event(self
, widget
, event
):
69 def on_destroy(self
, widget
):
76 if __name__
== "__main__":
This page took 0.036096 seconds and 4 git commands to generate.