mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
Remove the desktop notification setting -- everyone gets them now
This commit is contained in:
parent
1d7ec585ee
commit
2ee7e74236
@ -59,7 +59,6 @@ class Settings(object):
|
||||
'auth_type': 'no_auth',
|
||||
'auth_password': '',
|
||||
'close_after_first_download': True,
|
||||
'systray_notifications': True,
|
||||
'shutdown_timeout': False,
|
||||
'use_stealth': False,
|
||||
'use_autoupdate': True,
|
||||
|
@ -357,7 +357,6 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
||||
if not self.onion.is_authenticated():
|
||||
self.timer.stop()
|
||||
self.status_bar.showMessage(strings._('gui_tor_connection_lost', True))
|
||||
if self.system_tray.supportsMessages() and self.settings.get('systray_notifications'):
|
||||
self.system_tray.showMessage(strings._('gui_tor_connection_lost', True), strings._('gui_tor_connection_error_settings', True))
|
||||
|
||||
self.share_mode.handle_tor_broke()
|
||||
@ -401,7 +400,6 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
||||
When the URL gets copied to the clipboard, display this in the status bar.
|
||||
"""
|
||||
self.common.log('OnionShareGui', 'copy_url')
|
||||
if self.system_tray.supportsMessages() and self.common.settings.get('systray_notifications'):
|
||||
self.system_tray.showMessage(strings._('gui_copied_url_title', True), strings._('gui_copied_url', True))
|
||||
|
||||
def copy_hidservauth(self):
|
||||
@ -409,7 +407,6 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
||||
When the stealth onion service HidServAuth gets copied to the clipboard, display this in the status bar.
|
||||
"""
|
||||
self.common.log('OnionShareGui', 'copy_hidservauth')
|
||||
if self.system_tray.supportsMessages() and self.common.settings.get('systray_notifications'):
|
||||
self.system_tray.showMessage(strings._('gui_copied_hidservauth_title', True), strings._('gui_copied_hidservauth', True))
|
||||
|
||||
def clear_message(self):
|
||||
|
@ -59,11 +59,6 @@ class SettingsDialog(QtWidgets.QDialog):
|
||||
self.close_after_first_download_checkbox.setCheckState(QtCore.Qt.Checked)
|
||||
self.close_after_first_download_checkbox.setText(strings._("gui_settings_close_after_first_download_option", True))
|
||||
|
||||
# Whether or not to show systray notifications
|
||||
self.systray_notifications_checkbox = QtWidgets.QCheckBox()
|
||||
self.systray_notifications_checkbox.setCheckState(QtCore.Qt.Checked)
|
||||
self.systray_notifications_checkbox.setText(strings._("gui_settings_systray_notifications", True))
|
||||
|
||||
# Whether or not to use a shutdown timer
|
||||
self.shutdown_timeout_checkbox = QtWidgets.QCheckBox()
|
||||
self.shutdown_timeout_checkbox.setCheckState(QtCore.Qt.Checked)
|
||||
@ -77,7 +72,6 @@ class SettingsDialog(QtWidgets.QDialog):
|
||||
# Sharing options layout
|
||||
sharing_group_layout = QtWidgets.QVBoxLayout()
|
||||
sharing_group_layout.addWidget(self.close_after_first_download_checkbox)
|
||||
sharing_group_layout.addWidget(self.systray_notifications_checkbox)
|
||||
sharing_group_layout.addWidget(self.shutdown_timeout_checkbox)
|
||||
sharing_group_layout.addWidget(self.save_private_key_checkbox)
|
||||
sharing_group = QtWidgets.QGroupBox(strings._("gui_settings_sharing_label", True))
|
||||
@ -386,12 +380,6 @@ class SettingsDialog(QtWidgets.QDialog):
|
||||
else:
|
||||
self.close_after_first_download_checkbox.setCheckState(QtCore.Qt.Unchecked)
|
||||
|
||||
systray_notifications = self.old_settings.get('systray_notifications')
|
||||
if systray_notifications:
|
||||
self.systray_notifications_checkbox.setCheckState(QtCore.Qt.Checked)
|
||||
else:
|
||||
self.systray_notifications_checkbox.setCheckState(QtCore.Qt.Unchecked)
|
||||
|
||||
shutdown_timeout = self.old_settings.get('shutdown_timeout')
|
||||
if shutdown_timeout:
|
||||
self.shutdown_timeout_checkbox.setCheckState(QtCore.Qt.Checked)
|
||||
@ -760,7 +748,6 @@ class SettingsDialog(QtWidgets.QDialog):
|
||||
settings.load() # To get the last update timestamp
|
||||
|
||||
settings.set('close_after_first_download', self.close_after_first_download_checkbox.isChecked())
|
||||
settings.set('systray_notifications', self.systray_notifications_checkbox.isChecked())
|
||||
settings.set('shutdown_timeout', self.shutdown_timeout_checkbox.isChecked())
|
||||
if self.save_private_key_checkbox.isChecked():
|
||||
settings.set('save_private_key', True)
|
||||
|
@ -195,7 +195,6 @@ class ShareMode(QtWidgets.QWidget):
|
||||
self.downloads_in_progress += 1
|
||||
self.update_downloads_in_progress(self.downloads_in_progress)
|
||||
|
||||
if self.system_tray.supportsMessages() and self.common.settings.get('systray_notifications'):
|
||||
self.system_tray.showMessage(strings._('systray_download_started_title', True), strings._('systray_download_started_message', True))
|
||||
|
||||
def handle_request_rate_limit(self, event):
|
||||
@ -213,8 +212,8 @@ class ShareMode(QtWidgets.QWidget):
|
||||
|
||||
# Is the download complete?
|
||||
if event["data"]["bytes"] == self.web.zip_filesize:
|
||||
if self.system_tray.supportsMessages() and self.common.settings.get('systray_notifications'):
|
||||
self.system_tray.showMessage(strings._('systray_download_completed_title', True), strings._('systray_download_completed_message', True))
|
||||
|
||||
# Update the total 'completed downloads' info
|
||||
self.downloads_completed += 1
|
||||
self.update_downloads_completed(self.downloads_completed)
|
||||
@ -242,7 +241,6 @@ class ShareMode(QtWidgets.QWidget):
|
||||
# Update the 'in progress downloads' info
|
||||
self.downloads_in_progress -= 1
|
||||
self.update_downloads_in_progress(self.downloads_in_progress)
|
||||
if self.system_tray.supportsMessages() and self.common.settings.get('systray_notifications'):
|
||||
self.system_tray.showMessage(strings._('systray_download_canceled_title', True), strings._('systray_download_canceled_message', True))
|
||||
|
||||
def update_primary_action(self):
|
||||
|
@ -75,7 +75,6 @@
|
||||
"gui_settings_autoupdate_check_button": "Søg efter opdateringer",
|
||||
"gui_settings_sharing_label": "Valgmuligheder for deling",
|
||||
"gui_settings_close_after_first_download_option": "Stop deling efter første download",
|
||||
"gui_settings_systray_notifications": "Vis skrivebordsnotifikationer",
|
||||
"gui_settings_connection_type_label": "Hvordan skal OnionShare oprette forbindelse til Tor?",
|
||||
"gui_settings_connection_type_bundled_option": "Brug Tor som er bundet med OnionShare",
|
||||
"gui_settings_connection_type_automatic_option": "Prøv automatisk konfiguration med Tor Browser",
|
||||
|
@ -86,7 +86,6 @@
|
||||
"gui_settings_autoupdate_check_button": "Check For Updates",
|
||||
"gui_settings_sharing_label": "Sharing options",
|
||||
"gui_settings_close_after_first_download_option": "Stop sharing after first download",
|
||||
"gui_settings_systray_notifications": "Show desktop notifications",
|
||||
"gui_settings_connection_type_label": "How should OnionShare connect to Tor?",
|
||||
"gui_settings_connection_type_bundled_option": "Use Tor that is bundled with OnionShare",
|
||||
"gui_settings_connection_type_automatic_option": "Attempt automatic configuration with Tor Browser",
|
||||
|
@ -74,7 +74,6 @@
|
||||
"gui_settings_autoupdate_check_button": "Controleer voor update",
|
||||
"gui_settings_sharing_label": "Deel opties",
|
||||
"gui_settings_close_after_first_download_option": "Stop delen na eerste download",
|
||||
"gui_settings_systray_notifications": "Laat desktop notificaties zien",
|
||||
"gui_settings_connection_type_label": "Hoe moet OnionShare verbinden met Tor?",
|
||||
"gui_settings_connection_type_bundled_option": "Gebruik Tor die is meegeleverd met OnionShare",
|
||||
"gui_settings_connection_type_automatic_option": "Probeer automatische configuratie met Tor Browser",
|
||||
|
@ -51,7 +51,6 @@ class TestSettings:
|
||||
'auth_type': 'no_auth',
|
||||
'auth_password': '',
|
||||
'close_after_first_download': True,
|
||||
'systray_notifications': True,
|
||||
'shutdown_timeout': False,
|
||||
'use_stealth': False,
|
||||
'use_autoupdate': True,
|
||||
@ -119,7 +118,6 @@ class TestSettings:
|
||||
assert settings_obj.get('auth_type') == 'no_auth'
|
||||
assert settings_obj.get('auth_password') == ''
|
||||
assert settings_obj.get('close_after_first_download') is True
|
||||
assert settings_obj.get('systray_notifications') is True
|
||||
assert settings_obj.get('use_stealth') is False
|
||||
assert settings_obj.get('use_autoupdate') is True
|
||||
assert settings_obj.get('autoupdate_timestamp') is None
|
||||
|
Loading…
Reference in New Issue
Block a user