def on_info_bar_clicked(self, *args):
        if self.errors:
            label = _("The following errors were encountered when checking your storage "
                      "configuration.  You can modify your storage layout or quit the "
                      "installer.")

            dialog = DetailedErrorDialog(self.data, buttons=[_("_Quit"), _("_Modify Storage Layout")], label=label)
            with enlightbox(self.window, dialog.window):
                errors = "\n".join(self.errors)
                dialog.refresh(errors)
                rc = dialog.run()

            dialog.window.destroy()

            if rc == 0:
                # Quit.
                sys.exit(0)
        elif self.warnings:
            label = _("The following warnings were encountered when checking your storage "
                      "configuration.  These are not fatal, but you may wish to make "
                      "changes to your storage layout.")

            dialog = DetailedErrorDialog(self.data, buttons=[_("_OK")], label=label)
            with enlightbox(self.window, dialog.window):
                warnings = "\n".join(self.warnings)
                dialog.refresh(warnings)
                rc = dialog.run()

            dialog.window.destroy()
示例#2
0
    def on_info_bar_clicked(self, *args):
        if self.errors:
            label = _("The following errors were encountered when checking your storage "
                      "configuration.  You can modify your storage layout or quit the "
                      "installer.")

            dialog = DetailedErrorDialog(self.data, buttons=[_("_Quit"), _("_Modify Storage Layout")], label=label)
            with enlightbox(self.window, dialog.window):
                errors = "\n".join(self.errors)
                dialog.refresh(errors)
                rc = dialog.run()

            dialog.window.destroy()

            if rc == 0:
                # Quit.
                sys.exit(0)
        elif self.warnings:
            label = _("The following warnings were encountered when checking your storage "
                      "configuration.  These are not fatal, but you may wish to make "
                      "changes to your storage layout.")

            dialog = DetailedErrorDialog(self.data, buttons=[_("_OK")], label=label)
            with enlightbox(self.window, dialog.window):
                warnings = "\n".join(self.warnings)
                dialog.refresh(warnings)
                rc = dialog.run()

            dialog.window.destroy()
    def on_add_clicked(self, button):
        if not self._add_dialog:
            self._add_dialog = AddLayoutDialog(self.data)
            self._add_dialog.initialize()

        self._add_dialog.refresh()

        with enlightbox(self.window, self._add_dialog.window):
            response = self._add_dialog.run()

        if response == 1:
            duplicates = set()
            for row in self._store:
                item = row[0]
                if item in self._add_dialog.chosen_layouts:
                    duplicates.add(item)

            for layout in self._add_dialog.chosen_layouts:
                if layout not in duplicates:
                    self._addLayout(self._store, layout)

            if self._remove_last_attempt:
                itr = self._store.get_iter_first()
                if not self._store[itr][0] in self._add_dialog.chosen_layouts:
                    self._removeLayout(self._store, itr)
                self._remove_last_attempt = False
示例#4
0
    def showError(self, message):
        dlg = ErrorDialog(None)

        with enlightbox(self._currentAction.window, dlg.window):
            dlg.refresh(message)
            dlg.run()
            dlg.window.destroy()
示例#5
0
    def showError(self, message):
        dlg = ErrorDialog(None)

        with enlightbox(self._currentAction.window, dlg.window):
            dlg.refresh(message)
            dlg.run()
            dlg.window.destroy()
示例#6
0
    def on_info_bar_clicked(self, *args):
        if not self._errorMsgs:
            return

        label = _("The following software marked for installation has errors.  "
                  "This is likely caused by an error with\nyour installation source.  "
                  "You can change your installation source or quit the installer.")
        dialog = DetailedErrorDialog(self.data,
                buttons=[C_("GUI|Software Selection|Error Dialog", "_Quit"),
                         C_("GUI|Software Selection|Error Dialog", "_Cancel"),
                         C_("GUI|Software Selection|Error Dialog", "_Modify Software Source")],
                label=label)
        with enlightbox(self.window, dialog.window):
            dialog.refresh(self._errorMsgs)
            rc = dialog.run()

        dialog.window.destroy()

        if rc == 0:
            # Quit.
            sys.exit(0)
        elif rc == 1:
            # Close the dialog so the user can change selections.
            pass
        elif rc == 2:
            # Send the user to the installation source spoke.
            self.skipTo = "SourceSpoke"
            self.window.emit("button-clicked")
        else:
            pass
