Skip to content

Commit

Permalink
Icon for paused connections
Browse files Browse the repository at this point in the history
  • Loading branch information
grzegorz-gutowski committed Oct 10, 2024
1 parent 938ee31 commit 7888ead
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
30 changes: 30 additions & 0 deletions share/icons/hicolor/scalable/status/openvpn3-indicator-paused.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/openvpn3_indicator/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,8 @@ def session_icon(self, session_id):
return f'{APPLICATION_NAME}-idle'
if openvpn3.StatusMajor.CONNECTION == major and openvpn3.StatusMinor.CFG_REQUIRE_USER == minor:
return f'{APPLICATION_NAME}-loading'
if openvpn3.StatusMajor.CONNECTION == major and openvpn3.StatusMinor.CONN_PAUSED == minor:
return f'{APPLICATION_NAME}-paused'
return f'{APPLICATION_NAME}-active'

def session_description(self, session_id):
Expand All @@ -448,6 +450,8 @@ def session_description(self, session_id):
return f'Disconnected'
if openvpn3.StatusMajor.CONNECTION == major and openvpn3.StatusMinor.CFG_REQUIRE_USER == minor:
return f'Authentication required'
if openvpn3.StatusMajor.CONNECTION == major and openvpn3.StatusMinor.CONN_PAUSED == minor:
return f'Paused'
return f'Connected'

def notify_session_change(self, session_id):
Expand Down

0 comments on commit 7888ead

Please sign in to comment.