Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.0.3, 2.0.4, and 2.0.5

stable cmenu: kill pointless CShellExtCMenu::GetMenuDescriptionMap()

Changeset 6e193bd7753d

Parent b0214bb1e7fa

by Adrian Buehlmann

Changes to 2 files · Browse files at 6e193bd7753d Showing diff from parent b0214bb1e7fa Diff from another changeset...

 
165
166
167
168
169
170
171
172
173
174
175
176
 
177
178
179
 
194
195
196
197
 
198
199
200
 
305
306
307
308
309
310
311
312
 
 
313
314
315
 
317
318
319
320
 
321
322
323
 
165
166
167
 
 
 
 
 
168
169
 
 
170
171
172
173
 
188
189
190
 
191
192
193
194
 
299
300
301
 
 
 
 
 
302
303
304
305
306
 
308
309
310
 
311
312
313
314
@@ -165,15 +165,9 @@
  RegCloseKey(hkey);  }   -MenuDescriptionMap& CShellExtCMenu::GetMenuDescriptionMap() -{ - return CMenuMenuDescMap; -} -  void CShellExtCMenu::InitMenuMaps(MenuDescription *menuDescs, std::size_t sz)  { - MenuDescriptionMap& menuDescMap = GetMenuDescriptionMap(); - if (menuDescMap.empty()) + if (CMenuMenuDescMap.empty())   {   std::string lang;   GetRegistryConfig("CMenuLang", lang); @@ -194,7 +188,7 @@
  if (!lang.empty())   GetCMenuTranslation(lang, md.name, md.menuText, md.helpText);   - menuDescMap[md.name] = md; + CMenuMenuDescMap[md.name] = md;   }     } @@ -305,11 +299,8 @@
  HMENU hMenu, const std::string& name, UINT indexMenu,   UINT idCmd, UINT idCmdFirst, const std::wstring& prefix)  { - - MenuDescriptionMap& menuDescMap = GetMenuDescriptionMap(); - - MenuDescriptionMap::iterator iter = menuDescMap.find(name); - if (iter == menuDescMap.end()) + MenuDescriptionMap::iterator iter = CMenuMenuDescMap.find(name); + if (iter == CMenuMenuDescMap.end())   {   TDEBUG_TRACE("***** InsertMenuItemByName: can't find menu info for " << name);   return; @@ -317,7 +308,7 @@
      MenuDescription md = iter->second; - AddMenuList(idCmd - idCmdFirst, name, menuDescMap); + AddMenuList(idCmd - idCmdFirst, name, CMenuMenuDescMap);   InsertMenuItemWithIcon1(   hMenu, indexMenu, idCmd, prefix + md.menuText, md.iconName);  }
 
30
31
32
33
34
35
36
 
30
31
32
 
33
34
35
@@ -30,7 +30,6 @@
  MenuIdCmdMap MenuIdMap;     virtual void RunDialog(const std::string&); - virtual MenuDescriptionMap& GetMenuDescriptionMap();     void TweakMenuForVista(HMENU menu);   void PrintDebugHeader(LPCITEMIDLIST pIDFolder, LPDATAOBJECT pDataObj);