Esempio n. 1
0
    def __init__(self, gui):
        self.gui = gui
        self.gui.register_vulnerable(self)

        # Create grid control for cells
        # xx xy xz ||x|| pbc
        # yx yy yz ||y|| pbc
        # zx zy zz ||z|| pbc
        self.cell_grid = []
        self.pbc = []
        self.angles = []

        atoms = self.gui.atoms

        cell = atoms.cell
        mags = cell.lengths()
        angles = cell.angles()
        pbc = atoms.pbc

        for i in [0, 1, 2]: # x_ y_ z_
            row = []
            for j in [0, 1, 2]: # _x _y _z
                row.append(ui.SpinBox(cell[i][j], -30, 30, 0.1,
                           self.apply_vectors, rounding=7, width=9))
            row.append(ui.SpinBox(mags[i], -30, 30, 0.1, self.apply_magnitudes,
                                  rounding=7, width=9))
            self.cell_grid.append(row)
            self.pbc.append(ui.CheckButton('', bool(pbc[i]), self.apply_pbc))
            self.angles.append(ui.SpinBox(angles[i], -360, 360, 15,
                                          self.apply_angles,
                                          rounding=7, width=9))

        self.scale_atoms = ui.CheckButton('', False)
        self.vacuum = ui.SpinBox(5, 0, 15, 0.1, self.apply_vacuum)

        # TRANSLATORS: This is a title of a window.
        win = self.win = ui.Window(_('Cell Editor'))

        x, y, z = self.cell_grid

        win.add([_('A:'), x[0], x[1], x[2], _('||A||:'), x[3],
                 _('periodic:'), self.pbc[0]])
        win.add([_('B:'), y[0], y[1], y[2], _('||B||:'), y[3],
                 _('periodic:'), self.pbc[1]])
        win.add([_('C:'), z[0], z[1], z[2], _('||C||:'), z[3],
                 _('periodic:'), self.pbc[2]])
        win.add([_('∠BC:'), self.angles[0], _('∠AC:'), self.angles[1],
                 _('∠AB:'), self.angles[2]])
        win.add([_('Scale atoms with cell:'), self.scale_atoms])
        win.add([ui.Button(_('Apply Vectors'), self.apply_vectors),
                 ui.Button(_('Apply Magnitudes'), self.apply_magnitudes),
                 ui.Button(_('Apply Angles'), self.apply_angles)])
        win.add([_('Pressing 〈Enter〉 as you enter values will '
                    'automatically apply correctly')])
        # TRANSLATORS: verb
        win.add([ui.Button(_('Center'), self.apply_center),
                 ui.Button(_('Wrap'), self.apply_wrap),
                 _('Vacuum:'), self.vacuum,
                 ui.Button(_('Apply Vacuum'), self.apply_vacuum)])
Esempio n. 2
0
 def __init__(self, gui):
     ui.Window.__init__(self)
     self.gui = gui
     self.set_title(_('Expert user mode'))
     vbox = ui.VBox()
     vbox.set_border_width(5)
     self.sw = ui.ScrolledWindow()
     self.sw.set_policy(ui.POLICY_AUTOMATIC, ui.POLICY_AUTOMATIC)
     self.textview = ui.TextView()
     self.textbuffer = self.textview.get_buffer()
     self.textview.set_editable(False)
     self.textview.set_cursor_visible(False)
     self.sw.add(self.textview)
     pack(vbox, self.sw, expand=True, padding=5)
     self.sw.set_size_request(540, 150)
     self.textview.show()
     self.add_text(_('Welcome to the ASE Expert user mode'))
     self.cmd = ui.Entry(60)
     self.cmd.connect('activate', self.execute)
     self.cmd.connect('key-press-event', self.update_command_buffer)
     pack(vbox, [ui.Label('>>>'), self.cmd])
     self.cmd_buffer = getattr(gui, 'expert_mode_buffer', [''])
     self.cmd_position = len(self.cmd_buffer) - 1
     self.selected = ui.CheckButton(_('Only selected atoms (sa)   '))
     self.selected.connect('toggled', self.selected_changed)
     self.images_only = ui.CheckButton(_('Only current frame (cf)  '))
     self.images_only.connect('toggled', self.images_changed)
     pack(vbox, [self.selected, self.images_only])
     save_button = ui.Button(_('Save'))
     save_button.connect('clicked', self.save_output)
     help_button = ui.Button(_('Help'))
     help_button.connect('clicked', self.terminal_help, "")
     stop_button = ui.Button(_('Stop'))
     stop_button.connect('clicked', self.stop_execution)
     self.stop = False
     pack(vbox, [
         ui.Label(
             _('Global: Use A, D, E, M, N, R, S, n, frame;'
               ' Atoms: Use a, f, m, s, x, y, z, Z     ')), stop_button,
         help_button, save_button
     ],
          end=True)
     self.add(vbox)
     vbox.show()
     self.show()
     # set color mode to manual when opening this window for rgb
     # manipulation
     self.colors = self.gui.get_colors()
     rgb_data = self.gui.get_colors(rgb=True)
     self.rgb_data = []  # ensure proper format of rgb_data
     for i, rgb in enumerate(rgb_data):
         self.rgb_data += [[i, rgb]]
     self.gui.colordata = self.rgb_data
     self.gui.colors = list(self.colors)
     self.gui.colormode = 'manual'
     self.cmd.grab_focus()
Esempio n. 3
0
def window():
    def hello(event=None):
        print('hello', event)

    menu = [('Hi', [ui.MenuItem('_Hello', hello, 'Ctrl+H')]),
            ('Hell_o', [ui.MenuItem('ABC', hello, choices='ABC')])]
    win = ui.MainWindow('Test', menu=menu)

    win.add(ui.Label('Hello'))
    win.add(ui.Button('Hello', hello))

    r = ui.Rows([ui.Label(x * 7) for x in 'abcd'])
    win.add(r)
    r.add('11111\n2222\n333\n44\n5')

    def abc(x):
        print(x, r.rows)

    cb = ui.ComboBox(['Aa', 'Bb', 'Cc'], callback=abc)
    win.add(cb)

    rb = ui.RadioButtons(['A', 'B', 'C'], 'ABC', abc)
    win.add(rb)

    b = ui.CheckButton('Hello')

    def hi():
        print(b.value, rb.value, cb.value)
        del r[2]
        r.add('-------------')

    win.add([b, ui.Button('Hi', hi)])

    return win
Esempio n. 4
0
    def __init__(self, gui):
        self.element = Element('', self.apply)
        self.structure = ui.ComboBox(structures, structures,
                                     self.structure_changed)
        self.structure_warn = ui.Label('', 'red')
        self.orthogonal = ui.CheckButton('', True, self.make)
        self.lattice_a = ui.SpinBox(3.2, 0.0, 10.0, 0.001, self.make)
        self.retrieve = ui.Button(_('Get from database'),
                                  self.structure_changed)
        self.lattice_c = ui.SpinBox(None, 0.0, 10.0, 0.001, self.make)
        self.x = ui.SpinBox(1, 1, 30, 1, self.make)
        self.x_warn = ui.Label('', 'red')
        self.y = ui.SpinBox(1, 1, 30, 1, self.make)
        self.y_warn = ui.Label('', 'red')
        self.z = ui.SpinBox(1, 1, 30, 1, self.make)
        self.vacuum_check = ui.CheckButton('', False, self.vacuum_checked)
        self.vacuum = ui.SpinBox(5, 0, 40, 0.01, self.make)
        self.description = ui.Label('')

        win = self.win = ui.Window(_('Surface'))
        win.add(ui.Text(introtext))
        win.add(self.element)
        win.add([_('Structure:'), self.structure, self.structure_warn])
        win.add([_('Orthogonal cell:'), self.orthogonal])
        win.add([_('Lattice constant:')])
        win.add([_('\ta'), self.lattice_a, (u'Å'), self.retrieve])
        win.add([_('\tc'), self.lattice_c, (u'Å')])
        win.add([_('Size:')])
        win.add([_('\tx: '), self.x, _(' unit cells'), self.x_warn])
        win.add([_('\ty: '), self.y, _(' unit cells'), self.y_warn])
        win.add([_('\tz: '), self.z, _(' unit cells')])
        win.add([_('Vacuum: '), self.vacuum_check, self.vacuum, (u'Å')])
        win.add(self.description)
        # TRANSLATORS: This is a title of a window.
        win.add([
            pybutton(_('Creating a surface.'), self.make),
            ui.Button(_('Apply'), self.apply),
            ui.Button(_('OK'), self.ok)
        ])

        self.element.grab_focus()
        self.gui = gui
        self.atoms = None
        self.lattice_c.active = False
        self.vacuum.active = False
        self.structure_changed()
