Permalink
Browse files

L16 - Menu bug-fix

Fixed: Deleting a menu item partially deleted its associated sub-menu.
  • Loading branch information...
1 parent af70cfa commit 6db3f66d664375de591c5d6dff1a1362bd6d5915 @Lexikos committed Feb 4, 2009
Showing with 8 additions and 5 deletions.
  1. +0 −3 AutoHotkey_L.txt
  2. +3 −0 How to compile.txt
  3. +4 −1 source/defines.h
  4. BIN source/resources/AutoHotkey.aps
  5. +1 −1 source/script_menu.cpp
View
@@ -1,3 +0,0 @@
-AutoHotkey v1.0.47.06 custom build by Lexikos.
-
-The included project file is for Visual C++ Express Edition 2008.
View
@@ -4,3 +4,6 @@ However, it is also known to compile on:
Microsoft Visual C++ 2005 (8.x): Requires a few modifications to project settings.
Microsoft Visual C++ 2005 Express (a free compiler): For detailed instructions,
see http://www.autohotkey.com/forum/topic19154.html
+
+
+NOTE: AutoHotkey_L is developed and compiled on Microsoft Visual C++ 2008 Express Edition.
View
@@ -33,7 +33,10 @@ GNU General Public License for more details.
#endif
#define NAME_P "AutoHotkey"
-#define NAME_VERSION "1.0.47.07.L14" // Lexikos: Added .Ln for AutoHotkey_L revision n.
+#ifndef NAME_L_REVISION
+#define NAME_L_REVISION ".L16" // Lexikos: Added .Ln for AutoHotkey_L revision n.
+#endif
+#define NAME_VERSION "1.0.47.07" NAME_L_REVISION
#define NAME_PV NAME_P " v" NAME_VERSION
// Window class names: Changing these may result in new versions not being able to detect any old instances
Binary file not shown.
View
@@ -618,7 +618,7 @@ ResultType UserMenu::DeleteItem(UserMenuItem *aMenuItem, UserMenuItem *aMenuItem
mFirstMenuItem = aMenuItem->mNextMenuItem; // Can be NULL if the list will now be empty.
CHANGE_DEFAULT_IF_NEEDED // Should do this before freeing aMenuItem's memory.
if (mMenu) // Delete the item from the menu.
- DeleteMenu(mMenu, aMenuItem_ID, aMenuItem_MF_BY);
+ RemoveMenu(mMenu, aMenuItem_ID, aMenuItem_MF_BY); // Lexikos: DeleteMenu destroys any sub-menu handle associated with the item, so use RemoveMenu.
if (aMenuItem->mName != Var::sEmptyString)
delete aMenuItem->mName; // Since it was separately allocated.
delete aMenuItem; // Do this last when its contents are no longer needed.

0 comments on commit 6db3f66

Please sign in to comment.