Esempio n. 1
0
    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()
Esempio n. 2
0
    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()
Esempio n. 3
0
    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()
Esempio n. 4
0
    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()
Esempio n. 5
0
    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()
Esempio n. 6
0
    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()