Esempio n. 5
0
    def __init__(self, gui):
        self.gui = gui
        win = self.win = ui.Window(_('Add atoms'))
        win.add(_('Specify chemical symbol, formula, or filename.'))

        def choose_file():
            chooser = ui.ASEFileChooser(self.win.win)
            filename = chooser.go()
            if filename is None:  # No file selected
                return

            self.combobox.value = filename

            # Load the file immediately, so we can warn now in case of error
            self.readfile(filename, format=chooser.format)

        if self.gui.images.selected.any():
            default = current_selection_string
        else:
            default = 'H2'

        self._filename = None
        self._atoms_from_file = None

        from ase.collections import g2
        labels = list(sorted(name for name in g2.names if len(g2[name]) > 1))
        values = labels

        combobox = ui.ComboBox(labels, values)
        win.add([
            _('Add:'), combobox,
            ui.Button(_('File ...'), callback=choose_file)
        ])
        combobox.widget.bind('<Return>', lambda e: self.add())

        combobox.value = default
        self.combobox = combobox

        spinners = [
            ui.SpinBox(0.0, -1e3, 1e3, 0.1, rounding=2, width=3)
            for __ in range(3)
        ]

        win.add([_('Coordinates:')] + spinners)
        self.spinners = spinners
        win.add(
            _('Coordinates are relative to the center of the selection, '
              'if any, else absolute.'))
        self.picky = ui.CheckButton(_('Check positions'), True)
        win.add([ui.Button(_('Add'), self.add), self.picky])
        self.focus()
Esempio n. 6
0
    def __init__(self, gui):
        self.gui = gui
        win = self.win = ui.Window(_('Add atoms'))
        win.add(_('Specify chemical symbol, formula, or filename.'))

        def set_molecule(value):
            self.entry.value = value
            self.focus()

        def choose_file():
            chooser = ui.ASEFileChooser(self.win.win)
            filename = chooser.go()
            if filename is None:  # No file selected
                return

            self.entry.value = filename

            # Load the file immediately, so we can warn now in case of error
            self.readfile(filename, format=chooser.format)

        self.entry = ui.Entry('', callback=self.add)
        win.add([
            _('Add:'), self.entry,
            ui.Button(_('File ...'), callback=choose_file)
        ])

        self._filename = None
        self._atoms_from_file = None

        from ase.collections import g2
        labels = list(sorted(g2.names))
        values = labels

        box = ui.ComboBox(labels, values, callback=set_molecule)
        win.add([_('Get molecule:'), box])
        box.value = 'H2'

        spinners = [
            ui.SpinBox(0.0, -1e3, 1e3, 0.1, rounding=2, width=3)
            for __ in range(3)
        ]

        win.add([_('Coordinates:')] + spinners)
        self.spinners = spinners
        win.add(
            _('Coordinates are relative to the center of the selection, '
              'if any, else absolute.'))
        self.picky = ui.CheckButton(_('Check positions'), True)
        win.add([ui.Button(_('Add'), self.add), self.picky])
        self.focus()