示例#7
0
    def on_add_clicked(self, button):
        self._add_dialog.refresh()

        with enlightbox(self.window, self._add_dialog.window):
            response = self._add_dialog.run()

        if response == 1:
            duplicates = set()
            for row in self._store:
                item = row[0]
                if item in self._add_dialog.chosen_layouts:
                    duplicates.add(item)

            for layout in self._add_dialog.chosen_layouts:
                if layout not in duplicates:
                    self._addLayout(self._store, layout)

            if self._remove_last_attempt:
                itr = self._store.get_iter_first()
                if not self._store[itr][0] in self._add_dialog.chosen_layouts:
                    self._removeLayout(self._store, itr)
                self._remove_last_attempt = False

            # Update the selection information
            self._selection.emit("changed")
    def on_add_clicked(self, button):
        if not self._add_dialog:
            self._add_dialog = AddLayoutDialog(self.data)
            self._add_dialog.initialize()

        self._add_dialog.refresh()

        with enlightbox(self.window, self._add_dialog.window):
            response = self._add_dialog.run()

        if response == 1:
            duplicates = set()
            for row in self._store:
                item = row[0]
                if item in self._add_dialog.chosen_layouts:
                    duplicates.add(item)

            for layout in self._add_dialog.chosen_layouts:
                if layout not in duplicates:
                    self._addLayout(self._store, layout)

            if self._remove_last_attempt:
                itr = self._store.get_iter_first()
                if not self._store[itr][0] in self._add_dialog.chosen_layouts:
                    self._removeLayout(self._store, itr)
                self._remove_last_attempt = False
示例#9
0
    def on_add_clicked(self, button):
        self._add_dialog.refresh()

        with enlightbox(self.window, self._add_dialog.window):
            response = self._add_dialog.run()

        if response == 1:
            duplicates = set()
            for row in self._store:
                item = row[0]
                if item in self._add_dialog.chosen_layouts:
                    duplicates.add(item)

            for layout in self._add_dialog.chosen_layouts:
                if layout not in duplicates:
                    self._addLayout(self._store, layout)

            if self._remove_last_attempt:
                itr = self._store.get_iter_first()
                if not self._store[itr][0] in self._add_dialog.chosen_layouts:
                    self._removeLayout(self._store, itr)
                self._remove_last_attempt = False

            # Update the selection information
            self._selection.emit("changed")
    def on_verify_media_clicked(self, button):
        if not self._cdrom:
            return

        dialog = MediaCheckDialog(self.data)
        with enlightbox(self.window, dialog.window):
            dialog.run("/dev/" + self._cdrom.name)
示例#11
0
    def on_verify_media_clicked(self, button):
        if not self._cdrom:
            return

        dialog = MediaCheckDialog(self.data)
        with enlightbox(self.window, dialog.window):
            dialog.run("/dev/" + self._cdrom.name)
示例#12
0
 def on_proxy_clicked(self, button):
     old_proxy = self.data.method.proxy
     dialog = ProxyDialog(self.data)
     with enlightbox(self.window, dialog.window):
         dialog.refresh()
         dialog.run()
     self._proxyChange = old_proxy != self.data.method.proxy
示例#13
0
    def showDetailedError(self, message, details):
        from pyanaconda.ui.gui.spokes.lib.detailederror import DetailedErrorDialog
        dlg = DetailedErrorDialog(None, buttons=[_("_Quit")], label=message)

        with enlightbox(self._currentAction.window, dlg.window):
            dlg.refresh(details)
            rc = dlg.run()
            dlg.window.destroy()
