Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

cmenu: add the HG prefix to menu items when they are at top level

like TortoiseSVN

Changeset 5777e0448d56

Parent a1c3b96184ed

by Giampaolo Fadel

Changes to one file · Browse files at 5777e0448d56 Showing diff from parent a1c3b96184ed Diff from another changeset...

 
14
15
16
17
 
18
19
20
 
230
231
232
233
 
234
235
236
 
242
243
244
245
 
246
247
248
 
335
336
337
338
 
339
340
341
 
350
351
352
353
 
354
355
356
 
14
15
16
 
17
18
19
20
 
230
231
232
 
233
234
235
236
 
242
243
244
 
245
246
247
248
 
335
336
337
 
338
339
340
341
 
350
351
352
 
353
354
355
356
@@ -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, "");   }   }   }