# HG changeset patch
# User Giampaolo Fadel <[email protected]>
# Date 1244796581 -7200
# Node ID a0b019be6a748d548ac7501156744f833ab23d4b
# Parent e0807c0fb33fecace1c738e1f3dcfd0292b57da6
cmenu: avoid to have two consecutive separators
diff --git a/win32/shellext/ContextMenu.cpp b/win32/shellext/ContextMenu.cpp
--- a/win32/shellext/ContextMenu.cpp
+++ b/win32/shellext/ContextMenu.cpp
@@ -342,15 +342,25 @@
if (hSubMenu)
{
UINT indexSubMenu = 0;
+ bool isSeparator = true ;
for( walk = entries ; *walk != EndOfList ; walk++ )
{
- if( *walk == Separator )
- InsertMenu(hSubMenu, indexSubMenu++, MF_SEPARATOR |
MF_BYPOSITION, 0, NULL);
+ if( *walk == Separator)
+ {
+ if (!isSeparator)
+ {
+ InsertMenu(hSubMenu, indexSubMenu++, MF_SEPARATOR |
MF_BYPOSITION, 0, NULL);
+ isSeparator = true ;
+ }
+ }
else
{
UINT idx = (UINT) *walk;
if( !promoted[idx] )
+ {
InsertMenuItemByName(hSubMenu, menuDescList[idx].name,
indexSubMenu++, idCmd++, idCmdFirst, "");
+ isSeparator = false ;
+ }
}
}
}
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop