Changeset 857ca9bc6f4d…
Parent 6c125b90f701…
by
Changes to 2 files · Browse files at 857ca9bc6f4d Showing diff from parent 6c125b90f701 Diff from another changeset...
@@ -82,12 +82,27 @@ tips.set_tip(check, tooltip)
check.connect('toggled', lambda x: apply.set_sensitive(True))
+ taskbarframe = gtk.Frame(_('Taskbar'))
+ taskbarframe.set_border_width(2)
+ settingsvbox.pack_start(taskbarframe, False, False, 2)
+ taskbarbox = gtk.VBox()
+ taskbarframe.add(taskbarbox)
+ hbox = gtk.HBox()
+ taskbarbox.pack_start(hbox, False, False, 2)
+ self.hgighlight_taskbaricon = gtk.CheckButton(_('Highlight Icon'))
+ hbox.pack_start(self.hgighlight_taskbaricon, False, False, 2)
+
tooltip = _('Enable/Disable the overlay icons globally')
tips.set_tip(self.ovenable, tooltip)
self.ovenable.connect('toggled', self.ovenable_toggled, apply)
tooltip = _('Only enable overlays on local disks')
tips.set_tip(self.lclonly, tooltip)
self.lclonly.connect('toggled', lambda x: apply.set_sensitive(True))
+
+ tooltip = _('Highlight the taskbar icon during activity')
+ tips.set_tip(self.hgighlight_taskbaricon, tooltip)
+ self.hgighlight_taskbaricon.connect('toggled', lambda x: apply.set_sensitive(True))
+
self.load_shell_configs()
frame = self.add_page(notebook, _('Event Log'))
@@ -153,6 +168,7 @@ overlayenable = True
localdisks = False
promoteditems = 'commit'
+ hgighlight_taskbaricon = True
try:
from _winreg import HKEY_CURRENT_USER, OpenKey, QueryValueEx
hkey = OpenKey(HKEY_CURRENT_USER, r'Software\TortoiseHg')
@@ -161,6 +177,8 @@ except EnvironmentError: pass
try: localdisks = QueryValueEx(hkey, 'LocalDisksOnly')[0] in t
except EnvironmentError: pass
+ try: hgighlight_taskbaricon = QueryValueEx(hkey, 'HighlightTaskbarIcon')[0] in t
+ except EnvironmentError: pass
try: promoteditems = QueryValueEx(hkey, 'PromotedItems')[0]
except EnvironmentError: pass
except (ImportError, WindowsError):
@@ -168,6 +186,7 @@
self.ovenable.set_active(overlayenable)
self.lclonly.set_active(localdisks)
+ self.hgighlight_taskbaricon.set_active(hgighlight_taskbaricon)
promoted = [pi.strip() for pi in promoteditems.split(',')]
for cmd, check in self.cmptoggles.iteritems():
check.set_active(cmd in promoted)
@@ -175,6 +194,7 @@ def applyclicked(self, button):
overlayenable = self.ovenable.get_active() and '1' or '0'
localdisks = self.lclonly.get_active() and '1' or '0'
+ hgighlight_taskbaricon = self.hgighlight_taskbaricon.get_active() and '1' or '0'
promoted = []
for cmd, check in self.cmptoggles.iteritems():
if check.get_active():
@@ -184,6 +204,7 @@ hkey = CreateKey(HKEY_CURRENT_USER, r"Software\TortoiseHg")
SetValueEx(hkey, 'EnableOverlays', 0, REG_SZ, overlayenable)
SetValueEx(hkey, 'LocalDisksOnly', 0, REG_SZ, localdisks)
+ SetValueEx(hkey, 'HighlightTaskbarIcon', 0, REG_SZ, hgighlight_taskbaricon)
SetValueEx(hkey, 'PromotedItems', 0, REG_SZ, ','.join(promoted))
except ImportError:
pass
|
@@ -249,13 +249,27 @@
requests = Queue.Queue(0)
+def get_config():
+ hgighlight_taskbaricon = True
+ try:
+ from _winreg import HKEY_CURRENT_USER, OpenKey, QueryValueEx
+ hkey = OpenKey(HKEY_CURRENT_USER, r'Software\TortoiseHg')
+ t = ('1', 'True')
+ try: hgighlight_taskbaricon = QueryValueEx(hkey, 'HighlightTaskbarIcon')[0] in t
+ except EnvironmentError: pass
+ except (ImportError, WindowsError):
+ pass
+ return hgighlight_taskbaricon
+
def update(args, hwnd):
batch = []
r = args[0]
print "got update request %s (first in batch)" % r
batch.append(r)
print "wait a bit for additional requests..."
- SetIcon(hwnd, "hgB.ico")
+ highlight = get_config()
+ if highlight:
+ SetIcon(hwnd, "hgB.ico")
time.sleep(0.2)
deferred_requests = []
try:
@@ -275,7 +289,8 @@ msg = "processing batch with %i update requests"
print msg % len(batch)
update_batch(batch)
- SetIcon(hwnd, "hg.ico")
+ if highlight:
+ SetIcon(hwnd, "hg.ico")
def remove(args):
path = args[0]
|
Loading...