diff --git a/electrum_dash/commands.py b/electrum_dash/commands.py index 58cc62895..5cc5548e5 100644 --- a/electrum_dash/commands.py +++ b/electrum_dash/commands.py @@ -1207,6 +1207,7 @@ def get_parser(): parser_gui.add_argument("-m", action="store_true", dest="hide_gui", default=False, help="hide GUI on startup") parser_gui.add_argument("-L", "--lang", dest="language", default=None, help="default language used in GUI") parser_gui.add_argument("--daemon", action="store_true", dest="daemon", default=False, help="keep daemon running after GUI is closed") + parser_gui.add_argument("--ukraine-info", action="store_true", dest="ukraine_info", default=False, help="show 'Ukraine banner' on startup") add_wallet_option(parser_gui) add_network_options(parser_gui) add_global_options(parser_gui) diff --git a/electrum_dash/gui/qt/__init__.py b/electrum_dash/gui/qt/__init__.py index b8815f392..84becb4d7 100644 --- a/electrum_dash/gui/qt/__init__.py +++ b/electrum_dash/gui/qt/__init__.py @@ -28,6 +28,7 @@ import sys import traceback import threading +import re from typing import Optional, TYPE_CHECKING, List @@ -74,8 +75,10 @@ def __init__(self, windows): def eventFilter(self, obj, event): if event.type() == QtCore.QEvent.FileOpen: if len(self.windows) >= 1: - self.windows[0].pay_to_URI(event.url().toString()) - return True + url = event.url().toString() + if not re.match('^file://.*pydevd.py$', url): + self.windows[0].pay_to_URI(url) + return True return False @@ -277,7 +280,8 @@ def _create_window_for_wallet(self, wallet): w = ElectrumWindow(self, wallet) self.windows.append(w) self.build_tray_menu() - w.ukraine_info() + if self.config.ukraine_info: + w.ukraine_info() w.warn_if_testnet() w.warn_if_watching_only() return w diff --git a/electrum_dash/gui/qt/main_window.py b/electrum_dash/gui/qt/main_window.py index 6ec594ad3..7210de36c 100644 --- a/electrum_dash/gui/qt/main_window.py +++ b/electrum_dash/gui/qt/main_window.py @@ -702,7 +702,10 @@ def init_geometry(self): self.setGeometry(100, 100, 840, 400) def watching_only_changed(self): - name = "Dash Electrum | Glory to Ukraine | Slava Ukraini! | " + if not self.config.ukraine_info: + name = "Dash Electrum" + else: + name = "Dash Electrum | Glory to Ukraine | Slava Ukraini! | " if constants.net.TESTNET: name += " " + constants.net.NET_NAME.capitalize() title = '%s %s - %s' % (name, ELECTRUM_VERSION, @@ -954,7 +957,8 @@ def add_toggle_action(view_menu, tab): run_hook('init_menubar_tools', self, tools_menu) help_menu = menubar.addMenu(_("&Help")) - help_menu.addAction('Help Ukraine', self.ukraine_info) + if self.config.ukraine_info: + help_menu.addAction('Help Ukraine', self.ukraine_info) help_menu.addAction(_("&About"), self.show_about) help_menu.addAction(_("&Check for updates"), self.show_update_check) help_menu.addAction(_("&Official website"), lambda: webopen("https://electrum.dash.org")) diff --git a/electrum_dash/simple_config.py b/electrum_dash/simple_config.py index 4148b94e7..198e028e0 100644 --- a/electrum_dash/simple_config.py +++ b/electrum_dash/simple_config.py @@ -109,6 +109,8 @@ def __init__(self, options=None, read_user_config_function=None, self.decimal_point = DECIMAL_POINT_DEFAULT self.num_zeros = int(self.get('num_zeros', 8)) + self.ukraine_info = self.get('ukraine_info', False) # change the 'Ukraine info' banner to opt-in + def electrum_path(self): # Read electrum_path from command line # Otherwise use the user's default data directory. diff --git a/electrum_dash/version.py b/electrum_dash/version.py index 386e5f2d9..c91da3532 100644 --- a/electrum_dash/version.py +++ b/electrum_dash/version.py @@ -1,8 +1,8 @@ import re -ELECTRUM_VERSION = '4.1.6.7' # version of the client package -APK_VERSION = '4.1.6.7' # read by buildozer.spec +ELECTRUM_VERSION = '4.1.7.0' # version of the client package +APK_VERSION = '4.1.7.0' # read by buildozer.spec PROTOCOL_VERSION = '1.4.2' # protocol version requested