mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
Adopt to changed values for _keyEquivalentModifierMask.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25380 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0572190f62
commit
2e12f2a37e
3 changed files with 39 additions and 23 deletions
|
@ -1,3 +1,10 @@
|
|||
2007-08-07 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSButtonCell.m (-initWithCoder:),
|
||||
* Source/NSMenuItem.m (-initWithCoder:): Adopt to changed values
|
||||
for _keyEquivalentModifierMask. These have changed through the
|
||||
NSEvent.h change.
|
||||
|
||||
2007-08-03 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSView.m (-displayIfNeededInRectIgnoringOpacity:):
|
||||
|
|
|
@ -113,7 +113,7 @@ typedef struct _GSButtonCellFlags
|
|||
+ (void) initialize
|
||||
{
|
||||
if (self == [NSButtonCell class])
|
||||
[self setVersion: 2];
|
||||
[self setVersion: 3];
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1739,6 +1739,7 @@ typedef struct _GSButtonCellFlags
|
|||
else
|
||||
{
|
||||
BOOL tmp;
|
||||
int version = [aDecoder versionForClassName: @"NSButtonCell"];
|
||||
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_keyEquivalent];
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_keyEquivalentFont];
|
||||
|
@ -1748,13 +1749,17 @@ typedef struct _GSButtonCellFlags
|
|||
_buttoncell_is_transparent = tmp;
|
||||
[aDecoder decodeValueOfObjCType: @encode(unsigned int)
|
||||
at: &_keyEquivalentModifierMask];
|
||||
if (version <= 2)
|
||||
{
|
||||
_keyEquivalentModifierMask = _keyEquivalentModifierMask << 16;
|
||||
}
|
||||
[aDecoder decodeValueOfObjCType: @encode(unsigned int)
|
||||
at: &_highlightsByMask];
|
||||
[aDecoder decodeValueOfObjCType: @encode(unsigned int)
|
||||
at: &_showAltStateMask];
|
||||
|
||||
if ([aDecoder versionForClassName: @"NSButtonCell"] >= 2)
|
||||
{
|
||||
if (version >= 2)
|
||||
{
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_sound];
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_backgroundColor];
|
||||
[aDecoder decodeValueOfObjCType: @encode(float) at: &_delayInterval];
|
||||
|
@ -1767,7 +1772,7 @@ typedef struct _GSButtonCellFlags
|
|||
_image_dims_when_disabled = tmp;
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &tmp];
|
||||
_shows_border_only_while_mouse_inside = tmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ static Class imageClass;
|
|||
{
|
||||
if (self == [NSMenuItem class])
|
||||
{
|
||||
[self setVersion: 3];
|
||||
[self setVersion: 4];
|
||||
imageClass = [NSImage class];
|
||||
}
|
||||
}
|
||||
|
@ -552,19 +552,19 @@ static Class imageClass;
|
|||
|
||||
if ([aDecoder containsValueForKey: @"NSKeyEquivModMask"])
|
||||
{
|
||||
int keyMask = [aDecoder decodeIntForKey: @"NSKeyEquivModMask"];
|
||||
[self setKeyEquivalentModifierMask: keyMask];
|
||||
}
|
||||
int keyMask = [aDecoder decodeIntForKey: @"NSKeyEquivModMask"];
|
||||
[self setKeyEquivalentModifierMask: keyMask];
|
||||
}
|
||||
if ([aDecoder containsValueForKey: @"NSMnemonicLoc"])
|
||||
{
|
||||
int loc = [aDecoder decodeIntForKey: @"NSMnemonicLoc"];
|
||||
[self setMnemonicLocation: loc];
|
||||
}
|
||||
int loc = [aDecoder decodeIntForKey: @"NSMnemonicLoc"];
|
||||
[self setMnemonicLocation: loc];
|
||||
}
|
||||
if ([aDecoder containsValueForKey: @"NSState"])
|
||||
{
|
||||
int state = [aDecoder decodeIntForKey: @"NSState"];
|
||||
[self setState: state];
|
||||
}
|
||||
int state = [aDecoder decodeIntForKey: @"NSState"];
|
||||
[self setState: state];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -574,6 +574,10 @@ static Class imageClass;
|
|||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_title];
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_keyEquivalent];
|
||||
[aDecoder decodeValueOfObjCType: "I" at: &_keyEquivalentModifierMask];
|
||||
if (version <= 3)
|
||||
{
|
||||
_keyEquivalentModifierMask = _keyEquivalentModifierMask << 16;
|
||||
}
|
||||
[aDecoder decodeValueOfObjCType: "I" at: &_mnemonicLocation];
|
||||
[aDecoder decodeValueOfObjCType: "i" at: &_state];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_enabled];
|
||||
|
@ -584,22 +588,22 @@ static Class imageClass;
|
|||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_changesState];
|
||||
if (version == 1)
|
||||
{
|
||||
_target = [aDecoder decodeObject];
|
||||
}
|
||||
_target = [aDecoder decodeObject];
|
||||
}
|
||||
[aDecoder decodeValueOfObjCType: @encode(SEL) at: &_action];
|
||||
[aDecoder decodeValueOfObjCType: "i" at: &_tag];
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_representedObject];
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_submenu];
|
||||
if (version >= 2)
|
||||
{
|
||||
_target = [aDecoder decodeObject];
|
||||
}
|
||||
if (version == 3)
|
||||
_target = [aDecoder decodeObject];
|
||||
}
|
||||
if (version >= 3)
|
||||
{
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_isAlternate];
|
||||
[aDecoder decodeValueOfObjCType: @encode(char) at: &_indentation];
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_toolTip];
|
||||
}
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_isAlternate];
|
||||
[aDecoder decodeValueOfObjCType: @encode(char) at: &_indentation];
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_toolTip];
|
||||
}
|
||||
}
|
||||
|
||||
return self;
|
||||
|
|
Loading…
Reference in a new issue