small improvements in vpn module
* renamed "Off" to "Disconnect" * do not show already established connection in popup menu
This commit is contained in:
parent
a7a1da6b5d
commit
c7a0caeda5
1 changed files with 3 additions and 1 deletions
|
@ -81,8 +81,10 @@ class Module(bumblebee.engine.Module):
|
||||||
menu = bumblebee.popup_v2.PopupMenu()
|
menu = bumblebee.popup_v2.PopupMenu()
|
||||||
|
|
||||||
if self._connected_vpn_profile is not None:
|
if self._connected_vpn_profile is not None:
|
||||||
menu.add_menuitem("Off", callback=self._on_vpn_disconnect)
|
menu.add_menuitem("Disconnect", callback=self._on_vpn_disconnect)
|
||||||
for vpn_profile in self._vpn_profiles:
|
for vpn_profile in self._vpn_profiles:
|
||||||
|
if self._connected_vpn_profile is not None and self._connected_vpn_profile == vpn_profile:
|
||||||
|
continue
|
||||||
menu.add_menuitem(vpn_profile, callback=functools.partial(self._on_vpn_connect, vpn_profile))
|
menu.add_menuitem(vpn_profile, callback=functools.partial(self._on_vpn_connect, vpn_profile))
|
||||||
menu.show(widget)
|
menu.show(widget)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue