Skip to content

Commit b28739e

Browse files
committedDec 29, 2014
gui: add some buttons
1 parent d85c088 commit b28739e

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed
 

‎frontend/artiq_gui.py

+26-5
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ def __delitem__(self, key):
8484
class SchedulerWindow(Gtk.Window):
8585
def __init__(self):
8686
Gtk.Window.__init__(self, title="Scheduler")
87-
self.set_border_width(10)
88-
self.set_default_size(730, 520)
87+
self.set_border_width(6)
88+
self.set_default_size(720, 570)
8989

9090
vpane = Gtk.VPaned()
91-
vpane.set_position(220)
91+
vpane.set_position(270)
9292
self.add(vpane)
9393

9494
self.queue_store = Gtk.ListStore(int, str, str, str, str)
@@ -100,7 +100,23 @@ def __init__(self):
100100
tree.append_column(column)
101101
scroll = Gtk.ScrolledWindow()
102102
scroll.add(tree)
103-
vpane.add1(scroll)
103+
vbox = Gtk.VBox(spacing=6)
104+
label = Gtk.Label("Queue")
105+
vbox.pack_start(label, False, False, 0)
106+
vbox.pack_start(scroll, True, True, 0)
107+
108+
hbox = Gtk.HBox(spacing=6)
109+
button = Gtk.Button("Find")
110+
hbox.pack_start(button, True, True, 0)
111+
button = Gtk.Button("Move up")
112+
hbox.pack_start(button, True, True, 0)
113+
button = Gtk.Button("Move down")
114+
hbox.pack_start(button, True, True, 0)
115+
button = Gtk.Button("Remove")
116+
hbox.pack_start(button, True, True, 0)
117+
vbox.pack_start(hbox, False, False, 0)
118+
vbox.set_border_width(6)
119+
vpane.add1(vbox)
104120

105121
self.periodic_store = Gtk.ListStore(str, int, str, str, str, str, str)
106122
tree = Gtk.TreeView(self.periodic_store)
@@ -111,7 +127,12 @@ def __init__(self):
111127
tree.append_column(column)
112128
scroll = Gtk.ScrolledWindow()
113129
scroll.add(tree)
114-
vpane.add2(scroll)
130+
vbox = Gtk.VBox(spacing=6)
131+
label = Gtk.Label("Periodic schedule")
132+
vbox.pack_start(label, False, False, 0)
133+
vbox.pack_start(scroll, True, True, 0)
134+
vbox.set_border_width(6)
135+
vpane.add2(vbox)
115136

116137
@asyncio.coroutine
117138
def sub_connect(self, host, port):

0 commit comments

Comments
 (0)
Please sign in to comment.