mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-24 06:28:54 +00:00
Small correction on last change.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20079 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a15214f38d
commit
91cf238321
2 changed files with 21 additions and 16 deletions
|
@ -1,3 +1,8 @@
|
|||
2004-09-17 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSTextFieldCell.m (-initWithCoder:): Moved special
|
||||
handling of action mask into non-keyed decoder branch.
|
||||
|
||||
2004-09-16 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSCell.m (-setStringValue:, -setFont:, -setImage:): Use
|
||||
|
|
|
@ -202,22 +202,6 @@ static NSColor *txtCol;
|
|||
{
|
||||
self = [super initWithCoder: aDecoder];
|
||||
|
||||
if ([aDecoder versionForClassName:@"NSTextFieldCell"] < 2)
|
||||
{
|
||||
/* Replace the old default _action_mask with the new default one
|
||||
if it's set. There isn't really a way to modify this value
|
||||
on an NSTextFieldCell encoded in a .gorm file. The old default value
|
||||
causes problems with newer NSTableViews which uses this to discern
|
||||
whether it should trackMouse:inRect:ofView:untilMouseUp: or not.
|
||||
This also disables the action from being sent on an uneditable and
|
||||
unselectable text fields.
|
||||
*/
|
||||
if (_action_mask == NSLeftMouseUpMask)
|
||||
{
|
||||
_action_mask = NSKeyUpMask | NSKeyDownMask;
|
||||
}
|
||||
}
|
||||
|
||||
if ([aDecoder allowsKeyedCoding])
|
||||
{
|
||||
[self setBackgroundColor: [aDecoder decodeObjectForKey: @"NSBackgroundColor"]];
|
||||
|
@ -232,6 +216,22 @@ static NSColor *txtCol;
|
|||
{
|
||||
BOOL tmp;
|
||||
|
||||
if ([aDecoder versionForClassName:@"NSTextFieldCell"] < 2)
|
||||
{
|
||||
/* Replace the old default _action_mask with the new default one
|
||||
if it's set. There isn't really a way to modify this value
|
||||
on an NSTextFieldCell encoded in a .gorm file. The old default value
|
||||
causes problems with newer NSTableViews which uses this to discern
|
||||
whether it should trackMouse:inRect:ofView:untilMouseUp: or not.
|
||||
This also disables the action from being sent on an uneditable and
|
||||
unselectable text fields.
|
||||
*/
|
||||
if (_action_mask == NSLeftMouseUpMask)
|
||||
{
|
||||
_action_mask = NSKeyUpMask | NSKeyDownMask;
|
||||
}
|
||||
}
|
||||
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_background_color];
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_text_color];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &tmp];
|
||||
|
|
Loading…
Reference in a new issue