From 3be24d0ebea56a44dd3f5620eb0b0c2d9f199fc7 Mon Sep 17 00:00:00 2001 From: drew2a Date: Mon, 15 Jan 2024 16:13:02 +0100 Subject: [PATCH] Remove `Bandwidth Accounting` string leftovers. --- doc/restapi/trustview.rst | 8 - .../tribler_apptester/executor.py | 2 +- src/run_tribler.py | 1 - src/tribler/core/exceptions.py | 4 - src/tribler/gui/defs.py | 15 - src/tribler/gui/i18n/es_ES.ts | 25 -- src/tribler/gui/i18n/pt_BR.ts | 30 -- src/tribler/gui/i18n/ru_RU.ts | 23 -- src/tribler/gui/i18n/zh_CN.ts | 25 -- src/tribler/gui/qt_resources/mainwindow.ui | 13 - .../gui/qt_resources/trustexplanation.ui | 279 ------------------ src/tribler/gui/widgets/settingspage.py | 13 - 12 files changed, 1 insertion(+), 437 deletions(-) delete mode 100644 doc/restapi/trustview.rst delete mode 100644 src/tribler/gui/qt_resources/trustexplanation.ui diff --git a/doc/restapi/trustview.rst b/doc/restapi/trustview.rst deleted file mode 100644 index 5072494e110..00000000000 --- a/doc/restapi/trustview.rst +++ /dev/null @@ -1,8 +0,0 @@ -========== -Trust View -========== - -.. openapi:: swagger.yaml - :include: - /trustview.* - :encoding: utf-8 \ No newline at end of file diff --git a/scripts/application_tester/tribler_apptester/executor.py b/scripts/application_tester/tribler_apptester/executor.py index d2814190448..906483f1802 100644 --- a/scripts/application_tester/tribler_apptester/executor.py +++ b/scripts/application_tester/tribler_apptester/executor.py @@ -92,7 +92,7 @@ async def start_tribler(self): """ Start Tribler if it has not been started yet. """ - cmd = "%s --allow-code-injection --tunnel-testnet --trustchain-testnet" % self.tribler_path + cmd = "%s --allow-code-injection --tunnel-testnet" % self.tribler_path self._logger.info(f"Tribler not running - starting it: {cmd}") envvars = '\n'.join('%s=%s' % (key, val) for key, val in sorted(os.environ.items())) diff --git a/src/run_tribler.py b/src/run_tribler.py index e43b791a464..bfebb99bc8e 100644 --- a/src/run_tribler.py +++ b/src/run_tribler.py @@ -39,7 +39,6 @@ def __init__(self, *args, **kwargs): self.add_argument('--testnet', action="store_true", help="run Tribler in a separate test network") self.add_argument('--chant-testnet', action="store_true", help="use a separate test database for channels") - self.add_argument('--trustchain-testnet', action="store_true", help="use a separate trustchain community") self.add_argument('--tunnel-testnet', action="store_true", help="use a separate tunnel community") diff --git a/src/tribler/core/exceptions.py b/src/tribler/core/exceptions.py index a9ea57924cc..880ea7c2473 100644 --- a/src/tribler/core/exceptions.py +++ b/src/tribler/core/exceptions.py @@ -29,10 +29,6 @@ class InvalidConfigException(TriblerException): """The config file doesn't adhere to the config specification.""" -class TrustGraphException(TriblerException): - """Exception specific to Trust graph.""" - - class CoreError(TriblerException): """This is the base class for exceptions that causes GUI shutdown""" diff --git a/src/tribler/gui/defs.py b/src/tribler/gui/defs.py index 6b37fef0a57..c112a3c50f7 100644 --- a/src/tribler/gui/defs.py +++ b/src/tribler/gui/defs.py @@ -152,21 +152,6 @@ def get(cls, item, default=None): CATEGORY_SELECTOR_FOR_SEARCH_ITEMS = ("All", "Channels") + ContentCategories.long_names CATEGORY_SELECTOR_FOR_POPULAR_ITEMS = ("All",) + ContentCategories.long_names -# Trust Graph constants -COLOR_RED = "#b37477" -COLOR_GREEN = "#23cc2b" -COLOR_NEUTRAL = "#cdcdcd" -COLOR_DEFAULT = "#150507" -COLOR_ROOT = "#FE6D01" -COLOR_SELECTED = "#5c58ee" -HTML_SPACE = ' ' -TRUST_GRAPH_PEER_LEGENDS = ( - "\u25CF Helpful user    " - "\u25CF Selfish user    " - "\u25CF Unknown    " - "\u25CF Selected" % (COLOR_GREEN, COLOR_RED, COLOR_NEUTRAL, COLOR_SELECTED) -) - CONTEXT_MENU_WIDTH = 200 BITTORRENT_BIRTHDAY = 994032000 diff --git a/src/tribler/gui/i18n/es_ES.ts b/src/tribler/gui/i18n/es_ES.ts index e58955e46ae..02192d946bd 100644 --- a/src/tribler/gui/i18n/es_ES.ts +++ b/src/tribler/gui/i18n/es_ES.ts @@ -356,11 +356,6 @@ No puede deshacer esta acción. Select a version to delete. Seleccione la versión que desea eliminar. - - - <html><head/><body><p>Download with <b>%d</b> hop(s) of anonymity. When you download a file of 200 Megabyte, you will pay roughly <b>%d</b>Megabyte of bandwidth tokens.</p></body></html> - <html><head/><body><p>Descargar con <b>%d</b> salto(s) de anonimato. Cuando descarga un archivo de 200 Megabyte, usted pagará aproximadamente <b>%d</b>Megabyte en tokens de ancho de banda.</p></body></html> - Current Priority = %s @@ -1177,11 +1172,6 @@ Si no está seguro, pulse "No". Más adelante podrá eliminar esas car Form - - - Form - Formulario - Suggest Tags @@ -1387,11 +1377,6 @@ Si no está seguro, pulse "No". Más adelante podrá eliminar esas car DOWNLOAD DESCARGAR - - - Bandwidth Tokens - Tokens de ancho de banda - Edit metadata @@ -2160,11 +2145,6 @@ Alto anonimato This process might take around a minute. Este proceso puede durar unos minutos. - - - Trust statistics - Estadísticas de confianza - You can build trust by contributing bandwidth to the Tribler network. This is done by letting Tribler run idle. @@ -2195,11 +2175,6 @@ Alto anonimato People who helped you Personas que le han ayudado - - - Trust Graph - Gráfico de confianza - The graph below is based on your historical interactions with other users in the network. diff --git a/src/tribler/gui/i18n/pt_BR.ts b/src/tribler/gui/i18n/pt_BR.ts index 5fa18231b00..75db5a23c60 100644 --- a/src/tribler/gui/i18n/pt_BR.ts +++ b/src/tribler/gui/i18n/pt_BR.ts @@ -864,11 +864,6 @@ If unsure, press 'No'. You will be able to remove those directories fr Exclude files Excluir arquivos - - - <html><head/><body><p>Download with <b>%d</b> hop(s) of anonymity. When you download a file of 200 Megabyte, you will pay roughly <b>%d</b>Megabyte of bandwidth tokens.</p></body></html> - - Search results for %s @@ -1189,11 +1184,6 @@ New remote results received: %(num_remote_results)i Form - - - Form - Formulário - Add torrent(s) to personal channel @@ -1419,11 +1409,6 @@ New remote results received: %(num_remote_results)i DOWNLOAD BAIXAR - - - <html><head/><body><p>In Tribler, you compensate other users for the bandwidth you use when downloading with anonymity. When uploading content to other (Tribler) users, you earn <span style=" font-style:italic;">bandwidth tokens</span>. If you accumulate more bandwidth tokens, you get preferential treatment when downloading anonymously, which results in higher download speeds.</p><p>The exact amount of bandwidth tokens you pay to others, depends on the level of anonymity. This is the number of other users, or <span style=" font-style:italic;">hops</span>, you use during a download. If you download with three hop anonymity, your encrypted data is sent through the machines of three other Tribler users. Increasing the number of hops benefits anonymity but costs you more bandwidth tokens.</p><p>For example, if you download a <span style=" font-weight:600;">1 Gigabyte</span> video with one hop anonymity, you pay <span style=" font-weight:600;">1 Gigabyte</span> worth of bandwidth tokens. Each additional hop increases the amount of bandwidth tokens you have to pay. When downloading the same file using three hops, you pay <span style=" font-weight:600;">3 Gigabyte</span> of bandwidth tokens instead.</p></body></html> - - Additional information: @@ -1602,11 +1587,6 @@ New remote results received: %(num_remote_results)i Video Player Video Player - - - Trust Graph - Grafo de confiança - Debug @@ -2231,11 +2211,6 @@ High anonymity This process might take around a minute. Isso pode demorar um minuto. - - - Trust statistics - Estatísticas de Confiança - - MBytes @@ -2563,11 +2538,6 @@ High anonymity Create channel - - - Show trust graph - - Minimize to system tray? diff --git a/src/tribler/gui/i18n/ru_RU.ts b/src/tribler/gui/i18n/ru_RU.ts index fb946376b69..b4af005b76a 100644 --- a/src/tribler/gui/i18n/ru_RU.ts +++ b/src/tribler/gui/i18n/ru_RU.ts @@ -876,14 +876,6 @@ You can not undo this action. Вы уверены, что хотите удалить данные для выбранных версий? Это действие невозможно будет отменить - - - <html><head/><body><p>Download with <b>%d</b> hop(s) of anonymity. When you download a file of 200 Megabyte, you will pay roughly <b>%d</b>Megabyte of bandwidth tokens.</p></body></html> - <html><head/><body><p>Загружать анонимно через <b>%d</b> прокси Tribler. - Загрузка 200 МБайт обойдётся приблизительно в <b>%d</b> - МБайт трафик-токенов.</p></body></html> - - Tribler settings @@ -1204,11 +1196,6 @@ New remote results received: %(num_remote_results)i Form - - - Form - От - Add torrent(s) to personal channel @@ -2131,11 +2118,6 @@ High anonymity This process might take around a minute. Это может занять около минуты - - - Trust statistics - Статистика доверия - - MBytes @@ -2161,11 +2143,6 @@ High anonymity People who helped you Узлы, которые помогли Вам - - - Trust Graph - Граф доверия - The graph below is based on your historical interactions with other users in the network. diff --git a/src/tribler/gui/i18n/zh_CN.ts b/src/tribler/gui/i18n/zh_CN.ts index 36c42e0cc47..d340a8269b2 100644 --- a/src/tribler/gui/i18n/zh_CN.ts +++ b/src/tribler/gui/i18n/zh_CN.ts @@ -877,11 +877,6 @@ You can not undo this action. 你确定要移除所选的版本吗? 此操作无法撤消。 - - - <html><head/><body><p>Download with <b>%d</b> hop(s) of anonymity. When you download a file of 200 Megabyte, you will pay roughly <b>%d</b>Megabyte of bandwidth tokens.</p></body></html> - <html><head/><body><p>以 <b>%d</b> 个跳数的匿名性下载。当你下载一个 200 MB 的文件,你将支付大约 <b>%d</b>MB 的带宽代币。</p></body></html> - Tribler settings @@ -1392,16 +1387,6 @@ New remote results received: %(num_remote_results)i DOWNLOAD 下载 - - - Bandwidth Tokens - 带宽代币 - - - - CLOSE - 关闭 - Edit metadata @@ -2157,11 +2142,6 @@ High anonymity This process might take around a minute. 此过程可能需要一分钟左右的时间。 - - - Trust statistics - 信任统计信息 - - MBytes @@ -2187,11 +2167,6 @@ High anonymity People who helped you 帮助我的人 - - - Trust Graph - 信任链图 - The graph below is based on your historical interactions with other users in the network. diff --git a/src/tribler/gui/qt_resources/mainwindow.ui b/src/tribler/gui/qt_resources/mainwindow.ui index 3d0e4cb716b..a8d826d20da 100644 --- a/src/tribler/gui/qt_resources/mainwindow.ui +++ b/src/tribler/gui/qt_resources/mainwindow.ui @@ -2121,19 +2121,6 @@ High anonymity - - - - <html><head/><body><p>Download with <span style=" font-weight:600;">1</span> hop(s) of anonymity. When you download a file of 200 Megabyte, you will pay <span style=" font-weight:600;">200</span> Megabyte of bandwidth tokens.</p></body></html> - - - Qt::RichText - - - true - - - diff --git a/src/tribler/gui/qt_resources/trustexplanation.ui b/src/tribler/gui/qt_resources/trustexplanation.ui deleted file mode 100644 index 534e93220a2..00000000000 --- a/src/tribler/gui/qt_resources/trustexplanation.ui +++ /dev/null @@ -1,279 +0,0 @@ - - - Form - - - - 0 - 0 - 538 - 335 - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - ArrowCursor - - - Form - - - false - - - QWidget { -background-color: #333333; -border-radius: 2px; -} -QToolButton { -border: 1px solid #B5B5B5; -border-radius: 12px; -color: white; -padding-left: 4px; -padding-right: 4px; -} -QToolButton::hover { -border: 1px solid white; -color: white; -} -QLineEdit, QTextEdit { -background-color: #444; -border: none; -color: #C0C0C0; -padding: 4px; -margin-top: 4px; -} - - - - 0 - - - QLayout::SetMinimumSize - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - color: white; - - - - 0 - - - QLayout::SetMinimumSize - - - 12 - - - 12 - - - 12 - - - 12 - - - - - - 0 - 0 - - - - - 0 - 20 - - - - - 16777215 - 20 - - - - font-size: 16px; font-weight: bold; - - - Bandwidth Tokens - - - Qt::AlignCenter - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 10 - - - - - - - - - 0 - 0 - - - - color: white; - - - <html><head/><body><p>In Tribler, you compensate other users for the bandwidth you use when downloading with anonymity. When uploading content to other (Tribler) users, you earn <span style=" font-style:italic;">bandwidth tokens</span>. If you accumulate more bandwidth tokens, you get preferential treatment when downloading anonymously, which results in higher download speeds.</p><p>The exact amount of bandwidth tokens you pay to others, depends on the level of anonymity. This is the number of other users, or <span style=" font-style:italic;">hops</span>, you use during a download. If you download with three hop anonymity, your encrypted data is sent through the machines of three other Tribler users. Increasing the number of hops benefits anonymity but costs you more bandwidth tokens.</p><p>For example, if you download a <span style=" font-weight:600;">1 Gigabyte</span> video with one hop anonymity, you pay <span style=" font-weight:600;">1 Gigabyte</span> worth of bandwidth tokens. Each additional hop increases the amount of bandwidth tokens you have to pay. When downloading the same file using three hops, you pay <span style=" font-weight:600;">3 Gigabyte</span> of bandwidth tokens instead.</p></body></html> - - - true - - - - - - - - - - - 0 - 0 - - - - - 0 - 50 - - - - - 16777215 - 50 - - - - - - - - 12 - - - 12 - - - 12 - - - 12 - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - - 0 - 24 - - - - - 16777215 - 24 - - - - PointingHandCursor - - - CLOSE - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - diff --git a/src/tribler/gui/widgets/settingspage.py b/src/tribler/gui/widgets/settingspage.py index 7bcb9a28e94..537a4a3f74e 100644 --- a/src/tribler/gui/widgets/settingspage.py +++ b/src/tribler/gui/widgets/settingspage.py @@ -213,8 +213,6 @@ def initialize_with_settings(self, settings): # Anonymity settings self.window().number_hops_slider.setValue(int(settings['download_defaults']['number_hops'])) - connect(self.window().number_hops_slider.valueChanged, self.update_anonymity_cost_label) - self.update_anonymity_cost_label(int(settings['download_defaults']['number_hops'])) # Data settings self.load_settings_data_tab() @@ -311,17 +309,6 @@ def on_confirm_remove_version_dirs(self, selected_versions): user_choice = message_box.exec_() return user_choice == QMessageBox.Yes - def update_anonymity_cost_label(self, value): - html_text = tr( - "

Download with %d hop(s) of anonymity. " - "When you download a file of 200 Megabyte, you will pay roughly %d" - "Megabyte of bandwidth tokens.

" - ) % ( - value, - 400 * (value - 1) + 200, - ) - self.window().anonymity_costs_label.setText(html_text) - def show_updated_cpu_priority(self, value): self.window().cpu_priority_value.setText(tr("Current Priority = %s") % value)