mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 16:10:55 +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
c463685ee7
commit
37a8fe73ae
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>
|
2007-08-03 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/NSView.m (-displayIfNeededInRectIgnoringOpacity:):
|
* Source/NSView.m (-displayIfNeededInRectIgnoringOpacity:):
|
||||||
|
|
|
@ -113,7 +113,7 @@ typedef struct _GSButtonCellFlags
|
||||||
+ (void) initialize
|
+ (void) initialize
|
||||||
{
|
{
|
||||||
if (self == [NSButtonCell class])
|
if (self == [NSButtonCell class])
|
||||||
[self setVersion: 2];
|
[self setVersion: 3];
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1739,6 +1739,7 @@ typedef struct _GSButtonCellFlags
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BOOL tmp;
|
BOOL tmp;
|
||||||
|
int version = [aDecoder versionForClassName: @"NSButtonCell"];
|
||||||
|
|
||||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_keyEquivalent];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &_keyEquivalent];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_keyEquivalentFont];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &_keyEquivalentFont];
|
||||||
|
@ -1748,13 +1749,17 @@ typedef struct _GSButtonCellFlags
|
||||||
_buttoncell_is_transparent = tmp;
|
_buttoncell_is_transparent = tmp;
|
||||||
[aDecoder decodeValueOfObjCType: @encode(unsigned int)
|
[aDecoder decodeValueOfObjCType: @encode(unsigned int)
|
||||||
at: &_keyEquivalentModifierMask];
|
at: &_keyEquivalentModifierMask];
|
||||||
|
if (version <= 2)
|
||||||
|
{
|
||||||
|
_keyEquivalentModifierMask = _keyEquivalentModifierMask << 16;
|
||||||
|
}
|
||||||
[aDecoder decodeValueOfObjCType: @encode(unsigned int)
|
[aDecoder decodeValueOfObjCType: @encode(unsigned int)
|
||||||
at: &_highlightsByMask];
|
at: &_highlightsByMask];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(unsigned int)
|
[aDecoder decodeValueOfObjCType: @encode(unsigned int)
|
||||||
at: &_showAltStateMask];
|
at: &_showAltStateMask];
|
||||||
|
|
||||||
if ([aDecoder versionForClassName: @"NSButtonCell"] >= 2)
|
if (version >= 2)
|
||||||
{
|
{
|
||||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_sound];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &_sound];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_backgroundColor];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &_backgroundColor];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(float) at: &_delayInterval];
|
[aDecoder decodeValueOfObjCType: @encode(float) at: &_delayInterval];
|
||||||
|
@ -1767,7 +1772,7 @@ typedef struct _GSButtonCellFlags
|
||||||
_image_dims_when_disabled = tmp;
|
_image_dims_when_disabled = tmp;
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &tmp];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &tmp];
|
||||||
_shows_border_only_while_mouse_inside = tmp;
|
_shows_border_only_while_mouse_inside = tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,7 +73,7 @@ static Class imageClass;
|
||||||
{
|
{
|
||||||
if (self == [NSMenuItem class])
|
if (self == [NSMenuItem class])
|
||||||
{
|
{
|
||||||
[self setVersion: 3];
|
[self setVersion: 4];
|
||||||
imageClass = [NSImage class];
|
imageClass = [NSImage class];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -552,19 +552,19 @@ static Class imageClass;
|
||||||
|
|
||||||
if ([aDecoder containsValueForKey: @"NSKeyEquivModMask"])
|
if ([aDecoder containsValueForKey: @"NSKeyEquivModMask"])
|
||||||
{
|
{
|
||||||
int keyMask = [aDecoder decodeIntForKey: @"NSKeyEquivModMask"];
|
int keyMask = [aDecoder decodeIntForKey: @"NSKeyEquivModMask"];
|
||||||
[self setKeyEquivalentModifierMask: keyMask];
|
[self setKeyEquivalentModifierMask: keyMask];
|
||||||
}
|
}
|
||||||
if ([aDecoder containsValueForKey: @"NSMnemonicLoc"])
|
if ([aDecoder containsValueForKey: @"NSMnemonicLoc"])
|
||||||
{
|
{
|
||||||
int loc = [aDecoder decodeIntForKey: @"NSMnemonicLoc"];
|
int loc = [aDecoder decodeIntForKey: @"NSMnemonicLoc"];
|
||||||
[self setMnemonicLocation: loc];
|
[self setMnemonicLocation: loc];
|
||||||
}
|
}
|
||||||
if ([aDecoder containsValueForKey: @"NSState"])
|
if ([aDecoder containsValueForKey: @"NSState"])
|
||||||
{
|
{
|
||||||
int state = [aDecoder decodeIntForKey: @"NSState"];
|
int state = [aDecoder decodeIntForKey: @"NSState"];
|
||||||
[self setState: state];
|
[self setState: state];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -574,6 +574,10 @@ static Class imageClass;
|
||||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_title];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &_title];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_keyEquivalent];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &_keyEquivalent];
|
||||||
[aDecoder decodeValueOfObjCType: "I" at: &_keyEquivalentModifierMask];
|
[aDecoder decodeValueOfObjCType: "I" at: &_keyEquivalentModifierMask];
|
||||||
|
if (version <= 3)
|
||||||
|
{
|
||||||
|
_keyEquivalentModifierMask = _keyEquivalentModifierMask << 16;
|
||||||
|
}
|
||||||
[aDecoder decodeValueOfObjCType: "I" at: &_mnemonicLocation];
|
[aDecoder decodeValueOfObjCType: "I" at: &_mnemonicLocation];
|
||||||
[aDecoder decodeValueOfObjCType: "i" at: &_state];
|
[aDecoder decodeValueOfObjCType: "i" at: &_state];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_enabled];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_enabled];
|
||||||
|
@ -584,22 +588,22 @@ static Class imageClass;
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_changesState];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_changesState];
|
||||||
if (version == 1)
|
if (version == 1)
|
||||||
{
|
{
|
||||||
_target = [aDecoder decodeObject];
|
_target = [aDecoder decodeObject];
|
||||||
}
|
}
|
||||||
[aDecoder decodeValueOfObjCType: @encode(SEL) at: &_action];
|
[aDecoder decodeValueOfObjCType: @encode(SEL) at: &_action];
|
||||||
[aDecoder decodeValueOfObjCType: "i" at: &_tag];
|
[aDecoder decodeValueOfObjCType: "i" at: &_tag];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_representedObject];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &_representedObject];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_submenu];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &_submenu];
|
||||||
if (version >= 2)
|
if (version >= 2)
|
||||||
{
|
{
|
||||||
_target = [aDecoder decodeObject];
|
_target = [aDecoder decodeObject];
|
||||||
}
|
}
|
||||||
if (version == 3)
|
if (version >= 3)
|
||||||
{
|
{
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_isAlternate];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_isAlternate];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(char) at: &_indentation];
|
[aDecoder decodeValueOfObjCType: @encode(char) at: &_indentation];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_toolTip];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &_toolTip];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
|
|
Loading…
Reference in a new issue