Skip to content

Commit

Permalink
Disable Credit Mining by default and fix its button in GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
ichorid committed Mar 5, 2020
1 parent 2742c3a commit c07d97c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 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 @@ -100,7 +100,7 @@ poll_interval = integer(min=1, default=5)
history_size = integer(min=1, default=20)

[credit_mining]
enabled = boolean(default=True)
enabled = boolean(default=False)
sources = string_list(default=list())
max_disk_space = integer(min=0, default=53687091200)

Expand Down
12 changes: 6 additions & 6 deletions 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>0</number>
<number>2</number>
</property>
<widget class="ChannelContentsWidget" name="personal_channel_page"/>
<widget class="ChannelContentsWidget" name="search_results_page"/>
Expand Down Expand Up @@ -1553,8 +1553,8 @@ border-top: 1px solid #555;
<rect>
<x>0</x>
<y>0</y>
<width>300</width>
<height>646</height>
<width>854</width>
<height>710</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_22">
Expand Down Expand Up @@ -2905,7 +2905,7 @@ color: white;</string>
<item>
<widget class="QCheckBox" name="credit_mining_enabled_checkbox">
<property name="text">
<string>Enable token mining</string>
<string>Enable token mining (requires Tribler restart)</string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -4691,8 +4691,8 @@ color: white</string>
<rect>
<x>0</x>
<y>0</y>
<width>321</width>
<height>259</height>
<width>856</width>
<height>387</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout_4">
Expand Down
4 changes: 3 additions & 1 deletion src/tribler-gui/tribler_gui/widgets/subscriptionswidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ def update_subscribe_button(self, remote_response=None):
# Disable channel control buttons for LEGACY_ENTRY channels
hide_controls = self.contents_widget.model.channel_info["status"] == 1000
self.subscribe_button.setHidden(hide_controls)
self.credit_mining_button.setHidden(hide_controls)
if hide_controls:
# This button could be hidden before for other reasons, that's why we only hide, but not _unhide_ it here
self.credit_mining_button.setHidden(True)

def on_subscribe_button_click(self):
TriblerNetworkRequest(
Expand Down

0 comments on commit c07d97c

Please sign in to comment.