1. TortoiseHg
  2. TortoiseHg
  3. thg

Commits

Elson Wei  committed 9460bdd

settings: add gpg setting tab when 'gpg' extension is enabled

  • Participants
  • Parent commits a99071b
  • Branches default

Comments (0)

Files changed (1)

File tortoisehg/hgqt/settings.py

View file
 from mercurial import ui, util, error, extensions, scmutil, phases
 
 from tortoisehg.util import hglib, paths, wconfig, i18n, editor
-from tortoisehg.util import terminal
+from tortoisehg.util import terminal, gpg
 from tortoisehg.hgqt.i18n import _
 from tortoisehg.hgqt import qtlib, qscilib, thgrepo, customtools
 
 def findTerminals():
     return terminal.findterminals(ui.ui())
 
+def findGpg():
+    return gpg.findgpg(ui.ui())
+
 def genCheckBox(opts):
     opts['nohist'] = True
     return SettingsCheckBox(**opts)
           'before updating the local projrc file.</ul><p>'
           'Default: never')),
     )),
+
+({'name': 'gnupg', 'label': _('GnuPG'), 'icon': 'gnupg',
+  'extension': 'gpg'}, (
+    _fi(_('Command'), 'gpg.cmd', (genEditableDeferredCombo, findGpg),
+        _('Specify the path to GPG. Default: None (leave blank)')),
+    _fi(_('Key ID'), 'gpg.key', genEditCombo,
+        _('GPG key ID associated with user. Default: None (leave blank)')),
+    )),
 )
 
 CONF_GLOBAL = 0