Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9, 0.9.1, and 0.9.1.1

shellext: InitMenuMaps: ignore template entry from menuDescList

This change is not fixing a specific bug (at least not as far as I
can see). It also doesn't fix the problem I found when building
the shell extension with mingw (Issue 624).

It just makes not much sense to go ask for the translation
of a menu entry having the empty string as its name.

There will be no key in the registry having the empty
string as its last component, so the registry lookup will
fail anyway (as it will ask for the UI text and help text
at the parent node of the translation keys in the registry).

Also essentially doing

MenuDescMap[''] = ...

later on in that function (as before this change), doesn't
make much sense IMHO.

I see no code part that is expecting an entry under the empty
string in MenuDescMap anyway. And if it would, it would most
likely be a bug anyway.

Changeset 0ba27e6f85a6

Parent d06b36b981f8

by Adrian Buehlmann

Changes to one file · Browse files at 0ba27e6f85a6 Showing diff from parent d06b36b981f8 Diff from another changeset...

 
198
199
200
 
 
 
 
201
202
203
 
198
199
200
201
202
203
204
205
206
207
@@ -198,6 +198,10 @@
  for (std::size_t i = 0; i < sz; i++)   {   MenuDescription md = menuDescList[i]; + + if (md.name.size() == 0) + break; +   TDEBUG_TRACE("InitMenuMaps: adding " << md.name);     // Look for translation of menu and help text