示例#14
0
    def _on_quit_clicked(self):
        dialog = self._quitDialog(None)
        with enlightbox(self._currentAction.window, dialog.window):
            rc = dialog.run()
            dialog.window.destroy()

        if rc == 1:
            sys.exit(0)
    def showDetailedError(self, message, details):
        from pyanaconda.ui.gui.spokes.lib.detailederror import DetailedErrorDialog
        dlg = DetailedErrorDialog(None, buttons=[_("_Quit")],
                                  label=message)

        with enlightbox(self._currentAction.window, dlg.window):
            dlg.refresh(details)
            rc = dlg.run()
            dlg.window.destroy()
示例#16
0
    def on_proxy_clicked(self, button):
        dialog = ProxyDialog(self.data, self._proxyUrl)
        with enlightbox(self.window, dialog.window):
            dialog.refresh()
            dialog.run()

        if self._proxyUrl != dialog.proxyUrl:
            self._proxyChange = True
            self._proxyUrl = dialog.proxyUrl
    def on_proxy_clicked(self, button):
        dialog = ProxyDialog(self.data, self._proxyUrl)
        with enlightbox(self.window, dialog.window):
            dialog.refresh()
            dialog.run()

        if self._proxyUrl != dialog.proxyUrl:
            self._proxyChange = True
            self._proxyUrl = dialog.proxyUrl
示例#18
0
    def showError(self, message):
        dlg = Gtk.MessageDialog(flags=Gtk.DialogFlags.MODAL,
                                message_type=Gtk.MessageType.ERROR,
                                buttons=Gtk.ButtonsType.NONE,
                                message_format=message)
        dlg.add_button(_("_Exit Installer"), 0)

        with enlightbox(self._currentAction.window, dlg):
            dlg.run()
            dlg.destroy()
示例#19
0
    def showError(self, message):
        dlg = Gtk.MessageDialog(flags=Gtk.DialogFlags.MODAL,
                                message_type=Gtk.MessageType.ERROR,
                                buttons=Gtk.ButtonsType.NONE,
                                message_format=message)
        dlg.add_button(_("_Exit Installer"), 0)

        with enlightbox(self._currentAction.window, dlg):
            dlg.run()
            dlg.destroy()
示例#20
0
    def on_add_fcoe_clicked(self, widget, *args):
        dialog = FCoEDialog(self.data, self.storage)

        with enlightbox(self.window, dialog.window):
            dialog.refresh()
            dialog.run()

        # We now need to refresh so any new disks picked up by adding advanced
        # storage are displayed in the UI.
        self.refresh()
示例#21
0
    def on_proxy_clicked(self, button):
        if not hasattr(self.data.method, "proxy"):
            old_proxy = None
        else:
            old_proxy = self.data.method.proxy

        dialog = ProxyDialog(self.data)
        with enlightbox(self.window, dialog.window):
            dialog.refresh()
            dialog.run()
        self._proxyChange = old_proxy != self.data.method.proxy
示例#22
0
    def on_summary_clicked(self, button):
        dialog = SelectedDisksDialog(self.data)

        # Include any disks selected in the initial storage spoke, plus any
        # selected in this filter UI.
        disks = [disk for disk in self.disks if disk.name in self.selected_disks]
        free_space = self.storage.getFreeSpace(disks=disks)

        with enlightbox(self.window, dialog.window):
            dialog.refresh(disks, free_space, showRemove=False, setBoot=False)
            dialog.run()
示例#23
0
    def _on_continue_clicked(self, cb):
        # Don't display the betanag dialog if this is the final release.
        if not isFinal:
            dlg = self.builder.get_object("betaWarnDialog")
            with enlightbox(self.window, dlg):
                rc = dlg.run()
                dlg.destroy()
            if rc == 0:
                sys.exit(0)

        if productName.startswith("Red Hat Enterprise Linux") and \
          is_unsupported_hw() and not self.data.unsupportedhardware.unsupported_hardware:
            dlg = self.builder.get_object("unsupportedHardwareDialog")
            with enlightbox(self.window, dlg):
                rc = dlg.run()
                dlg.destroy()
            if rc == 0:
                sys.exit(0)

        StandaloneSpoke._on_continue_clicked(self, cb)
示例#24
0
    def _on_continue_clicked(self, cb):
        # Don't display the betanag dialog if this is the final release.
        if not isFinal:
            dlg = self.builder.get_object("betaWarnDialog")
            with enlightbox(self.window, dlg):
                rc = dlg.run()
                dlg.destroy()
            if rc == 0:
                sys.exit(0)

        if productName.startswith("Red Hat Enterprise Linux") and \
          is_unsupported_hw() and not self.data.unsupportedhardware.unsupported_hardware:
            dlg = self.builder.get_object("unsupportedHardwareDialog")
            with enlightbox(self.window, dlg):
                rc = dlg.run()
                dlg.destroy()
            if rc == 0:
                sys.exit(0)

        StandaloneSpoke._on_continue_clicked(self, cb)
示例#25
0
    def on_ntp_config_clicked(self, *args):
        self._config_dialog.refresh()

        with enlightbox(self.window, self._config_dialog.window):
            response = self._config_dialog.run()

        if response == 1:
            self.data.timezone.ntpservers = self._config_dialog.servers

            if self._config_dialog.working_server is None:
                self._show_no_ntp_server_warning()
            else:
                self.clear_info()
    def on_preview_clicked(self, button):
        selection = self.builder.get_object("layoutSelection")
        (store, cur) = selection.get_selected()
        layout_row = store[cur]
        if not layout_row:
            return

        dialog = Gkbd.KeyboardDrawing.dialog_new()
        Gkbd.KeyboardDrawing.dialog_set_layout(dialog, self._xkl_wrapper.configreg,
                                               layout_row[0])
        with enlightbox(self.window, dialog):
            dialog.show_all()
            dialog.run()
示例#27
0
    def showYesNoQuestion(self, message):
        dlg = Gtk.MessageDialog(flags=Gtk.DialogFlags.MODAL,
                                message_type=Gtk.MessageType.QUESTION,
                                buttons=Gtk.ButtonsType.NONE,
                                message_format=message)
        dlg.add_buttons(_("_No"), 0, _("_Yes"), 1)
        dlg.set_default_response(1)

        with enlightbox(self._currentAction.window, dlg):
            rc = dlg.run()
            dlg.destroy()

        return bool(rc)
示例#28
0
    def showYesNoQuestion(self, message):
        dlg = Gtk.MessageDialog(flags=Gtk.DialogFlags.MODAL,
                                message_type=Gtk.MessageType.QUESTION,
                                buttons=Gtk.ButtonsType.NONE,
                                message_format=message)
        dlg.add_buttons(_("_No"), 0, _("_Yes"), 1)
        dlg.set_default_response(1)

        with enlightbox(self._currentAction.window, dlg):
            rc = dlg.run()
            dlg.destroy()

        return bool(rc)
    def on_ntp_config_clicked(self, *args):
        self._config_dialog.refresh()

        with enlightbox(self.window, self._config_dialog.window):
            response = self._config_dialog.run()

        if response == 1:
            self.data.timezone.ntpservers = self._config_dialog.servers

            if self._config_dialog.working_server is None:
                self._show_no_ntp_server_warning()
            else:
                self.clear_info()
示例#30
0
    def _on_continue_clicked(self, cb):
        # Don't display the betanag dialog if this is the final release.
        if isFinal:
            StandaloneSpoke._on_continue_clicked(self, cb)
            return

        dlg = self.builder.get_object("betaWarnDialog")

        with enlightbox(self.window, dlg):
            rc = dlg.run()
            dlg.destroy()

        if rc == 0:
            sys.exit(0)
        else:
            StandaloneSpoke._on_continue_clicked(self, cb)
示例#31
0
    def on_options_clicked(self, *args):
        self._switching_dialog.refresh()

        with enlightbox(self.window, self._switching_dialog.window):
            response = self._switching_dialog.run()

        if response != 1:
            # Cancel clicked, dialog destroyed
            return

        # OK clicked, set and save switching options.
        new_options = self._switching_dialog.checked_options
        self._xkl_wrapper.set_switching_options(new_options)
        self.data.keyboard.switch_options = new_options

        # Refresh switching info label.
        self._refresh_switching_info()
示例#32
0
    def on_preview_clicked(self, button):
        selection = self.builder.get_object("layoutSelection")
        (store, cur) = selection.get_selected()
        layout_row = store[cur]
        if not layout_row:
            return

        layout, variant = keyboard.parse_layout_variant(layout_row[0])
        lay_var_spec = "%s\t%s" % (layout, variant)
        dialog = Gkbd.KeyboardDrawing.dialog_new()
        Gkbd.KeyboardDrawing.dialog_set_layout(dialog, self._xkl_wrapper.configreg,
                                               lay_var_spec)
        dialog.set_size_request(750, 350)
        dialog.set_position(Gtk.WindowPosition.CENTER_ALWAYS)
        with enlightbox(self.window, dialog):
            dialog.show_all()
            dialog.run()
示例#33
0
    def on_options_clicked(self, *args):
        self._switching_dialog.refresh()

        with enlightbox(self.window, self._switching_dialog.window):
            response = self._switching_dialog.run()

        if response != 1:
            # Cancel clicked, dialog destroyed
            return

        # OK clicked, set and save switching options.
        new_options = self._switching_dialog.checked_options
        self._xkl_wrapper.set_switching_options(new_options)
        self.data.keyboard.switch_options = new_options

        # Refresh switching info label.
        self._refresh_switching_info()
示例#34
0
    def on_preview_clicked(self, button):
        selection = self.builder.get_object("layoutSelection")
        (store, cur) = selection.get_selected()
        layout_row = store[cur]
        if not layout_row:
            return

        layout, variant = keyboard.parse_layout_variant(layout_row[0])
        lay_var_spec = "%s\t%s" % (layout, variant)
        dialog = Gkbd.KeyboardDrawing.dialog_new()
        Gkbd.KeyboardDrawing.dialog_set_layout(dialog,
                                               self._xkl_wrapper.configreg,
                                               lay_var_spec)
        dialog.set_size_request(750, 350)
        dialog.set_position(Gtk.WindowPosition.CENTER_ALWAYS)
        with enlightbox(self.window, dialog):
            dialog.show_all()
            dialog.run()
示例#35
0
    def on_chooser_clicked(self, button):
        dialog = IsoChooser(self.data)

        with enlightbox(self.window, dialog.window):
            # If the chooser has been run one before, we should make it default to
            # the previously selected file.
            if self._currentIsoFile:
                dialog.refresh(currentFile=self._currentIsoFile)
            else:
                dialog.refresh()

            f = dialog.run(self._get_selected_partition())

            if f:
                self._currentIsoFile = f
                button.set_label(os.path.basename(f))
                button.set_use_underline(False)
                self._verifyIsoButton.set_sensitive(True)
    def on_chooser_clicked(self, button):
        dialog = IsoChooser(self.data)

        with enlightbox(self.window, dialog.window):
            # If the chooser has been run one before, we should make it default to
            # the previously selected file.
            if self._currentIsoFile:
                dialog.refresh(currentFile=self._currentIsoFile)
            else:
                dialog.refresh()

            f = dialog.run(self._get_selected_partition())

            if f:
                self._currentIsoFile = f
                button.set_label(os.path.basename(f))
                button.set_use_underline(False)
                self._verifyIsoButton.set_sensitive(True)