Esempio n. 7
0
    def __init__(self, gui):
        self.gui = gui
        self.win = win = ui.Window(_('Render current view in povray ... '))
        win.add(ui.Label(_("Rendering %d atoms.") % len(self.gui.atoms)))

        guiwidth, guiheight = self.get_guisize()
        self.width_widget = ui.SpinBox(guiwidth, start=1, end=9999, step=1)
        self.height_widget = ui.SpinBox(guiheight, start=1, end=9999, step=1)
        win.add([ui.Label(_('Size')), self.width_widget,
                 ui.Label('⨯'), self.height_widget])

        self.linewidth_widget = ui.SpinBox(0.07, start=0.01, end=9.99,
                                           step=0.01)
        win.add([ui.Label(_('Line width')), self.linewidth_widget,
                 ui.Label(_('Ångström'))])

        self.constraints_widget = ui.CheckButton(_("Render constraints"))
        self.cell_widget = ui.CheckButton(_("Render unit cell"), value=True)
        win.add([self.cell_widget, self.constraints_widget])

        formula = gui.atoms.get_chemical_formula(mode='hill')
        self.basename_widget = ui.Entry(width=30, value=formula,
                                        callback=self.update_outputname)
        win.add([ui.Label(_('Output basename: ')), self.basename_widget])
        self.povray_executable = ui.Entry(width=30,value='povray')
        win.add([ui.Label(_('POVRAY executable')), self.povray_executable])
        self.outputname_widget = ui.Label()
        win.add([ui.Label(_('Output filename: ')), self.outputname_widget])
        self.update_outputname()

        self.texture_widget = ui.ComboBox(labels=self.texture_list,
                                          values=self.texture_list)
        win.add([ui.Label(_('Atomic texture set:')),
                 self.texture_widget])
        # complicated texture stuff

        self.camera_widget = ui.ComboBox(labels=self.cameras,
                                         values=self.cameras)
        self.camera_distance_widget = ui.SpinBox(50.0, -99.0, 99.0, 1.0)
        win.add([ui.Label(_('Camera type: ')), self.camera_widget])
        win.add([ui.Label(_('Camera distance')), self.camera_distance_widget])

        # render current frame/all frames
        self.frames_widget = ui.RadioButtons([_('Render current frame'),
                                              _('Render all frames')])
        win.add(self.frames_widget)
        if len(gui.images) == 1:
            self.frames_widget.buttons[1].widget.configure(state='disabled')

        self.run_povray_widget = ui.CheckButton(_('Run povray'), True)
        self.keep_files_widget = ui.CheckButton(_('Keep povray files'), False)
        self.show_output_widget = ui.CheckButton(_('Show output window'), True)
        self.transparent = ui.CheckButton(_("Transparent background"), True)
        win.add(self.transparent)
        win.add([self.run_povray_widget, self.keep_files_widget,
                 self.show_output_widget])
        win.add(ui.Button(_('Render'), self.ok))
Esempio n. 8
0
    def __init__(self, gui):
        self.win = win = ui.Window(_('Movie'), self.close)
        win.add(_('Image number:'))
        self.frame_number = ui.Scale(gui.frame + 1,
                                     1,
                                     len(gui.images),
                                     callback=self.new_frame)
        win.add(self.frame_number)

        win.add([
            ui.Button(_('First'), self.click, -1, True),
            ui.Button(_('Back'), self.click, -1),
            ui.Button(_('Forward'), self.click, 1),
            ui.Button(_('Last'), self.click, 1, True)
        ])

        play = ui.Button(_('Play'), self.play)
        stop = ui.Button(_('Stop'), self.stop)

        # TRANSLATORS: This function plays an animation forwards and backwards
        # alternatingly, e.g. for displaying vibrational movement
        self.rock = ui.CheckButton(_('Rock'))

        win.add([play, stop, self.rock])

        if len(gui.images) > 150:
            skipdefault = len(gui.images) // 150
            tdefault = min(max(len(gui.images) / (skipdefault * 5.0), 1.0), 30)
        else:
            skipdefault = 0
            tdefault = min(max(len(gui.images) / 5.0, 1.0), 30)
        self.time = ui.SpinBox(tdefault, 1.0, 99, 0.1)
        self.skip = ui.SpinBox(skipdefault, 0, 99, 1)
        win.add(
            [_(' Frame rate: '), self.time,
             _(' Skip frames: '), self.skip])

        self.gui = gui
        self.direction = 1
        self.timer = None
        gui.register_vulnerable(self)
Esempio n. 9
0
 def __init__(self, gui):
     Simulation.__init__(self, gui)
     self.set_title(_("Potential energy and forces"))
     self.set_default_size(-1, 400)
     vbox = ui.VBox()
     self.packtext(
         vbox, _("Calculate potential energy and the force on all "
                 "atoms"))
     self.packimageselection(vbox)
     pack(vbox, ui.Label(""))
     self.forces = ui.CheckButton(_("Write forces on the atoms"))
     self.forces.set_active(True)
     pack(vbox, [self.forces])
     pack(vbox, [ui.Label("")])
     self.makeoutputfield(vbox)
     pack(vbox, ui.Label(""))
     self.makebutbox(vbox)
     vbox.show()
     self.add(vbox)
     self.show()
     self.gui.register_vulnerable(self)
Esempio n. 10
0
    def __init__(self, gui):
        self.atoms = None
        self.no_update = True
        self.old_structure = 'undefined'

        win = self.win = ui.Window(_('Nanoparticle'))
        win.add(ui.Text(introtext))

        self.element = Element('', self.apply)
        lattice_button = ui.Button(_('Get structure'), self.set_structure_data)
        self.elementinfo = ui.Label(' ')
        win.add(self.element)
        win.add(self.elementinfo)
        win.add(lattice_button)

        # The structure and lattice constant
        labels = []
        values = []
        self.needs_4index = {}
        self.needs_2lat = {}
        self.factory = {}
        for abbrev, name, n4, c, factory in self.structure_data:
            labels.append(name)
            values.append(abbrev)
            self.needs_4index[abbrev] = n4
            self.needs_2lat[abbrev] = c
            self.factory[abbrev] = factory
        self.structure = ui.ComboBox(labels, values, self.update_structure)
        win.add([_('Structure:'), self.structure])
        self.fourindex = self.needs_4index[values[0]]

        self.a = ui.SpinBox(3.0, 0.0, 1000.0, 0.01, self.update)
        self.c = ui.SpinBox(3.0, 0.0, 1000.0, 0.01, self.update)
        win.add([_('Lattice constant:  a ='), self.a, ' c =', self.c])

        # Choose specification method
        self.method = ui.ComboBox(
            [_('Layer specification'),
             _('Wulff construction')], ['layers', 'wulff'],
            self.update_gui_method)
        win.add([_('Method: '), self.method])

        self.layerlabel = ui.Label('Missing text')  # Filled in later
        win.add(self.layerlabel)
        self.direction_table_rows = ui.Rows()
        win.add(self.direction_table_rows)
        self.default_direction_table()

        win.add(_('Add new direction:'))
        self.new_direction_and_size_rows = ui.Rows()
        win.add(self.new_direction_and_size_rows)
        self.update_new_direction_and_size_stuff()

        # Information
        win.add(_('Information about the created cluster:'))
        self.info = [
            _('Number of atoms: '),
            ui.Label('-'),
            _('   Approx. diameter: '),
            ui.Label('-')
        ]
        win.add(self.info)

        # Finalize setup
        self.update_structure('fcc')
        self.update_gui_method()
        self.no_update = False

        self.auto = ui.CheckButton(_('Automatic Apply'))
        win.add(self.auto)

        win.add([
            pybutton(_('Creating a nanoparticle.'), self.makeatoms),
            ui.helpbutton(helptext),
            ui.Button(_('Apply'), self.apply),
            ui.Button(_('OK'), self.ok)
        ])

        self.gui = gui
        self.smaller_button = None
        self.largeer_button = None

        self.element.grab_focus()
