File: gdl_test.py

package info (click to toggle)
gnome-python-extras 2.19.1-3.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 3,640 kB
  • ctags: 736
  • sloc: sh: 8,856; ansic: 5,031; xml: 1,319; python: 769; makefile: 460
file content (35 lines) | stat: -rw-r--r-- 738 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/python
import pygtk
pygtk.require("2.0")
import gtk
import gdl

win = gtk.Window(gtk.WINDOW_TOPLEVEL)

dock = gdl.Dock()
layout = gdl.DockLayout(dock)

item1 = gdl.DockItem("item1", "Item #1", gtk.STOCK_EXECUTE,gdl.DOCK_ITEM_BEH_NORMAL)
button = gtk.Button ("test")
item1.add(button)
dock.add_item (item1, gdl.DOCK_RIGHT)

item1.dock_to(None, gdl.DOCK_FLOATING, -1)

item1.show_all()

item2 = gdl.DockItem("item2", "Item #2", gtk.STOCK_EXECUTE, gdl.DOCK_ITEM_BEH_NORMAL | gdl.DOCK_ITEM_BEH_CANT_ICONIFY | gdl.DOCK_ITEM_BEH_CANT_CLOSE)
button = gtk.Button ("test2")
item2.add(button)
dock.add_item (item2, gdl.DOCK_RIGHT)

item2.dock_to(None, gdl.DOCK_FLOATING, -1)

item2.show_all()


win.add(dock)


win.show_all()
gtk.main()