Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYann Leboulanger <asterix@lagaule.org>2006-12-13 15:29:24 +0300
committerYann Leboulanger <asterix@lagaule.org>2006-12-13 15:29:24 +0300
commit0fb837f74f581329fbe331f0b2fa8a8e7dc267bf (patch)
treec928d6ac16bbcab016a02a28467056d73e5ac38c /src
parentfd13baefc48d392770ae66a80950f5b15349a823 (diff)
detect when gpg is not installed and print a warning. fixes #2760
Diffstat (limited to 'src')
-rw-r--r--src/common/GnuPG.py5
-rw-r--r--src/roster_window.py3
2 files changed, 8 insertions, 0 deletions
diff --git a/src/common/GnuPG.py b/src/common/GnuPG.py
index 02e4838aa..5ecb530b8 100644
--- a/src/common/GnuPG.py
+++ b/src/common/GnuPG.py
@@ -23,6 +23,7 @@
## GNU General Public License for more details.
##
+import os
from os import tmpfile
from common import helpers
@@ -37,6 +38,10 @@ except ImportError:
USE_GPG = False # user can't do OpenGPG only if he or she removed the file!
else:
+ status = os.system('gpg -h >/dev/null 2>&1')
+ if status != 0:
+ USE_GPG = False
+
class GnuPG(GnuPGInterface.GnuPG):
def __init__(self):
GnuPGInterface.GnuPG.__init__(self)
diff --git a/src/roster_window.py b/src/roster_window.py
index a92d3a4c7..96388f5d4 100644
--- a/src/roster_window.py
+++ b/src/roster_window.py
@@ -2687,6 +2687,9 @@ class RosterWindow:
save_gpg_pass = gajim.config.get_per('accounts', account,
'savegpgpass')
keyid = gajim.config.get_per('accounts', account, 'keyid')
+ if keyid and not gajim.config.get('usegpg'):
+ #TODO: make this string translatable
+ dialog = dialogs.WarningDialog('GPG is not usable', _('You will be connected to %s without OpenPGP.') % account)
if keyid and gajim.connections[account].connected < 2 and \
gajim.config.get('usegpg'):