示例#37
0
    def on_advanced_clicked(self, _button):
        """Handler for the Advanced.. button. It starts the Advanced dialog
        for setting homedit, uid, gid and groups.
        """

        self._user.name = self.username.get_text()

        if self.admin.get_active() and \
           self._wheel.name not in self._user.groups:
            self._user.groups.append(self._wheel.name)
        elif not self.admin.get_active() and \
             self._wheel.name in self._user.groups:
            self._user.groups.remove(self._wheel.name)

        self._advanced.refresh()
        with enlightbox(self.window, self._advanced.window):
            response = self._advanced.run()

        self.admin.set_active(self._wheel.name in self._user.groups)
示例#38
0
文件: user.py 项目: numbnet/anaconda
    def on_advanced_clicked(self, _button, data=None):
        """Handler for the Advanced.. button. It starts the Advanced dialog
        for setting homedit, uid, gid and groups.
        """

        self._user.name = self.username.get_text()

        if self.admin.get_active() and \
           self._wheel.name not in self._user.groups:
            self._user.groups.append(self._wheel.name)
        elif not self.admin.get_active() and \
             self._wheel.name in self._user.groups:
            self._user.groups.remove(self._wheel.name)

        self._advanced.refresh()
        with enlightbox(self.window, self._advanced.window):
            self._advanced.run()

        self.admin.set_active(self._wheel.name in self._user.groups)
示例#39
0
    def on_verify_iso_clicked(self, button):
        p = self._get_selected_partition()
        f = self._currentIsoFile

        if not p or not f:
            return

        dialog = MediaCheckDialog(self.data)
        with enlightbox(self.window, dialog.window):
            unmount = not p.format.status
            mounts = get_mount_paths(p.path)
            # We have to check both ISO_DIR and the DRACUT_ISODIR because we
            # still reference both, even though /mnt/install is a symlink to
            # /run/install.  Finding mount points doesn't handle the symlink
            if constants.ISO_DIR not in mounts and constants.DRACUT_ISODIR not in mounts:
                # We're not mounted to either location, so do the mount
                p.format.mount(mountpoint=constants.ISO_DIR)
            dialog.run(constants.ISO_DIR + "/" + f)
            if unmount:
                p.format.unmount()
    def on_verify_iso_clicked(self, button):
        p = self._get_selected_partition()
        f = self._currentIsoFile

        if not p or not f:
            return

        dialog = MediaCheckDialog(self.data)
        with enlightbox(self.window, dialog.window):
            unmount = not p.format.status
            mounts = get_mount_paths(p.path)
            # We have to check both ISO_DIR and the DRACUT_ISODIR because we
            # still reference both, even though /mnt/install is a symlink to
            # /run/install.  Finding mount points doesn't handle the symlink
            if constants.ISO_DIR not in mounts and constants.DRACUT_ISODIR not in mounts:
                # We're not mounted to either location, so do the mount
                p.format.mount(mountpoint=constants.ISO_DIR)
            dialog.run(constants.ISO_DIR + "/" + f)
            if unmount:
                p.format.unmount()
 def on_custom_clicked(self, button):
     with enlightbox(self.window, self._addRepoDialog.window):
         response =  self._addRepoDialog.run()
示例#42
0
    def run_lightbox_dialog(self, dialog):
        with enlightbox(self.window, dialog.window):
            rc = dialog.run()

        return rc
示例#43
0
    def run_lightbox_dialog(self, dialog):
        with enlightbox(self.window, dialog.window):
            rc = dialog.run()

        return rc
示例#44
0
 def on_custom_clicked(self, button):
     with enlightbox(self.window, self._addRepoDialog.window):
         response = self._addRepoDialog.run()