# HG changeset patch
# User Henrik Stuart <h...@hstuart.dk>
# Date 1254122247 -7200
# Node ID 01679ce8ddf75c52d419d56f428d821c21414a7b
# Parent  4e072118e0599c8065a1728b971a9761d94901b9
history: support option to disable the syncbar from global config

diff -r 4e072118e059 -r 01679ce8ddf7 tortoisehg/hgtk/history.py
--- a/tortoisehg/hgtk/history.py        Sun Sep 27 19:47:49 2009 +0200
+++ b/tortoisehg/hgtk/history.py        Mon Sep 28 09:17:27 2009 +0200
@@ -118,9 +118,13 @@
                 bmenus.append((hglib.toutf(name), False, navigate, [name], 
None))
             
         fnc = self.toggle_view_column
-        return [(_('_View'), [
-            (_('Sync Bar'), True, self.toggle_show_syncbar, [],
-                self.show_syncbar),
+        if self.repo.ui.configbool('tortoisehg', 'disable-syncbar'):
+            sync_bar_item = []
+        else:
+            sync_bar_item = [(_('Sync Bar'), True, self.toggle_show_syncbar,
+                    [], self.show_syncbar)]
+
+        return [(_('_View'), sync_bar_item + [
             (_('Filter Bar'), True, self.toggle_show_filterbar, [],
                 self.show_filterbar),
             ('----', None, None, None, None),
@@ -424,6 +428,8 @@
         self.branch_color = settings.get('branch-color', False)
         self.show_filterbar = settings.get('show-filterbar', True)
         self.show_syncbar = settings.get('show-syncbar', True)
+        if self.repo.ui.configbool('tortoisehg', 'disable-syncbar'):
+            self.show_syncbar = False
         self.graphcol = settings.get('graphcol', True)
         self.compactgraph = settings.get('compactgraph', False)
         self.showcol = {}

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Tortoisehg-develop mailing list
Tortoisehg-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to