Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Site DB available without connecting to progr... #439

Closed
github-actions bot opened this issue Jan 15, 2021 · 1 comment
Closed

Make Site DB available without connecting to progr... #439

github-actions bot opened this issue Jan 15, 2021 · 1 comment
Labels
endgame: duplicate Issue or PR is closed as a duplicate of another and both cross-reference one another. status: closed Pull Request is complete and integrated or closed for anther reason. todo Issue was created automatically from an ISSUE statement in the code.

Comments

@github-actions
Copy link
Contributor

Make Site DB available without connecting to program DB.

# ISSUE: Make Site DB available without connecting to program DB.

        pub.subscribe(self._do_set_status, 'request_set_status')

    def _do_request_options_assistant(self,
                                      __widget: Gtk.ImageMenuItem) -> None:
        """Request the EditOptions assistant be launched.

        :param __widget: the Gtk.ImageMenuItem() that called this class.
        :return: None
        :rtype: None
        """
        _dialog = EditOptions(parent=self)

        # ISSUE: Make Site DB available without connecting to program DB.
        #
        # The site DB should be available without having to connect to a
        # program DB.  Currently the site DAO is a member of the
        # ProgramManager's dict of data managers.  The site DAO needs to be
        # made available out of __main__.py or the ProgramManager needs to
        # be made accessible to the RAMSTKDesktop so site options can be
        # accessed.
        # assignees: weibullguy
        # label: globalbacklog, normal
        if _dialog.do_run() == Gtk.ResponseType.OK:
            print("Need site admin or higher privileges.")

        _dialog.do_destroy()

    def _do_request_preferences_assistant(self,
                                          __widget: Gtk.ImageMenuItem) -> None:
        """Request the EditPreferences assistant be launched.

        :param __widget: the Gtk.ImageMenuItem() that called this class.
        :return: None
        :rtype: None
        """
        _assistant = Gtk.Window()
        _preferences = EditPreferences(self.RAMSTK_USER_CONFIGURATION,
                                       self._logger)

        _n_screens = Gdk.Screen.get_default().get_n_monitors()
        _width = Gdk.Screen.width() / _n_screens
        _height = Gdk.Screen.height()

        _assistant.set_border_width(5)
        _assistant.set_default_size(_width - 450, (4 * _height / 7))
        _assistant.set_modal(True)
        _assistant.set_position(Gtk.WindowPosition.CENTER)
        _assistant.set_resizable(True)
        _assistant.set_transient_for(self)

        _assistant.add(_preferences)

        _assistant.show_all()

    def __make_menu(self) -> None:
        """Make the menu for the Module Book.

584e0c636cbfafcdd2450d44e3169f48f1277a8c

@github-actions github-actions bot added the todo Issue was created automatically from an ISSUE statement in the code. label Jan 15, 2021
@weibullguy weibullguy added status: closed Pull Request is complete and integrated or closed for anther reason. endgame: duplicate Issue or PR is closed as a duplicate of another and both cross-reference one another. labels Jan 15, 2021
@weibullguy
Copy link
Collaborator

Duplicate of #433

@weibullguy weibullguy marked this as a duplicate of #433 Jan 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
endgame: duplicate Issue or PR is closed as a duplicate of another and both cross-reference one another. status: closed Pull Request is complete and integrated or closed for anther reason. todo Issue was created automatically from an ISSUE statement in the code.
Projects
None yet
Development

No branches or pull requests

1 participant