Ejemplo n.º 1
0
def fsck_volume(parent, device, check=False):
    if check:
        check_str = 'check'
    else:
        check_str = 'repair'

    title = 'File System ' + check_str.capitalize()

    dialog = TerminalDialog(parent=parent, title=title)
    terminal = dialog.terminal

    dialog.finished = False
    terminal.connect('child-exited', child_exited, dialog)

    command = fsck_command(device, check)
    gobject.idle_add(start_command, terminal, command, dialog)

    while 1:
        dialog.run()

        if dialog.finished:
            break

        msg = ('File system %s is still running. You should not close this '
               'window until it is finished' % check_str)

        info = gtk.MessageDialog(parent=dialog,
                                 flags=gtk.DIALOG_DESTROY_WITH_PARENT,
                                 type=gtk.MESSAGE_WARNING,
                                 buttons=gtk.BUTTONS_CLOSE,
                                 message_format=msg)
        info.run()
        info.destroy()
 
    dialog.destroy()
Ejemplo n.º 2
0
def fsck_volume(parent, device, check=False):
    if check:
        check_str = 'check'
    else:
        check_str = 'repair'

    title = 'File System ' + check_str.capitalize()

    dialog = TerminalDialog(parent=parent, title=title)
    terminal = dialog.terminal

    dialog.finished = False
    terminal.connect('child-exited', child_exited, dialog)

    command = fsck_command(device, check)
    gobject.idle_add(start_command, terminal, command, dialog)

    while 1:
        dialog.run()

        if dialog.finished:
            break

        msg = ('File system %s is still running. You should not close this '
               'window until it is finished' % check_str)

        info = gtk.MessageDialog(parent=dialog,
                                 flags=gtk.DIALOG_DESTROY_WITH_PARENT,
                                 type=gtk.MESSAGE_WARNING,
                                 buttons=gtk.BUTTONS_CLOSE,
                                 message_format=msg)
        info.run()
        info.destroy()

    dialog.destroy()
Ejemplo n.º 3
0
    title = 'Propagate Cluster Configuration'

    dialog = TerminalDialog(parent=parent, title=title)
    terminal = dialog.terminal

    dialog.finished = False
    dialog.show_all()

    host_iter = iter(hosts)
    terminal.connect('child-exited', propagate, dialog, command, host_iter)

    propagate(terminal, dialog, command, host_iter)

    while 1:
        dialog.run()

        if dialog.finished:
            break

        msg = ('Cluster configuration propagation is still running. You '
               'should not close this window until it is finished')

        info = gtk.MessageDialog(parent=dialog,
                                 flags=gtk.DIALOG_DESTROY_WITH_PARENT,
                                 type=gtk.MESSAGE_WARNING,
                                 buttons=gtk.BUTTONS_CLOSE,
                                 message_format=msg)
        info.run()
        info.destroy()