def __init__(self, storage, payload, instclass,
                 distributionText = distributionText, isFinal = isFinal,
                 quitDialog = QuitDialog):

        UserInterface.__init__(self, storage, payload, instclass)

        self._actions = []
        self._currentAction = None
        self._ui = None

        self.data = None

        self._distributionText = distributionText
        self._isFinal = isFinal
        self._quitDialog = quitDialog
        self._mehInterface = GraphicalExceptionHandlingIface(
                                    self.lightbox_over_current_action)

        # This is a hack to make sure the AnacondaWidgets library gets loaded
        # before glade tries to use Anaconda types
        # glade file should contain the following line to make this seamless
        #
        # <requires lib="AnacondaWidgets" version="1.0"/>
        #
        # but the current (3.4) version of GtkBuilder does not support
        # requires elements with 3rd party libraries
        from gi.repository import AnacondaWidgets
示例#2
0
    def __init__(self,
                 storage,
                 payload,
                 instclass,
                 distributionText=product.distributionText,
                 isFinal=product.isFinal,
                 quitDialog=QuitDialog,
                 gui_lock=None,
                 fullscreen=False):

        UserInterface.__init__(self, storage, payload, instclass)

        self._actions = []
        self._currentAction = None
        self._ui = None
        self._gui_lock = gui_lock

        self.data = None

        self.mainWindow = MainWindow(fullscreen=fullscreen)

        self._distributionText = distributionText
        self._isFinal = isFinal
        self._quitDialog = quitDialog
        self._mehInterface = GraphicalExceptionHandlingIface(
            self.mainWindow.lightbox_on)

        ANACONDA_WINDOW_GROUP.add_window(self.mainWindow)
示例#3
0
    def __init__(self,
                 storage,
                 payload,
                 instclass,
                 distributionText=distributionText,
                 isFinal=isFinal,
                 quitDialog=QuitDialog):

        UserInterface.__init__(self, storage, payload, instclass)

        self._actions = []
        self._currentAction = None
        self._ui = None

        self.data = None

        self._distributionText = distributionText
        self._isFinal = isFinal
        self._quitDialog = quitDialog
        self._mehInterface = GraphicalExceptionHandlingIface(
            self.lightbox_over_current_action)

        # This is a hack to make sure the AnacondaWidgets library gets loaded
        # before glade tries to use Anaconda types
        # glade file should contain the following line to make this seamless
        #
        # <requires lib="AnacondaWidgets" version="1.0"/>
        #
        # but the current (3.4) version of GtkBuilder does not support
        # requires elements with 3rd party libraries
        from gi.repository import AnacondaWidgets
示例#4
0
    def _check_spokes_priority_uniqueness(self):
        # Force us to always decide order of standalone spokes based on priority not by name.
        # This will ordering errors easier to spot.
        spokes = self.ordered_action_classes

        for hub in self.hubs:
            pre_spokes = UserInterface._filter_spokes_by_pre_for_hub_reference(spokes, hub)
            self._check_spokes_with_same_priority(pre_spokes)
            post_spokes = UserInterface._filter_spokes_by_post_for_hub_reference(spokes, hub)
            self._check_spokes_with_same_priority(post_spokes)
示例#5
0
    def __init__(self, storage, payload, instclass,
                 distributionText = product.distributionText, isFinal = product.isFinal,
                 quitDialog = QuitDialog):

        UserInterface.__init__(self, storage, payload, instclass)

        self._actions = []
        self._currentAction = None
        self._ui = None

        self.data = None

        self._distributionText = distributionText
        self._isFinal = isFinal
        self._quitDialog = quitDialog
        self._mehInterface = GraphicalExceptionHandlingIface(
                                    self.lightbox_over_current_action)
示例#6
0
    def __init__(self, storage, payload, instclass,
                 distributionText=product.distributionText, isFinal=product.isFinal,
                 quitDialog=QuitDialog, gui_lock=None, fullscreen=False):

        UserInterface.__init__(self, storage, payload, instclass)

        self._actions = []
        self._currentAction = None
        self._ui = None
        self._gui_lock = gui_lock

        self.data = None

        self.mainWindow = MainWindow(fullscreen=fullscreen)

        self._distributionText = distributionText
        self._isFinal = isFinal
        self._quitDialog = quitDialog
        self._mehInterface = GraphicalExceptionHandlingIface(
                                    self.mainWindow.lightbox_on)

        ANACONDA_WINDOW_GROUP.add_window(self.mainWindow)
示例#7
0
    def test_correct_spokes_ordering(self):
        # create fake spokes with the same priority
        hub = create_autospec(Hub)

        class SpokeA(StandaloneSpoke):  # pylint: disable=abstract-method
            preForHub = hub

        class SpokeB(StandaloneSpoke):  # pylint: disable=abstract-method
            preForHub = hub

        class SpokeC(StandaloneSpoke):  # pylint: disable=abstract-method
            preForHub = hub

        class SpokeD(StandaloneSpoke):  # pylint: disable=abstract-method
            postForHub = hub

        class SpokeE(StandaloneSpoke):  # pylint: disable=abstract-method
            postForHub = hub

        list1 = [SpokeC, SpokeB, SpokeE, SpokeD, SpokeA]

        # the input list ordering shouldn't matter sorting should be based on class names
        assert [SpokeA, SpokeB, SpokeC, hub, SpokeD, SpokeE] == \
            UserInterface._orderActionClasses(list1, [hub])