# HG changeset patch # User Giampaolo Fadel <gp.fa...@gmail.com> # Date 1244793009 -7200 # Node ID e0807c0fb33fecace1c738e1f3dcfd0292b57da6 # Parent 118563e3c69e8a75bb262c7a6986f11f9ee4a4a4 cmenu: add the HG prefix to menu items when they are at top level
like TortoiseSVN diff --git a/win32/shellext/ContextMenu.cpp b/win32/shellext/ContextMenu.cpp --- a/win32/shellext/ContextMenu.cpp +++ b/win32/shellext/ContextMenu.cpp @@ -14,7 +14,7 @@ } MenuDescription; MenuDescription menuDescList[] = { - {"commit", "HG Commit...", + {"commit", "Commit...", "Commit changes in repository", "menucommit.ico", 0}, {"init", "Create Repository Here", @@ -230,7 +230,7 @@ } void InsertMenuItemByName(HMENU hMenu, const std::string& name, UINT indexMenu, - UINT idCmd, UINT idCmdFirst) + UINT idCmd, UINT idCmdFirst, const std::string& prefix) { TDEBUG_TRACE("InsertMenuItemByName: name = " << name); MenuDescriptionMap::iterator iter = MenuDescMap.find(name); @@ -242,7 +242,7 @@ MenuDescription md = iter->second; AddMenuList(idCmd - idCmdFirst, name); - InsertMenuItemWithIcon(hMenu, indexMenu, idCmd, md.menuText, md.iconName); + InsertMenuItemWithIcon(hMenu, indexMenu, idCmd, prefix + md.menuText, md.iconName); } // IContextMenu @@ -335,7 +335,7 @@ { UINT idx = (UINT) *walk; if( promoted[idx] ) - InsertMenuItemByName(hMenu, menuDescList[idx].name, indexMenu++, idCmd++, idCmdFirst); + InsertMenuItemByName(hMenu, menuDescList[idx].name, indexMenu++, idCmd++, idCmdFirst, "HG "); } HMENU hSubMenu = CreatePopupMenu(); @@ -350,7 +350,7 @@ { UINT idx = (UINT) *walk; if( !promoted[idx] ) - InsertMenuItemByName(hSubMenu, menuDescList[idx].name, indexSubMenu++, idCmd++, idCmdFirst); + InsertMenuItemByName(hSubMenu, menuDescList[idx].name, indexSubMenu++, idCmd++, idCmdFirst, ""); } } } ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Tortoisehg-develop mailing list Tortoisehg-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop