def copy_popup(self, w, reg, is_group=False): window = EntryDialog( parent=self.window, flags=0, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_OK_CANCEL, message_format="Copy Suite " + reg + """To NAME,TOP_DIRECTORY""") out = window.run() window.destroy() if out: try: name, topdir = re.split(' *, *', out) except Exception, e: warning_dialog(str(e), self.window).warn() else: print name, topdir topdir = os.path.expanduser(os.path.expandvars(topdir)) print name, topdir command = "cylc cp " + reg + ' ' + name + ' ' + topdir print command res, out = run_get_stdout(command) if not res: warning_dialog('\n'.join(out), self.window).warn() elif out: info_dialog('\n'.join(out), self.window).inform()
def copy_popup(self, w, reg, is_group=False): window = EntryDialog(parent=self.window, flags=0, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_OK_CANCEL, message_format="Copy Suite " + reg + """To NAME,TOP_DIRECTORY""") out = window.run() window.destroy() if out: try: name, topdir = re.split(' *, *', out) except Exception, e: warning_dialog(str(e), self.window).warn() else: print name, topdir topdir = os.path.expanduser(os.path.expandvars(topdir)) print name, topdir command = "cylc cp " + reg + ' ' + name + ' ' + topdir print command res, out = run_get_stdout(command) if not res: warning_dialog('\n'.join(out), self.window).warn() elif out: info_dialog('\n'.join(out), self.window).inform()
def reregister_popup(self, w, reg, is_group=False): window = EntryDialog(parent=self.window, flags=0, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_OK_CANCEL, message_format="Reregister Suite " + reg + " As") rereg = window.run() window.destroy() if rereg: command = "cylc reregister " + reg + ' ' + rereg res, out = run_get_stdout(command) if not res: warning_dialog('\n'.join(out), self.window).warn()
def reregister_popup(self, w, reg, is_group=False): window = EntryDialog( parent=self.window, flags=0, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_OK_CANCEL, message_format="Reregister Suite " + reg + " As") rereg = window.run() window.destroy() if rereg: command = "cylc reregister " + reg + ' ' + rereg res, out = run_get_stdout(command) if not res: warning_dialog('\n'.join(out), self.window).warn()
def compare_popup(self, w, reg): window = EntryDialog(parent=self.window, flags=0, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_OK_CANCEL, message_format="Compare Suite " + reg + " With") compare = window.run() window.destroy() if compare: command = "cylc diff " + reg + ' ' + compare res, out = run_get_stdout(command) if not res: warning_dialog('\n'.join(out), self.window).warn() else: # TODO: need a bigger scrollable window here! info_dialog('\n'.join(out), self.window).inform()
def compare_popup(self, w, reg): window = EntryDialog( parent=self.window, flags=0, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_OK_CANCEL, message_format="Compare Suite " + reg + " With") compare = window.run() window.destroy() if compare: command = "cylc diff " + reg + ' ' + compare res, out = run_get_stdout(command) if not res: warning_dialog('\n'.join(out), self.window).warn() else: # TODO: need a bigger scrollable window here! info_dialog('\n'.join(out), self.window).inform()