Skip to content
Snippets Groups Projects
Commit 07fc1dfa authored by André's avatar André Committed by Philipp Hörist
Browse files

Feature: Fix keyring availability check

parent 8e6df65e
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,6 @@
import sys
from collections import namedtuple
import gi
from gi.repository import Gtk
from gi.repository import Gdk
......@@ -137,11 +136,10 @@ def _get_features(self):
self._some_keyring_available(),
_('Enables Gajim to store Passwords securely instead of '
'storing them in plaintext'),
_('Requires: libsecret and a provider (such as GNOME '
'Keyring and KSecretService)'),
_('Requires: gnome-keyring or kwallet'),
_('Windows Credential Vault is used for secure password '
'storage'),
None),
app.config.get('use_keyring')),
Feature(_('Spell Checker'),
app.is_installed('GSPELL'),
_('Enables Gajim to spell check your messages while '
......@@ -160,14 +158,9 @@ def _get_features(self):
@staticmethod
def _some_keyring_available():
if os.name == 'nt':
return True
try:
gi.require_version('Secret', '1')
from gi.repository import Secret # pylint: disable=unused-import
except (ValueError, ImportError):
return False
return True
import keyring
backends = keyring.backend.get_all_keyring()
return any(keyring.core.recommended(backend) for backend in backends)
@staticmethod
def _idle_available():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment