mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 06:51:44 +00:00
Revert last change and add temporary fix for crash.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33236 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f9488e2af4
commit
28a429af26
3 changed files with 10 additions and 10 deletions
|
@ -1,9 +1,15 @@
|
|||
2011-06-03 00:55-EDT Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Source/GSThemeMenu.m: Revert last change, since it will,
|
||||
per discussion with Fred, cause issues.
|
||||
* Source/NSMenuItem.m: Temporary fix for crash.
|
||||
|
||||
2011-06-02 16:17-EDT Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Source/GSThemeMenu.m: Use NSArchiver to copy menu instead of
|
||||
copy. Add comment to explain why this is done. The
|
||||
copy method causes all of the NSMenu instances to share
|
||||
NSMenuItems. This appears to be causing a crash when the
|
||||
NSMenuItems. This appears to be causing a crash when the
|
||||
menu updates.
|
||||
|
||||
2011-06-02 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
|
|
@ -62,17 +62,10 @@
|
|||
GSWindowDecorationView *wv = [window windowView];
|
||||
if ([window menu] == nil && menu != nil)
|
||||
{
|
||||
NSData *data = [NSArchiver archivedDataWithRootObject: menu]; //
|
||||
NSMenu *newMenu = [NSUnarchiver unarchiveObjectWithData: data]; // [menu copy];
|
||||
// NSData *data = [NSArchiver archivedDataWithRootObject: menu]; //
|
||||
NSMenu *newMenu = [menu copy];
|
||||
NSMenuView *menuView = nil;
|
||||
|
||||
/*
|
||||
* NOTE: The reason the copy or copyWithZone method is not used here is because
|
||||
* it doesn't make a deep copy of the menu. A deep copy is needed in order to
|
||||
* allow the individual menu items to be used in multiple menus at one time without
|
||||
* interfering with one another's state.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Set the new menu
|
||||
*/
|
||||
|
|
|
@ -562,6 +562,7 @@ static Class imageClass;
|
|||
copy->_representedObject = RETAIN(_representedObject);
|
||||
copy->_submenu = [_submenu copy];
|
||||
copy->_toolTip = RETAIN(_toolTip);
|
||||
copy->_target = RETAIN(_target);
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue