From ad7d2bd8b350201f2e6cfc7d522348ca3e353769 Mon Sep 17 00:00:00 2001 From: Davide Grilli Date: Thu, 7 May 2026 17:07:24 +0200 Subject: [PATCH] feat: remove upstream Electrum update check from desktop GUI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Eliminates the startup dialog asking to enable update checks, the background version check against electrum.org, the status bar button, and the Help menu entry — all irrelevant for the Purple fork. --- electrum/gui/qt/main_window.py | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py index 978961c95..c405cd65f 100644 --- a/electrum/gui/qt/main_window.py +++ b/electrum/gui/qt/main_window.py @@ -95,7 +95,6 @@ from .util import (read_QIcon, ColorScheme, text_dialog, icon_path, WaitingDialo getOpenFileName, getSaveFileName, ShowQRLineEdit, scan_qr_from_screenshot) from .wizard.wallet import WIF_HELP_TEXT from .history_list import HistoryList, HistoryModel -from .update_checker import UpdateCheck, UpdateCheckThread from .channels_list import ChannelsList from .confirm_tx_dialog import ConfirmTxDialog, TxEditorContext from .rbf_dialog import BumpFeeDialog, DSCancelDialog @@ -296,26 +295,6 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger, QtEventListener): self.contacts.fetch_openalias(self.config) - # If the option hasn't been set yet - if not config.cv.AUTOMATIC_CENTRALIZED_UPDATE_CHECKS.is_set(): - choice = self.question(title="Electrum - " + _("Enable update check"), - msg=_("For security reasons we advise that you always use the latest version of Electrum.") + " " + - _("Would you like to be notified when there is a newer version of Electrum available?")) - config.AUTOMATIC_CENTRALIZED_UPDATE_CHECKS = bool(choice) - - self._update_check_thread = None - if config.AUTOMATIC_CENTRALIZED_UPDATE_CHECKS: - # The references to both the thread and the window need to be stored somewhere - # to prevent GC from getting in our way. - def on_version_received(v): - if UpdateCheck.is_newer(v): - self.update_check_button.setText(_("Update to Electrum {} is available").format(v)) - self.update_check_button.clicked.connect(lambda: self.show_update_check(v)) - self.update_check_button.show() - self._update_check_thread = UpdateCheckThread() - self._update_check_thread.checked.connect(on_version_received) - self._update_check_thread.start() - def run_coroutine_dialog(self, coro, text): """ run coroutine in a waiting dialog, with a Cancel button that cancels the coroutine""" from .util import RunCoroutineDialog @@ -848,7 +827,6 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger, QtEventListener): about_action.setMenuRole(QAction.MenuRole.AboutRole) # make sure OS recognizes it as "About" self.help_menu.addAction(about_action) self.help_menu.addAction(_("&Changelog"), lambda: webopen(constants.RELEASE_NOTES_URL)) - self.help_menu.addAction(_("&Check for updates"), self.show_update_check) self.help_menu.addAction(_("&Official website"), lambda: webopen("https://electrum.org")) self.help_menu.addSeparator() self.help_menu.addAction(_("&Documentation"), lambda: webopen("http://docs.electrum.org/")).setShortcut(QKeySequence.StandardKey.HelpContents) @@ -902,9 +880,6 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger, QtEventListener): return webopen('file:///' + filename) - def show_update_check(self, version=None): - self.gui_object._update_check = UpdateCheck(latest_version=version) - def show_report_bug(self): msg = ' '.join([ _("Please report any bugs as issues on github:
"), @@ -1812,12 +1787,6 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger, QtEventListener): self.search_box.hide() sb.addPermanentWidget(self.search_box) - self.update_check_button = QPushButton("") - self.update_check_button.setFlat(True) - self.update_check_button.setCursor(QCursor(Qt.CursorShape.PointingHandCursor)) - self.update_check_button.setIcon(read_QIcon("update.png")) - self.update_check_button.hide() - sb.addPermanentWidget(self.update_check_button) self.password_required_button = QPushButton(_('Password required')) self.password_required_button.setFlat(True) @@ -2821,8 +2790,6 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger, QtEventListener): self.qr_window.close() self.close_wallet() - if self._update_check_thread: - self._update_check_thread.stop() if self.tray: self.tray = None self.timer.stop()