Skip to content

Commit

Permalink
Application: Fix showing update status bar widget in our apps at startup
Browse files Browse the repository at this point in the history
  • Loading branch information
ccordoba12 committed Mar 9, 2024
1 parent 7c4928a commit 8a5ceeb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
7 changes: 1 addition & 6 deletions spyder/plugins/application/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,11 @@ def setup(self):
parent=self
)

# Users can only use this widget in our apps.
if not is_pynsist() and not running_in_mac_app():
self.application_update_status.hide()
else:
self.application_update_status.set_no_status()

(self.application_update_status.sig_check_for_updates_requested
.connect(self.check_updates))
(self.application_update_status.sig_install_on_close_requested
.connect(self.set_installer_path))
self.application_update_status.set_no_status()

self.give_updates_feedback = False
self.thread_updates = None
Expand Down
5 changes: 3 additions & 2 deletions spyder/plugins/application/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
on_plugin_available, on_plugin_teardown)
from spyder.api.widgets.menus import MENU_SEPARATOR
from spyder.config.base import (DEV, get_module_path, get_debug_level,
is_pynsist, running_in_mac_app,
running_under_pytest)
from spyder.plugins.application.confpage import ApplicationConfigPage
from spyder.plugins.application.container import (
Expand Down Expand Up @@ -147,9 +148,9 @@ def on_mainwindow_visible(self):
container.give_updates_feedback = False
container.check_updates(startup=True)

# Hide status bar widget for updates if it doesn't need to be visible.
# Users only need to see this widget in our apps.
# Note: This can only be done at this point to take effect.
if not self.application_update_status.isVisible():
if not (is_pynsist() or running_in_mac_app()):
self.application_update_status.setVisible(False)

# Handle DPI scale and window changes to show a restart message.
Expand Down

0 comments on commit 8a5ceeb

Please sign in to comment.