示例#1
0
    def refresh(self, mountpoint, device, checkbox_text = "", snapshots=False, bootpart = False):
        """ Show confirmation dialog with the optional checkbox. If the
            `checkbox_text` for the checkbox is not set then the checkbox
            will not be showed.

            :param str mountpoint: Mountpoint for device.
            :param str device: Name of the device.
            :param str checkbox_text: Text for checkbox. If nothing set do
                                      not display the checkbox.
            :param bool snapshot: If true warn user he's going to delete snapshots too.
        """
        GUIObject.refresh(self)
        label = self.builder.get_object("confirmLabel")

        if checkbox_text:
            self._optional_checkbox.set_label(checkbox_text)
        else:
            self._optional_checkbox.hide()

        if mountpoint:
            txt = "%s (%s)" % (mountpoint, device)
        else:
            txt = device

        if bootpart:
            label_text = _("%s may be a system boot partition! Deleting it may break other operating systems. Are you sure you want to delete it?") % txt
        elif not snapshots:
            label_text = _("Are you sure you want to delete all of the data on %s?") % txt
        else:
            label_text = _("Are you sure you want to delete all of the data on %s, including snapshots and/or subvolumes?") % txt

        label.set_text(label_text)
示例#2
0
    def refresh(self, actions):
        GUIObject.refresh(self)

        self._store = self.builder.get_object("actionStore")

        self._store.clear()
        self.initialize(actions)
    def refresh(self, mountpoint, device, rootName, snapshots=False):
        GUIObject.refresh(self)
        label = self.builder.get_object("confirmLabel")

        if rootName and "_" in rootName:
            rootName = rootName.replace("_", "__")
        delete_all_text = (C_(
            "GUI|Custom Partitioning|Confirm Delete Dialog",
            "Delete _all other file systems in the %s root as well."
        ) + "\n" + C_(
            "GUI|Custom Partitioning|Confirm Delete Dialog",
            "(This includes those shared with other installed operating systems.)"
        ))
        self._removeAll.set_label(delete_all_text % rootName)
        self._removeAll.set_sensitive(rootName is not None)

        if mountpoint:
            txt = "%s (%s)" % (mountpoint, device)
        else:
            txt = device

        if not snapshots:
            label_text = _(
                "Are you sure you want to delete all of the data on %s?") % txt
        else:
            label_text = _(
                "Are you sure you want to delete all of the data on %s, including snapshots and/or subvolumes?"
            ) % txt

        label.set_text(label_text)
    def refresh(self):
        GUIObject.refresh(self)

        self._proxyCheck = self.builder.get_object("enableProxyCheck")
        self._proxyInfoBox = self.builder.get_object("proxyInfoBox")
        self._authCheck = self.builder.get_object("enableAuthCheck")
        self._proxyAuthBox = self.builder.get_object("proxyAuthBox")

        self._proxyURLEntry = self.builder.get_object("proxyURLEntry")
        self._proxyUsernameEntry = self.builder.get_object("proxyUsernameEntry")
        self._proxyPasswordEntry = self.builder.get_object("proxyPasswordEntry")

        if not self.data.method.proxy:
            self._proxyCheck.set_active(False)
            self.on_proxy_enable_toggled(self._proxyCheck)
            self._authCheck.set_active(False)
            self.on_proxy_auth_toggled(self._authCheck)
            return

        try:
            proxy = ProxyString(self.data.method.proxy)
            if proxy.username:
                self._proxyUsernameEntry.set_text(proxy.username)
            if proxy.password:
                self._proxyPasswordEntry.set_text(proxy.password)
            self._proxyURLEntry.set_text(proxy.noauth_url)
        except ProxyStringError as e:
            log.error("Failed to parse proxy for ProxyDialog.refresh %s: %s" % (self.data.method.proxy, e))
            return

        self._proxyCheck.set_active(True)
        self._authCheck.set_active(bool(proxy.username or proxy.password))
        self.on_proxy_enable_toggled(self._proxyCheck)
        self.on_proxy_auth_toggled(self._authCheck)
示例#5
0
    def refresh(self):
        GUIObject.refresh(self)

        if not self.proxyUrl:
            self._proxyCheck.set_active(False)
            self.on_proxy_enable_toggled(self._proxyCheck)
            self._authCheck.set_active(False)
            self.on_proxy_auth_toggled(self._authCheck)
            return

        try:
            proxy = ProxyString(self.proxyUrl)
            if proxy.username:
                self._proxyUsernameEntry.set_text(proxy.username)
            if proxy.password:
                self._proxyPasswordEntry.set_text(proxy.password)
            self._proxyURLEntry.set_text(proxy.noauth_url)
        except ProxyStringError as e:
            log.error("Failed to parse proxy for ProxyDialog.refresh %s: %s",
                      self.proxyUrl, e)
            return

        self._proxyCheck.set_active(True)
        self._authCheck.set_active(bool(proxy.username or proxy.password))
        self.on_proxy_enable_toggled(self._proxyCheck)
        self.on_proxy_auth_toggled(self._authCheck)
    def refresh(self, mountpoint, device, rootName, snapshots=False):
        GUIObject.refresh(self)
        label = self.builder.get_object("confirmLabel")

        if rootName and "_" in rootName:
            rootName = rootName.replace("_", "__")
        delete_all_text = (C_("GUI|Custom Partitioning|Confirm Delete Dialog",
                               "Delete _all other file systems in the %s root as well.") +
                           "\n" +
                           C_("GUI|Custom Partitioning|Confirm Delete Dialog",
                               "(This includes those shared with other installed operating systems.)"))
        self._removeAll.set_label(
                delete_all_text
                % rootName)
        self._removeAll.set_sensitive(rootName is not None)

        if mountpoint:
            txt = "%s (%s)" % (mountpoint, device)
        else:
            txt = device

        if not snapshots:
            label_text = _("Are you sure you want to delete all of the data on %s?") % txt
        else:
            label_text = _("Are you sure you want to delete all of the data on %s, including snapshots and/or subvolumes?") % txt

        label.set_text(label_text)
    def refresh(self):
        GUIObject.refresh(self)

        if not self.proxyUrl:
            self._proxyCheck.set_active(False)
            self.on_proxy_enable_toggled(self._proxyCheck)
            self._authCheck.set_active(False)
            self.on_proxy_auth_toggled(self._authCheck)
            return

        try:
            proxy = ProxyString(self.proxyUrl)
            if proxy.username:
                self._proxyUsernameEntry.set_text(proxy.username)
            if proxy.password:
                self._proxyPasswordEntry.set_text(proxy.password)
            self._proxyURLEntry.set_text(proxy.noauth_url)
        except ProxyStringError as e:
            log.error("Failed to parse proxy for ProxyDialog.refresh %s: %s", self.proxyUrl, e)
            return

        self._proxyCheck.set_active(True)
        self._authCheck.set_active(bool(proxy.username or proxy.password))
        self.on_proxy_enable_toggled(self._proxyCheck)
        self.on_proxy_auth_toggled(self._authCheck)
