Skip to content

Commit 3566cd1

Browse files
committedDec 30, 2014
gui: notebook and enable switch
1 parent 2a60c74 commit 3566cd1

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed
 

‎artiq/gui/scheduler.py

+21-10
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,19 @@ def __init__(self):
8383
Window.__init__(self, title="Scheduler")
8484
self.set_default_size(720, 570)
8585

86-
vpane = Gtk.VPaned()
87-
vpane.set_position(270)
88-
self.add(vpane)
86+
topvbox = Gtk.VBox(spacing=6)
87+
self.add(topvbox)
88+
89+
hbox = Gtk.HBox(spacing=6)
90+
enable = Gtk.Switch(active=True)
91+
label = Gtk.Label("Run experiments")
92+
label.set_justify(Gtk.Justification.RIGHT)
93+
hbox.pack_start(label, False, False, 0)
94+
hbox.pack_start(enable, False, False, 0)
95+
topvbox.pack_start(hbox, False, False, 0)
96+
97+
notebook = Gtk.Notebook()
98+
topvbox.pack_start(notebook, True, True, 0)
8999

90100
self.queue_store = Gtk.ListStore(int, str, str, str, str)
91101
tree = Gtk.TreeView(self.queue_store)
@@ -97,10 +107,7 @@ def __init__(self):
97107
scroll = Gtk.ScrolledWindow()
98108
scroll.add(tree)
99109
vbox = Gtk.VBox(spacing=6)
100-
label = Gtk.Label("Queue")
101-
vbox.pack_start(label, False, False, 0)
102110
vbox.pack_start(scroll, True, True, 0)
103-
104111
hbox = Gtk.HBox(spacing=6)
105112
button = Gtk.Button("Find")
106113
hbox.pack_start(button, True, True, 0)
@@ -112,7 +119,7 @@ def __init__(self):
112119
hbox.pack_start(button, True, True, 0)
113120
vbox.pack_start(hbox, False, False, 0)
114121
vbox.set_border_width(6)
115-
vpane.add1(vbox)
122+
notebook.insert_page(vbox, Gtk.Label("Queue"), -1)
116123

117124
self.periodic_store = Gtk.ListStore(str, int, str, str, str, str, str)
118125
tree = Gtk.TreeView(self.periodic_store)
@@ -124,11 +131,15 @@ def __init__(self):
124131
scroll = Gtk.ScrolledWindow()
125132
scroll.add(tree)
126133
vbox = Gtk.VBox(spacing=6)
127-
label = Gtk.Label("Periodic schedule")
128-
vbox.pack_start(label, False, False, 0)
129134
vbox.pack_start(scroll, True, True, 0)
135+
hbox = Gtk.HBox(spacing=6)
136+
button = Gtk.Button("Change period")
137+
hbox.pack_start(button, True, True, 0)
138+
button = Gtk.Button("Remove")
139+
hbox.pack_start(button, True, True, 0)
140+
vbox.pack_start(hbox, False, False, 0)
130141
vbox.set_border_width(6)
131-
vpane.add2(vbox)
142+
notebook.insert_page(vbox, Gtk.Label("Periodic schedule"), -1)
132143

133144
@asyncio.coroutine
134145
def sub_connect(self, host, port):

0 commit comments

Comments
 (0)
Please sign in to comment.