Skip to content

Commit

Permalink
Disable market by default, added GUI toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
devos50 authored and ichorid committed Jun 18, 2020
1 parent 5494b3b commit fe7af88
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/tribler-core/tribler_core/config/tribler_config.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
28 changes: 27 additions & 1 deletion src/tribler-gui/tribler_gui/qt_resources/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,7 @@ background-color: #e67300;
<item>
<widget class="QStackedWidget" name="stackedWidget">
<property name="currentIndex">
<number>8</number>
<number>2</number>
</property>
<widget class="ChannelContentsWidget" name="personal_channel_page"/>
<widget class="ChannelContentsWidget" name="search_results_page"/>
Expand Down Expand Up @@ -2024,6 +2024,32 @@ color: white;</string>
</property>
</widget>
</item>
<item row="16" column="0">
<widget class="QLabel" name="label_3">
<property name="styleSheet">
<string notr="true">font-weight: bold;
color: white;</string>
</property>
<property name="text">
<string>Market</string>
</property>
</widget>
</item>
<item row="17" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Enable the market?
(requires Tribler restart)</string>
</property>
</widget>
</item>
<item row="17" column="1">
<widget class="QCheckBox" name="enable_market_checkbox">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="settings_connection_tab">
Expand Down
6 changes: 6 additions & 0 deletions src/tribler-gui/tribler_gui/widgets/settingspage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])

Expand Down Expand Up @@ -390,6 +393,7 @@ def save_settings(self):
'libtorrent': {},
'watch_folder': {},
'tunnel_community': {},
'market_community': {},
'trustchain': {},
'resource_monitor': {},
'ipv8': {},
Expand All @@ -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 (
Expand Down

0 comments on commit fe7af88

Please sign in to comment.