diff --git a/client/securedrop_client/gui/widgets.py b/client/securedrop_client/gui/widgets.py index 4446582a6..05d9fd68f 100644 --- a/client/securedrop_client/gui/widgets.py +++ b/client/securedrop_client/gui/widgets.py @@ -517,13 +517,15 @@ def __init__(self) -> None: self.setToolButtonStyle(Qt.ToolButtonStyle.ToolButtonTextBesideIcon) self.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed) - # TODO: set keyboard shortcut? self.delete_sources_action = QAction( QIcon(load_image("delete_sources_toolbar_icon.svg")), _("DELETE SOURCES"), self ) self.delete_sources_action.setObjectName("BatchActionButton") self.delete_sources_action.setToolTip( - _("Delete selected source accounts. Ctrl+click to select multiple sources.") + _( + "Delete selected source accounts. " + "Ctrl+click sources below to select multiple sources." + ) ) self.delete_sources_action.triggered.connect(self.on_action_triggered) self.button = self.widgetForAction(self.delete_sources_action) diff --git a/client/securedrop_client/locale/messages.pot b/client/securedrop_client/locale/messages.pot index 865598b62..15c8b1ec1 100644 --- a/client/securedrop_client/locale/messages.pot +++ b/client/securedrop_client/locale/messages.pot @@ -115,7 +115,7 @@ msgstr "" msgid "DELETE SOURCES" msgstr "" -msgid "Delete selected source accounts. Ctrl+click to select multiple sources." +msgid "Delete selected source accounts. Ctrl+click sources below to select multiple sources." msgstr "" msgid "{}" diff --git a/client/securedrop_client/logic.py b/client/securedrop_client/logic.py index 15d2f3679..654191f30 100644 --- a/client/securedrop_client/logic.py +++ b/client/securedrop_client/logic.py @@ -610,6 +610,9 @@ def login_offline_mode(self) -> None: # may have attempted online mode login, then switched to offline) self.gui.clear_clipboard() self.gui.show_main_window() + + # All child elements of main window should show logged_out state + self.gui.logout() self.update_sources() def on_action_requiring_login(self) -> None: diff --git a/client/securedrop_client/resources/css/sdclient.css b/client/securedrop_client/resources/css/sdclient.css index 179a44b07..a60b60e8e 100644 --- a/client/securedrop_client/resources/css/sdclient.css +++ b/client/securedrop_client/resources/css/sdclient.css @@ -170,7 +170,7 @@ QWidget { #EmptyConversationView QLabel { font-family: Montserrat; font-weight: 400; - font-size: 35px; + font-size: 30px; color: #a5b3e9; } @@ -180,7 +180,7 @@ QWidget { #EmptyConversationView QLabel#EmptyConversationView_bullet { margin: 4px 0px 0px 0px; - font-size: 35px; + font-size: 30px; font-weight: 600; } diff --git a/client/tests/gui/test_widgets.py b/client/tests/gui/test_widgets.py index f3686e326..587cdbd25 100644 --- a/client/tests/gui/test_widgets.py +++ b/client/tests/gui/test_widgets.py @@ -542,11 +542,9 @@ def test_MainView_show_sources_with_none_selected(mocker): source_item = SourceListWidgetItem(mv.source_list) mv.source_list.setItemWidget(source_item, source_widget) mv.source_list.source_items["stub_uuid"] = source_item - # mocker.patch.object(mv.source_list, "update_sources") mv.show_sources([factory.Source(), factory.Source(), factory.Source()]) - # mv.source_list.update_sources.assert_called_once_with([1, 2, 3]) assert mv.view_layout.currentIndex() == mv.NOTHING_SELECTED_INDEX @@ -647,9 +645,6 @@ def test_MainView_on_source_changed(mocker): mv.source_list.count = mocker.MagicMock(return_value=3) mv.controller = mocker.MagicMock(is_authenticated=True) mocker.patch("securedrop_client.gui.widgets.source_exists", return_value=True) - # scw = SourceConversationWrapper(source, mv.controller) - # mocker.patch("securedrop_client.gui.widgets.SourceConversationWrapper", return_value=scw) - # TODO mv.on_source_changed() mv.source_list.get_selected_source.assert_called_once_with() @@ -769,9 +764,6 @@ def test_MainView_on_source_changed_updates_conversation_view(mocker, session): session.add(reply) session.commit() source_selected = mocker.patch("securedrop_client.gui.widgets.SourceList.source_selected") - # mocker.patch( - # "securedrop_client.gui.widgets.SourceList.get_selected_source", return_value=source - # ) add_message_fn = mocker.patch( "securedrop_client.gui.widgets.ConversationView.add_message", new=mocker.Mock() )