Commits

Steve Borho committed c151ebe Merge

Merge with default

I did not intend for this change to start a new default branch.

  • Participants
  • Parent commits 268ed20, fc3d097
  • Branches stable

Comments (0)

Files changed (2)

File tortoisehg/hgtk/history.py

 class FilterBar(gtklib.SlimToolbar):
     'Filter Toolbar for repository log'
 
-    def __init__(self, tooltips, filter_mode, branch_names):
+    def __init__(self, tooltips, filter_mode, branch_names, repo):
         gtklib.SlimToolbar.__init__(self, tooltips)
         self.filter_mode = filter_mode
         self.buttons = {}
         self.buttons['custom'] = self.custombutton
 
         self.filtercombo = gtk.combo_box_new_text()
-        self.filtercombo_entries = (_('Rev Range'), _('File Patterns'),
-                  _('Keywords'), _('Date'), _('User'))
+        self.filtercombo_entries = [_('Rev Range'), _('File Patterns'),
+                  _('Keywords'), _('Date'), _('User')]
+        try:
+            enclist = repo.ui.configlist('tortoisehg', 'fsencodings')
+            if enclist:
+                l = [_('File Patterns') + ' (%s)' % enc for enc in enclist]
+                self.filtercombo_entries = self.filtercombo_entries[0] + l + \
+                        self.filtercombo_entries[2:]
+        except (error.ConfigError, error.Abort):
+            pass
         for f in self.filtercombo_entries:
             self.filtercombo.append_text(f)
         if (self.filter_mode >= len(self.filtercombo_entries) or
         # filter bar
         self.filterbar = FilterBar(self.tooltips,
                                    self.filter_mode, 
-                                   hglib.getlivebranch(self.repo))
+                                   hglib.getlivebranch(self.repo),
+                                   self.repo)
         filterbar = self.filterbar
         self.lastbranchrow = None
         self.lastfilterinfo = None

File tortoisehg/hgtk/thgconfig.py

         ['small', 'large', 'theme'],
         _('Adjust the display of the main toolbar in the Repository'
         ' Explorer.  Values: small, large, or theme.  Default: theme')),
+    (_('F/S Encodings'), 'tortoisehg.fsencodings', [],
+        _('Comma separated list of encodings used for filenames'
+          ' on this computer. Default: none')),
     )),
 
 ({'name': 'sync', 'label': _('Synchronize'), 'icon': 'menusynch.ico',