Removed modem sound :(

This commit is contained in:
Micah Lee 2018-03-22 11:00:22 -07:00
parent f8a4f74644
commit 052a09953a
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73
4 changed files with 0 additions and 37 deletions

Binary file not shown.

View File

@ -157,7 +157,6 @@ class Common(object):
},
'mirrors_txt': [os.path.join(SHARE, 'mirrors.txt'),
tbb_config+'/mirrors.txt'],
'modem_sound': os.path.join(SHARE, 'modem.ogg'),
'download_dir': tbb_cache+'/download',
'gnupg_homedir': tbb_local+'/gnupg_homedir',
'settings_file': tbb_config+'/settings.json',
@ -306,7 +305,6 @@ class Common(object):
'tbl_version': self.tbl_version,
'installed': False,
'download_over_tor': False,
'modem_sound': False,
'tor_socks_address': 'tcp:127.0.0.1:9050',
'mirror': self.default_mirror,
'force_en-US': False,

View File

@ -625,27 +625,6 @@ class Launcher:
return
# play modem sound?
if self.common.settings['modem_sound']:
def play_modem_sound():
try:
import pygame
pygame.mixer.init()
sound = pygame.mixer.Sound(self.common.paths['modem_sound'])
sound.play()
time.sleep(10)
except ImportError:
md = gtk.MessageDialog(
None, gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_WARNING, gtk.BUTTONS_CLOSE,
_("The python-pygame package is missing, the modem sound is unavailable.")
)
md.set_position(gtk.WIN_POS_CENTER)
md.run()
md.destroy()
t = threading.Thread(target=play_modem_sound)
t.start()
# hide the TBL window (#151)
if hasattr(self, 'window'):
self.window.hide()

View File

@ -62,18 +62,6 @@ class Settings(QtWidgets.QMainWindow):
self.tor_download_checkbox.setCheckState(self.common.settings['download_over_tor'] and self.txsocks_found)
# Modem sound
self.modem_checkbox = QtWidgets.QCheckBox()
self.modem_checkbox.setText(_("Play modem sound, because Tor is slow :]"))
try:
import pygame
self.modem_checkbox.setCheckState(bool(self.common.settings['modem_sound']))
except ImportError:
self.modem_checkbox.setCheckState(False)
self.modem_checkbox.setEnabled(False)
self.modem_checkbox.setToolTip(_("This option requires python-pygame to be installed"))
# Force en-US, only display if language isn't already en-US
self.force_en_checkbox = QtWidgets.QCheckBox()
self.force_en_checkbox.setText(_("Force downloading English version of Tor Browser"))
@ -92,7 +80,6 @@ class Settings(QtWidgets.QMainWindow):
# Settings layout
settings_layout = QtWidgets.QVBoxLayout()
settings_layout.addWidget(self.tor_download_checkbox)
settings_layout.addWidget(self.modem_checkbox)
settings_layout.addWidget(self.force_en_checkbox)
settings_layout.addLayout(tor_addr_layout)
@ -195,7 +182,6 @@ class Settings(QtWidgets.QMainWindow):
def save(self):
# Checkbox options
self.common.settings['download_over_tor'] = self.tor_download_checkbox.isChecked()
self.common.settings['modem_sound'] = self.modem_checkbox.isChecked()
self.common.settings['force_en-US'] = self.force_en_checkbox.isChecked()
self.common.settings['tor_socks_address'] = self.tor_addr.text()