correctly detect upower support. Fixes #7047
This commit is contained in:
parent
65db6c5eb4
commit
46d6453634
|
@ -111,7 +111,7 @@ class FeaturesWindow:
|
||||||
_('Ability to request your router to forward port for file transfer.'),
|
_('Ability to request your router to forward port for file transfer.'),
|
||||||
_('Requires python-gupnp-igd.'),
|
_('Requires python-gupnp-igd.'),
|
||||||
_('Feature not available under Windows.')),
|
_('Feature not available under Windows.')),
|
||||||
_('UPower'): (self.gupnp_igd_available,
|
_('UPower'): (self.upower_available,
|
||||||
_('Ability to disconnect properly just before suspending the machine.'),
|
_('Ability to disconnect properly just before suspending the machine.'),
|
||||||
_('Requires upower and python-dbus.'),
|
_('Requires upower and python-dbus.'),
|
||||||
_('Feature not available under Windows.')),
|
_('Feature not available under Windows.')),
|
||||||
|
@ -260,3 +260,9 @@ class FeaturesWindow:
|
||||||
|
|
||||||
def gupnp_igd_available(self):
|
def gupnp_igd_available(self):
|
||||||
return gajim.HAVE_UPNP_IGD
|
return gajim.HAVE_UPNP_IGD
|
||||||
|
|
||||||
|
def upower_available(self):
|
||||||
|
if os.name == 'nt':
|
||||||
|
return False
|
||||||
|
import upower_listener
|
||||||
|
return upower_listener.supported
|
||||||
|
|
Loading…
Reference in New Issue