Skip to content

Commit

Permalink
Merge pull request #2161 from matthewrmshin/gui-insert-no-check
Browse files Browse the repository at this point in the history
gui: insert --no-check
  • Loading branch information
hjoliver authored Feb 20, 2017
2 parents c0615e6 + 7fb3e67 commit 496d2e9
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions lib/cylc/gui/app_gcylc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2142,15 +2142,19 @@ def insert_task_popup(self, *b, **kwargs):
hbox.pack_start(entry_stop_point, True)
vbox.pack_start(hbox)

no_check_cb = gtk.CheckButton(
"Do not check if cycle point is valid or not")
no_check_cb.set_active(False)
vbox.pack_start(no_check_cb, True)

help_button = gtk.Button("_Help")
help_button.connect("clicked", self.command_help, "control", "insert")

hbox = gtk.HBox()
insert_button = gtk.Button("_Insert")
insert_button.connect(
"clicked", self.insert_task, window, entry_task_ids,
entry_stop_point,
)
entry_stop_point, no_check_cb)
cancel_button = gtk.Button("_Cancel")
cancel_button.connect("clicked", lambda x: window.destroy())
hbox.pack_start(insert_button, False)
Expand All @@ -2161,7 +2165,8 @@ def insert_task_popup(self, *b, **kwargs):
window.add(vbox)
window.show_all()

def insert_task(self, w, window, entry_task_ids, entry_stop_point):
def insert_task(
self, w, window, entry_task_ids, entry_stop_point, no_check_cb):
"""Insert a task, callback for "insert_task_popup"."""
task_ids = shlex.split(entry_task_ids.get_text())
if not task_ids:
Expand All @@ -2179,8 +2184,8 @@ def insert_task(self, w, window, entry_task_ids, entry_stop_point):
stop_point_str = None
self.put_comms_command(
'insert_tasks', items=task_ids,
stop_point_string=stop_point_str
)
stop_point_string=stop_point_str,
no_check=no_check_cb.get_active())

def poll_all(self, w):
"""Poll all active tasks."""
Expand Down

0 comments on commit 496d2e9

Please sign in to comment.