Esempio n. 11
0
 def __init__(self, gui):
     self.gui = gui
     ui.Window.__init__(self)
     self.set_title(_('Render current view in povray ... '))
     vbox = ui.VBox()
     vbox.set_border_width(5)
     self.natoms = len(self.gui.atoms)
     pack(vbox, [ui.Label(_("Rendering %d atoms.") % self.natoms)])
     self.size = [
         ui.Adjustment(self.gui.width, 1, 9999, 50),
         ui.Adjustment(self.gui.height, 1, 9999, 50)
     ]
     self.width = ui.SpinButton(self.size[0], 0, 0)
     self.height = ui.SpinButton(self.size[1], 0, 0)
     self.render_constraints = ui.CheckButton(_("Render constraints"))
     self.render_constraints.set_sensitive(
         not self.gui.images.get_dynamic(self.gui.atoms).all())
     self.render_constraints.connect("toggled", self.toggle_render_lines)
     pack(vbox, [
         ui.Label(_("Width")), self.width,
         ui.Label(_("     Height")), self.height,
         ui.Label("       "), self.render_constraints
     ])
     self.width.connect('value-changed', self.change_width, "")
     self.height.connect('value-changed', self.change_height, "")
     self.sizeratio = gui.width / float(gui.height)
     self.line_width = ui.SpinButton(ui.Adjustment(0.07, 0.01, 9.99, 0.01),
                                     0, 0)
     self.line_width.set_digits(3)
     self.render_cell = ui.CheckButton(_("Render unit cell"))
     if self.gui.ui.get_widget(
             '/MenuBar/ViewMenu/ShowUnitCell').get_active():
         self.render_cell.set_active(True)
     else:
         self.render_cell.set_active(False)
         self.render_cell.set_sensitive(False)
     self.render_cell.connect("toggled", self.toggle_render_lines)
     have_lines = (not self.gui.images.dynamic.all()
                   ) or self.render_cell.get_active()
     self.line_width.set_sensitive(have_lines)
     pack(vbox, [
         ui.Label(_("Line width")), self.line_width,
         ui.Label(_("Angstrom           ")), self.render_cell
     ])
     pack(vbox, [ui.Label("")])
     filename = gui.window.get_title()
     len_suffix = len(filename.split('.')[-1]) + 1
     if len(filename) > len_suffix:
         filename = filename[:-len_suffix]
     self.basename = ui.Entry(max=30)
     self.basename.connect("activate", self.set_outputname, "")
     self.basename.set_text(basename(filename))
     set_name = ui.Button(_("Set"))
     set_name.connect("clicked", self.set_outputname, "")
     pack(vbox, [ui.Label(_("Output basename: ")), self.basename, set_name])
     self.outputname = ui.Label("")
     pack(vbox, [ui.Label(_("               Filename: ")), self.outputname])
     pack(vbox, [ui.Label("")])
     self.tbox = ui.VBox()
     self.tbox.set_border_width(10)
     self.default_texture = ui.combo_box_new_text()
     for t in self.finish_list:
         self.default_texture.append_text(t)
     self.default_texture.set_active(1)
     self.default_transparency = ui.Adjustment(0, 0.0, 1.0, 0.01)
     self.transparency = ui.SpinButton(self.default_transparency, 0, 0)
     self.transparency.set_digits(2)
     pack(self.tbox, [
         ui.Label(_(" Default texture for atoms: ")), self.default_texture,
         ui.Label(_("    transparency: ")), self.transparency
     ])
     pack(self.tbox,
          [ui.Label(_("Define atom selection for new texture:"))])
     self.texture_selection = ui.Entry(max=50)
     self.texture_select_but = ui.Button(_("Select"))
     self.texture_selection.connect("activate", self.select_texture, "")
     self.texture_select_but.connect("clicked", self.select_texture, "")
     pack(self.tbox, [self.texture_selection, self.texture_select_but])
     self.create_texture = ui.Button(_("Create new texture from selection"))
     self.create_texture.connect("clicked", self.material_from_selection,
                                 "")
     self.selection_help_but = ui.Button(_("Help on textures"))
     self.selection_help_but.connect("clicked", self.selection_help, "")
     self.materials = []
     pack(self.tbox, [
         self.create_texture,
         ui.Label("       "), self.selection_help_but
     ])
     pack(vbox, [self.tbox])
     pack(vbox, [ui.Label("")])
     self.camera_style = ui.combo_box_new_text()
     for c in self.cameras:
         self.camera_style.append_text(c)
     self.camera_style.set_active(0)
     self.camera_distance = ui.SpinButton(
         ui.Adjustment(50.0, -99.0, 99.0, 1.0), 0, 0)
     self.camera_distance.set_digits(1)
     pack(vbox, [
         ui.Label(_("Camera type: ")), self.camera_style,
         ui.Label(_("     Camera distance")), self.camera_distance
     ])
     self.single_frame = ui.RadioButton(None, _("Render current frame"))
     self.nimages = len(self.gui.images)
     self.iframe = self.gui.frame
     self.movie = ui.RadioButton(self.single_frame,
                                 _("Render all %d frames") % self.nimages)
     self.movie.connect("toggled", self.set_movie)
     self.movie.set_sensitive(self.nimages > 1)
     self.set_outputname()
     pack(vbox, [self.single_frame, ui.Label("   "), self.movie])
     self.transparent = ui.CheckButton(_("Transparent background"))
     self.transparent.set_active(True)
     pack(vbox, [self.transparent])
     self.run_povray = ui.CheckButton(_("Run povray       "))
     self.run_povray.set_active(True)
     self.run_povray.connect("toggled", self.toggle_run_povray, "")
     self.keep_files = ui.CheckButton(_("Keep povray files       "))
     self.keep_files.set_active(False)
     self.keep_files_status = True
     self.window_open = ui.CheckButton(_("Show output window"))
     self.window_open.set_active(True)
     self.window_open_status = True
     pack(vbox, [self.run_povray, self.keep_files, self.window_open])
     pack(vbox, [ui.Label("")])
     cancel_but = ui.Button('Cancel')
     cancel_but.connect('clicked', lambda widget: self.destroy())
     ok_but = ui.Button('OK')
     ok_but.connect('clicked', self.ok)
     close_but = ui.Button('Close')
     close_but.connect('clicked', lambda widget: self.destroy())
     butbox = ui.HButtonBox()
     butbox.pack_start(cancel_but, 0, 0)
     butbox.pack_start(ok_but, 0, 0)
     butbox.pack_start(close_but, 0, 0)
     butbox.show_all()
     pack(vbox, [butbox], end=True, bottom=True)
     self.add(vbox)
     vbox.show()
     self.show()