Changeset 6407690d1bfc…
Parent 0b7dc645d0d4…
by
Changes to 2 files · Browse files at 6407690d1bfc Showing diff from parent 0b7dc645d0d4 Diff from another changeset...
|
@@ -7,7 +7,7 @@
import os
-from mercurial import ui, util, error
+from mercurial import ui, util, error, extensions
from tortoisehg.util import hglib, settings, paths, wconfig, i18n, bugtraq
from tortoisehg.hgqt.i18n import _
@@ -24,6 +24,12 @@_unspecstr = _('<unspecified>')
ENTRY_WIDTH = 300
+def hasExtension(extname):
+ for name, module in extensions.extensions():
+ if name == extname:
+ return True
+ return False
+
class SettingsCombo(QComboBox):
def __init__(self, parent=None, **opts):
QComboBox.__init__(self, parent, toolTip=opts['tooltip'])
@@ -678,6 +684,16 @@ _fi(_('Target People'), 'reviewboard.target_people', genEditCombo,
_('A comma separated list of target people')),
)),
+
+({'name': 'kbfiles', 'label': _('Kiln Bfiles'), 'icon': 'kiln', 'extension': 'kbfiles'}, (
+ _fi(_('Patterns'), 'kilnbfiles.patterns', genEditCombo,
+ _('Files with names meeting the specified patterns will be automatically '
+ 'added as bfiles')),
+ _fi(_('Size'), 'kilnbfiles.size', genEditCombo,
+ _('Files of at least the specified size (in megabytes) will be added as bfiles')),
+ _fi(_('System Cache'), 'kilnbfiles.systemcache', genEditCombo,
+ _('Path to the directory where a system-wide cache of bfiles will be stored')),
+ )),
)
@@ -856,6 +872,8 @@
# add page items to treeview
for meta, info in INFO:
+ if 'extension' in meta and not hasExtension(meta['extension']):
+ continue
if isinstance(meta['icon'], str):
icon = qtlib.geticon(meta['icon'])
else:
|
Loading...