Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Allie Crevier committed Apr 25, 2019
1 parent c499c71 commit 8a9c2e7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions securedrop_client/gui/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,8 @@ def setup(self, controller):

def on_authentication_changed(self, authenticated: bool):
"""
Set up toggle handlers based on whehter or not the user is authenticated.
Set up handlers based on whether or not the user is authenticated. Connect to 'pressed'
event instead of 'toggled' event when not authenticated because toggling will be disabled.
"""
if authenticated:
self.toggled.connect(self.on_toggle)
Expand All @@ -870,7 +871,7 @@ def on_toggle(self):

def on_toggle_offline(self):
"""
Show error message and prevent toggle by setting checkable to False. Unfortunately,
Show error message and disable toggle by setting checkable to False. Unfortunately,
disabling toggle doesn't freeze state, rather it always displays the off state when a user
tries to toggle. In order to save on state we update the icon's off state image to display
on (hack).
Expand Down

0 comments on commit 8a9c2e7

Please sign in to comment.