Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

fogcreek settings: add a page to configure the kbfiles extension

Changeset 6407690d1bfc

Parent 0b7dc645d0d4

by David Golub

Changes to 2 files · Browse files at 6407690d1bfc Showing diff from parent 0b7dc645d0d4 Diff from another changeset...

Added image
 
7
8
9
10
 
11
12
13
 
24
25
26
 
 
 
 
 
 
27
28
29
 
678
679
680
 
 
 
 
 
 
 
 
 
 
681
682
683
 
856
857
858
 
 
859
860
861
 
7
8
9
 
10
11
12
13
 
24
25
26
27
28
29
30
31
32
33
34
35
 
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
 
872
873
874
875
876
877
878
879
@@ -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: