Skip to content

Commit

Permalink
Remove REST API port from GUI settings
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlovsky committed Aug 9, 2023
1 parent 268991b commit fac71ee
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 75 deletions.
59 changes: 0 additions & 59 deletions src/tribler/gui/qt_resources/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -1809,65 +1809,6 @@ per download</string>
</property>
</widget>
</item>
<item row="12" column="0">
<widget class="QLabel" name="label_61">
<property name="styleSheet">
<string notr="true">font-weight: bold;
color: white;</string>
</property>
<property name="text">
<string>GUI/Core connection</string>
</property>
</widget>
</item>
<item row="13" column="0">
<widget class="QLabel" name="label_62">
<property name="text">
<string>Port (defaults to 20100)</string>
</property>
</widget>
</item>
<item row="13" column="1">
<widget class="QLineEdit" name="api_port_input">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>250</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>250</width>
<height>16777215</height>
</size>
</property>
<property name="placeholderText">
<string>Port</string>
</property>
</widget>
</item>
<item row="14" column="1">
<widget class="QLabel" name="label_65">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>You can adjust the port that the interface uses to communicate with the Tribler core. Applied after restarting Tribler. Change this at your own risk!</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="settings_bandwidth_tab">
Expand Down
16 changes: 0 additions & 16 deletions src/tribler/gui/widgets/settingspage.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,6 @@ def initialize_with_settings(self, settings):
max_conn_download = 0
self.window().max_connections_download_input.setText(str(max_conn_download))

self.window().api_port_input.setText(f"{get_gui_setting(gui_settings, 'api_port', '')}")

# Bandwidth settings
self.window().upload_rate_limit_input.setText(str(settings['libtorrent']['max_upload_rate'] // 1024))
self.window().download_rate_limit_input.setText(str(settings['libtorrent']['max_download_rate'] // 1024))
Expand Down Expand Up @@ -467,20 +465,6 @@ def save_settings(self, checked):
)
return

try:
if self.window().api_port_input.text():
api_port = int(self.window().api_port_input.text() or 0)
if api_port < 0 or api_port >= 65536:
raise ValueError()
self.window().gui_settings.setValue("api_port", api_port)
except ValueError:
ConfirmationDialog.show_error(
self.window(),
tr("Invalid value for api port"),
tr("Please enter a valid port for the api (between 0 and 65536)"),
)
return

seeding_modes = ['forever', 'time', 'never', 'ratio']
selected_mode = 'forever'
for seeding_mode in seeding_modes:
Expand Down

0 comments on commit fac71ee

Please sign in to comment.