Add tests for Chat, and fix the server_status message bar when in Chat mode

This commit is contained in:
Miguel Jacq 2021-05-10 15:05:16 +10:00
parent 5226a3b671
commit 772d12b4bb
6 changed files with 124 additions and 11 deletions

View file

@ -101,6 +101,10 @@
"gui_status_indicator_receive_working": "Starting…",
"gui_status_indicator_receive_scheduled": "Scheduled…",
"gui_status_indicator_receive_started": "Receiving",
"gui_status_indicator_chat_stopped": "Ready to chat",
"gui_status_indicator_chat_working": "Starting…",
"gui_status_indicator_chat_scheduled": "Scheduled…",
"gui_status_indicator_chat_started": "Chatting",
"gui_file_info": "{} files, {}",
"gui_file_info_single": "{} file, {}",
"history_in_progress_tooltip": "{} in progress",
@ -198,4 +202,4 @@
"error_port_not_available": "OnionShare port not available",
"history_receive_read_message_button": "Read Message",
"error_tor_protocol_error": "There was an error with Tor: {}"
}
}

View file

@ -452,20 +452,20 @@ class Tab(QtWidgets.QWidget):
# Chat mode
if self.chat_mode.server_status.status == ServerStatus.STATUS_STOPPED:
self.set_server_status_indicator_stopped(
strings._("gui_status_indicator_receive_stopped")
strings._("gui_status_indicator_chat_stopped")
)
elif self.chat_mode.server_status.status == ServerStatus.STATUS_WORKING:
if self.settings.get("general", "autostart_timer"):
self.set_server_status_indicator_working(
strings._("gui_status_indicator_receive_scheduled")
strings._("gui_status_indicator_chat_scheduled")
)
else:
self.set_server_status_indicator_working(
strings._("gui_status_indicator_receive_working")
strings._("gui_status_indicator_chat_working")
)
elif self.chat_mode.server_status.status == ServerStatus.STATUS_STARTED:
self.set_server_status_indicator_started(
strings._("gui_status_indicator_receive_started")
strings._("gui_status_indicator_chat_started")
)
def set_server_status_indicator_stopped(self, label_text):