示例#8
0
    def refresh(self):
        GUIObject.refresh(self)
        self._createBox()

        for hub in Hub._hubs_collection:
            if hub.timeout_id is not None:
                log.debug("Disabling event loop for hub %s", hub.__class__.__name__)
                GLib.source_remove(hub.timeout_id)
                hub.timeout_id = None

        log.debug("Starting event loop for hub %s", self.__class__.__name__)
        self.timeout_id = GLib.timeout_add(100, self._update_spokes)
示例#9
0
    def refresh(self):
        GUIObject.refresh(self)
        self._createBox()

        for hub in Hub._hubs_collection:
            if hub.timeout_id is not None:
                log.debug("Disabling event loop for hub %s", hub.__class__.__name__)
                GLib.source_remove(hub.timeout_id)
                hub.timeout_id = None

        log.debug("Starting event loop for hub %s", self.__class__.__name__)
        self.timeout_id = GLib.timeout_add(100, self._update_spokes)
示例#10
0
    def refresh(self):
        GUIObject.refresh(self)
        self._createBox()

        for hub in Hub._hubs_collection:
            if hub.timeout is not None:
                log.debug("Disabling event loop for hub %s", hub.__class__.__name__)
                hub.timeout.cancel()
                hub.timeout = None

        log.debug("Starting event loop for hub %s", self.__class__.__name__)
        self.timeout = Timer()
        self.timeout.timeout_msec(100, self._update_spokes)
示例#11
0
    def refresh(self):
        GUIObject.refresh(self)
        self._createBox()

        for hub in Hub._hubs_collection:
            if hub.timeout is not None:
                log.debug("Disabling event loop for hub %s", hub.__class__.__name__)
                hub.timeout.cancel()
                hub.timeout = None

        log.debug("Starting event loop for hub %s", self.__class__.__name__)
        self.timeout = Timer()
        self.timeout.timeout_msec(100, self._update_spokes)
示例#12
0
    def refresh(self,
                mountpoint,
                device,
                checkbox_text="",
                snapshots=False,
                bootpart=False):
        """ Show confirmation dialog with the optional checkbox. If the
            `checkbox_text` for the checkbox is not set then the checkbox
            will not be showed.

            :param str mountpoint: Mountpoint for device.
            :param str device: Name of the device.
            :param str checkbox_text: Text for checkbox. If nothing set do
                                      not display the checkbox.
            :param bool snapshot: If true warn user he's going to delete snapshots too.
        """
        GUIObject.refresh(self)
        label = self.builder.get_object("confirmLabel")

        if checkbox_text:
            self._optional_checkbox.set_label(checkbox_text)
        else:
            self._optional_checkbox.hide()

        if mountpoint:
            txt = "%s (%s)" % (mountpoint, device)
        else:
            txt = device

        if bootpart:
            label_text = _(
                "%s may be a system boot partition! Deleting it may break other operating systems. Are you sure you want to delete it?"
            ) % txt
        elif not snapshots:
            label_text = _(
                "Are you sure you want to delete all of the data on %s?") % txt
        else:
            label_text = _(
                "Are you sure you want to delete all of the data on %s, including snapshots and/or subvolumes?"
            ) % txt

        label.set_text(label_text)
示例#13
0
 def refresh(self):
     GUIObject.refresh(self)
     self._warningLabel.set_text("")
示例#14
0
    def refresh(self):
        GUIObject.refresh(self)
        self._createBox()

        GLib.timeout_add(100, self._update_spokes)
示例#15
0
    def refresh(self, actions):
        GUIObject.refresh(self)

        self._store.clear()
        self.initialize(actions)
示例#16
0
    def refresh(self, actions):
        GUIObject.refresh(self)

        self._store.clear()
        self.initialize(actions)
示例#17
0
    def refresh(self):
        GUIObject.refresh(self)
        self._createBox()

        GLib.timeout_add(100, self._update_spokes)
示例#18
0
 def refresh(self):
     GUIObject.refresh(self)
     self._warningLabel.set_text("")
 def refresh(self, currentFile=""):
     GUIObject.refresh(self)
     self._chooser.connect("current-folder-changed", self.on_folder_changed)
     self._chooser.set_filename(constants.ISO_DIR + "/" + currentFile)
示例#20
0
 def refresh(self, currentFile=""):
     GUIObject.refresh(self)
     self._chooser.connect("current-folder-changed", self.on_folder_changed)
     self._chooser.set_filename(constants.ISO_DIR + "/" + currentFile)