Changeset 23351825f299…
Parent 39ad09ae910c…
by
Changes to one file · Browse files at 23351825f299 Showing diff from parent 39ad09ae910c Diff from another changeset...
@@ -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)
|
Loading...