From fe7af88a12ff1702fff9c204010a407d12c2cdf6 Mon Sep 17 00:00:00 2001 From: Martijn de Vos Date: Thu, 18 Jun 2020 14:05:59 +0200 Subject: [PATCH] Disable market by default, added GUI toggle --- .../tribler_core/config/tribler_config.spec | 2 +- .../tribler_gui/qt_resources/mainwindow.ui | 28 ++++++++++++++++++- .../tribler_gui/widgets/settingspage.py | 6 ++++ 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/src/tribler-core/tribler_core/config/tribler_config.spec b/src/tribler-core/tribler_core/config/tribler_config.spec index 78d2083dba2..649591fdba1 100644 --- a/src/tribler-core/tribler_core/config/tribler_config.spec +++ b/src/tribler-core/tribler_core/config/tribler_config.spec @@ -12,7 +12,7 @@ random_slots = integer(default=5) competing_slots = integer(default=15) [market_community] -enabled = boolean(default=True) +enabled = boolean(default=False) matchmaker = boolean(default=True) record_transactions = boolean(default=False) diff --git a/src/tribler-gui/tribler_gui/qt_resources/mainwindow.ui b/src/tribler-gui/tribler_gui/qt_resources/mainwindow.ui index 868bc579b7f..99cb24fa5dd 100644 --- a/src/tribler-gui/tribler_gui/qt_resources/mainwindow.ui +++ b/src/tribler-gui/tribler_gui/qt_resources/mainwindow.ui @@ -1151,7 +1151,7 @@ background-color: #e67300; - 8 + 2 @@ -2024,6 +2024,32 @@ color: white; + + + + font-weight: bold; +color: white; + + + Market + + + + + + + Enable the market? +(requires Tribler restart) + + + + + + + + + + diff --git a/src/tribler-gui/tribler_gui/widgets/settingspage.py b/src/tribler-gui/tribler_gui/widgets/settingspage.py index 00c65dc87cd..8df86d4d6bb 100644 --- a/src/tribler-gui/tribler_gui/widgets/settingspage.py +++ b/src/tribler-gui/tribler_gui/widgets/settingspage.py @@ -279,6 +279,9 @@ def initialize_with_settings(self, settings): get_gui_setting(gui_settings, "autocommit_enabled", True, is_bool=True) ) + # Market settings + self.window().enable_market_checkbox.setChecked(settings['market_community']['enabled']) + # Log directory self.window().log_location_input.setText(settings['general']['log_dir']) @@ -390,6 +393,7 @@ def save_settings(self): 'libtorrent': {}, 'watch_folder': {}, 'tunnel_community': {}, + 'market_community': {}, 'trustchain': {}, 'resource_monitor': {}, 'ipv8': {}, @@ -402,6 +406,8 @@ def save_settings(self): if settings_data['watch_folder']['enabled']: settings_data['watch_folder']['directory'] = self.window().watchfolder_location_input.text() + settings_data['market_community']['enabled'] = self.window().enable_market_checkbox.isChecked() + settings_data['libtorrent']['proxy_type'] = self.window().lt_proxy_type_combobox.currentIndex() if (