Exemplo n.º 1
0
    def reapply_language(self):
        # Set a new watch_children watcher with the current language

        # Clear the old one, if there is one
        if self._language:
            unwatch_children(self, self._on_child_added, self._language)

        self._language = os.environ["LANG"]
        watch_children(self, self._on_child_added, self._language)
    def reapply_language(self):
        # Set a new watch_children watcher with the current language

        # Clear the old one, if there is one
        if self._language:
            unwatch_children(self, self._on_child_added, self._language)

        self._language = os.environ["LANG"]
        watch_children(self, self._on_child_added, self._language)
Exemplo n.º 3
0
    def enlightbox(self, dialog):
        """Display a dialog in a lightbox over the main window.

           :param GtkDialog: the dialog to display
        """
        self.lightbox_on()

        # Set the dialog as transient for ourself
        ANACONDA_WINDOW_GROUP.add_window(dialog)
        dialog.set_position(Gtk.WindowPosition.CENTER_ALWAYS)
        dialog.set_transient_for(self)

        # Apply the language attributes to the dialog
        watch_children(dialog, self._on_child_added, self._language)

        yield

        unwatch_children(dialog, self._on_child_added, self._language)

        self.lightbox_off()
    def enlightbox(self, dialog):
        """Display a dialog in a lightbox over the main window.

           :param GtkDialog: the dialog to display
        """
        self.lightbox_on()

        # Set the dialog as transient for ourself
        ANACONDA_WINDOW_GROUP.add_window(dialog)
        dialog.set_position(Gtk.WindowPosition.CENTER_ALWAYS)
        dialog.set_transient_for(self)

        # Apply the language attributes to the dialog
        watch_children(dialog, self._on_child_added, self._language)

        yield

        unwatch_children(dialog, self._on_child_added, self._language)

        self.lightbox_off()