Philipp Hörist pushed to branch master at gajim / gajim
Commits:
07fc1dfa by André at 2020-05-30T11:49:07+02:00
Feature: Fix keyring availability check
- - - - -
1 changed file:
- gajim/gtk/features.py
Changes:
=====================================
gajim/gtk/features.py
=====================================
@@ -23,7 +23,6 @@ import os
import sys
from collections import namedtuple
-import gi
from gi.repository import Gtk
from gi.repository import Gdk
@@ -137,11 +136,10 @@ class Features(Gtk.ApplicationWindow):
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 @@ class Features(Gtk.ApplicationWindow):
@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():
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/07fc1dfa0d7c60baba91b9fda691a12f903e5526
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/07fc1dfa0d7c60baba91b9fda691a12f903e5526
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits