diff --git a/onionshare/onion.py b/onionshare/onion.py index 57e407ea..dc47019f 100644 --- a/onionshare/onion.py +++ b/onionshare/onion.py @@ -446,11 +446,11 @@ class Onion(object): if self.settings.get('private_key'): key_type = "RSA1024" key_content = self.settings.get('private_key') - self.common.log('Onion', 'Starting a hidden service with a saved private key') + self.common.log('Onion', 'start_onion_service', 'Starting a hidden service with a saved private key') else: key_type = "NEW" key_content = "RSA1024" - self.common.log('Onion', 'Starting a hidden service with a new private key') + self.common.log('Onion', 'start_onion_service', 'Starting a hidden service with a new private key') try: if basic_auth != None: diff --git a/onionshare_gui/__init__.py b/onionshare_gui/__init__.py index 39269b07..11a5999c 100644 --- a/onionshare_gui/__init__.py +++ b/onionshare_gui/__init__.py @@ -110,7 +110,7 @@ def main(): app = OnionShare(common, onion, local_only, stay_open, shutdown_timeout) # Launch the gui - gui = OnionShareGui(onion, qtapp, app, filenames, config, local_only) + gui = OnionShareGui(common, web, onion, qtapp, app, filenames, config, local_only) # Clean up when app quits def shutdown(): diff --git a/onionshare_gui/onionshare_gui.py b/onionshare_gui/onionshare_gui.py index b5e411f2..d5a0889a 100644 --- a/onionshare_gui/onionshare_gui.py +++ b/onionshare_gui/onionshare_gui.py @@ -107,7 +107,7 @@ class OnionShareGui(QtWidgets.QMainWindow): self.filesize_warning.hide() # Downloads - self.downloads = Downloads() + self.downloads = Downloads(self.common) self.new_download = False self.downloads_in_progress = 0 self.downloads_completed = 0 @@ -118,7 +118,7 @@ class OnionShareGui(QtWidgets.QMainWindow): self.info_label.setStyleSheet('QLabel { font-size: 12px; color: #666666; }') self.info_show_downloads = QtWidgets.QToolButton() - self.info_show_downloads.setIcon(QtGui.QIcon(common.get_resource_path('images/download_window_gray.png'))) + self.info_show_downloads.setIcon(QtGui.QIcon(self.common.get_resource_path('images/download_window_gray.png'))) self.info_show_downloads.setCheckable(True) self.info_show_downloads.toggled.connect(self.downloads_toggled) self.info_show_downloads.setToolTip(strings._('gui_downloads_window_tooltip', True)) @@ -655,7 +655,7 @@ class OnionShareGui(QtWidgets.QMainWindow): """ When the 'Show/hide downloads' button is toggled, show or hide the downloads window. """ - common.log('OnionShareGui', 'toggle_downloads') + self.common.log('OnionShareGui', 'toggle_downloads') if checked: self.downloads.downloads_container.show() else: @@ -701,7 +701,7 @@ class OnionShareGui(QtWidgets.QMainWindow): """ self.update_downloads_completed(0) self.update_downloads_in_progress(0) - self.info_show_downloads.setIcon(QtGui.QIcon(common.get_resource_path('images/download_window_gray.png'))) + self.info_show_downloads.setIcon(QtGui.QIcon(self.common.get_resource_path('images/download_window_gray.png'))) self.downloads.no_downloads_label.show() self.downloads.downloads_container.resize(self.downloads.downloads_container.sizeHint()) diff --git a/onionshare_gui/settings_dialog.py b/onionshare_gui/settings_dialog.py index e7449b51..f38f996e 100644 --- a/onionshare_gui/settings_dialog.py +++ b/onionshare_gui/settings_dialog.py @@ -683,7 +683,7 @@ class SettingsDialog(QtWidgets.QDialog): reboot_onion = False if not self.local_only: if self.onion.is_authenticated(): - common.log('SettingsDialog', 'save_clicked', 'Connected to Tor') + self.common.log('SettingsDialog', 'save_clicked', 'Connected to Tor') def changed(s1, s2, keys): """ Compare the Settings objects s1 and s2 and return true if any values @@ -705,20 +705,20 @@ class SettingsDialog(QtWidgets.QDialog): reboot_onion = True else: - common.log('SettingsDialog', 'save_clicked', 'Not connected to Tor') + self.common.log('SettingsDialog', 'save_clicked', 'Not connected to Tor') # Tor isn't connected, so try connecting reboot_onion = True # Do we need to reinitialize Tor? if reboot_onion: # Reinitialize the Onion object - common.log('SettingsDialog', 'save_clicked', 'rebooting the Onion') + self.common.log('SettingsDialog', 'save_clicked', 'rebooting the Onion') self.onion.cleanup() tor_con = TorConnectionDialog(self.qtapp, settings, self.onion) tor_con.start() - common.log('SettingsDialog', 'save_clicked', 'Onion done rebooting, connected to Tor: {}'.format(self.onion.connected_to_tor)) + self.common.log('SettingsDialog', 'save_clicked', 'Onion done rebooting, connected to Tor: {}'.format(self.onion.connected_to_tor)) if self.onion.is_authenticated() and not tor_con.wasCanceled(): self.settings_saved.emit()