mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-28 00:39:37 -05:00
Move more logic from OnionShareGui into ShareMode, when reloading settings
This commit is contained in:
parent
dd7d97dbbb
commit
f149530834
@ -314,11 +314,7 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
||||
if self.onion.is_authenticated():
|
||||
if not self.timer.isActive():
|
||||
self.timer.start(500)
|
||||
# If there were some files listed for sharing, we should be ok to
|
||||
# re-enable the 'Start Sharing' button now.
|
||||
if self.server_status.file_selection.get_num_files() > 0:
|
||||
self.primary_action.show()
|
||||
self.info_widget.show()
|
||||
self.share_mode.on_reload_settings()
|
||||
self.status_bar.clearMessage()
|
||||
|
||||
# If we switched off the shutdown timeout setting, ensure the widget is hidden.
|
||||
|
@ -243,6 +243,15 @@ class ShareMode(QtWidgets.QWidget):
|
||||
self.update_downloads_in_progress(self.downloads_in_progress)
|
||||
self.system_tray.showMessage(strings._('systray_download_canceled_title', True), strings._('systray_download_canceled_message', True))
|
||||
|
||||
def on_reload_settings(self):
|
||||
"""
|
||||
If there were some files listed for sharing, we should be ok to re-enable
|
||||
the 'Start Sharing' button now.
|
||||
"""
|
||||
if self.server_status.file_selection.get_num_files() > 0:
|
||||
self.primary_action.show()
|
||||
self.info_widget.show()
|
||||
|
||||
def update_primary_action(self):
|
||||
# Show or hide primary action layout
|
||||
file_count = self.file_selection.file_list.count()
|
||||
|
Loading…
Reference in New Issue
Block a user