Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.4rc1, 0.4rc2, and 0.4rc3

cmenu: add menu to update shell extension settings

primarily for picking up the overlay icons display settings, but maybe
used in the future for other extensions too.

[based on suggestion by Adrian Buehlmann]

Changeset 23351825f299

Parent 39ad09ae910c

by TK Soh

Changes to one file · Browse files at 23351825f299 Showing diff from parent 39ad09ae910c Diff from another changeset...

 
18
19
20
 
21
22
23
 
47
48
49
 
 
 
50
51
52
 
387
388
389
 
 
 
 
390
391
392
 
422
423
424
 
 
 
 
 
 
 
 
 
 
 
425
426
427
 
18
19
20
21
22
23
24
 
48
49
50
51
52
53
54
55
56
 
391
392
393
394
395
396
397
398
399
400
 
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
@@ -18,6 +18,7 @@
 from mercurial import hg  from mercurial import repo as _repo  from thgutil import * +import iconoverlay    # FIXME: quick workaround traceback caused by missing "closed"  # attribute in win32trace. @@ -47,6 +48,9 @@
    def add_menu(self, menutext, helptext, handler, icon=None, state=True):   self.menus.append(TortoiseMenu(menutext, helptext, handler, icon, state)) + + def add_sep(self): + self.menus.append(TortoiseMenuSep())     def get_menus(self):   return self.menus @@ -387,6 +391,10 @@
  optmenu.add_menu(_("Repository"),   _("Configure settings local to this repository"),   self._config_repo) + optmenu.add_sep() + optmenu.add_menu(_("Update Shell Settings"), + _("Update TortoiseHg shell extension settings"), + self._config_update_shell)   result.append(optmenu)     return result @@ -422,6 +430,17 @@
  def _config_repo(self, parent_window):   self._run_dialog('config')   + def _config_update_shell(self, parent_window): + # update overlay icons display setting + iconoverlay.get_show_icons() + show_overlay = iconoverlay.show_overlay_icons and 'enabled' or 'disabled' + + # feedback + title = "TortoiseHg Shell Settings" + msg = "Shell settings updated:\n\n" + msg += "Overlay icons is " + show_overlay + win32ui.MessageBox(msg, title, win32con.MB_OK|win32con.MB_ICONINFORMATION) +   def _vdiff(self, parent_window):   '''[tortoisehg] vdiff = <any extdiff command>'''   diff = ui.ui().config('tortoisehg', 'vdiff', None)