mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 02:20:58 +00:00
Backports from trunk
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_stable_20070311@25792 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3352a25907
commit
65fa5805e2
7 changed files with 891 additions and 786 deletions
37
ChangeLog
37
ChangeLog
|
@ -1,3 +1,40 @@
|
||||||
|
2007-11-05 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* Source/NSFont.m (-initWithName:matrix:fix:screenFont:role:): Add
|
||||||
|
fallback for missing standard fonts.
|
||||||
|
* Backport from trunk.
|
||||||
|
|
||||||
|
2007-11-03 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* Source/NSControl.m,
|
||||||
|
* Source/NSMenuItem.m (-initWithCoder:, -encodeWithCoder:): Better
|
||||||
|
support for keyed encoding (Tag, separator,...).
|
||||||
|
* Backport from trunk.
|
||||||
|
|
||||||
|
2007-11-01 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* Source/NSBrowser.m (+initialize): Create titleCell here to have
|
||||||
|
it available for browsers loaded from Gorm files.
|
||||||
|
* Source/NSBrowser.m (GSBrowserTitleCell): Add method
|
||||||
|
drawingRectForBounds: and correct drawWithFrame:inView:.
|
||||||
|
* Source/NSBrowser.m (-displayAllColumns, -displayColumn:): Mark
|
||||||
|
for redraw.
|
||||||
|
* Backport from trunk.
|
||||||
|
|
||||||
|
2007-11-01 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* Source/NSTableView.m (-draggingUpdated:): Use
|
||||||
|
currentDropOperation instead of NSTableViewDropAbove.
|
||||||
|
* Source/NSDocument.m (-windowForSheet): Return nil instead of
|
||||||
|
mainWindow, when there is no associated window.
|
||||||
|
Patches by Wolfgang Lux <wolfgang.lux@gmail.com>.
|
||||||
|
* Backport from trunk.
|
||||||
|
|
||||||
|
2007-10-30 Adam Fedor <fedor@gnu.org>
|
||||||
|
|
||||||
|
* gnustep-gui.spec.in: Change Copyright to License.
|
||||||
|
* Backport from trunk.
|
||||||
|
|
||||||
2007-10-29 Fred Kiefer <FredKiefer@gmx.de>
|
2007-10-29 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* COPYING: Add GPL file.
|
* COPYING: Add GPL file.
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -911,6 +911,10 @@ static NSNotificationCenter *nc;
|
||||||
{
|
{
|
||||||
[aCoder encodeObject: [self cell] forKey: @"NSCell"];
|
[aCoder encodeObject: [self cell] forKey: @"NSCell"];
|
||||||
[aCoder encodeBool: [self isEnabled] forKey: @"NSEnabled"];
|
[aCoder encodeBool: [self isEnabled] forKey: @"NSEnabled"];
|
||||||
|
if (_tag)
|
||||||
|
{
|
||||||
|
[aCoder encodeInt: [self tag] forKey: @"NSTag"];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -930,12 +934,17 @@ static NSNotificationCenter *nc;
|
||||||
|
|
||||||
if (cell != nil)
|
if (cell != nil)
|
||||||
{
|
{
|
||||||
[self setCell: cell];
|
[self setCell: cell];
|
||||||
}
|
}
|
||||||
if ([aDecoder containsValueForKey: @"NSEnabled"])
|
if ([aDecoder containsValueForKey: @"NSEnabled"])
|
||||||
{
|
{
|
||||||
[self setEnabled: [aDecoder decodeBoolForKey: @"NSEnabled"]];
|
[self setEnabled: [aDecoder decodeBoolForKey: @"NSEnabled"]];
|
||||||
}
|
}
|
||||||
|
if ([aDecoder containsValueForKey: @"NSTag"])
|
||||||
|
{
|
||||||
|
int tag = [aDecoder decodeIntForKey: @"NSTag"];
|
||||||
|
[self setTag: tag];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -352,7 +352,7 @@ withContentsOfURL: (NSURL *)url
|
||||||
return win;
|
return win;
|
||||||
}
|
}
|
||||||
|
|
||||||
return [NSApp mainWindow];
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
699
Source/NSFont.m
699
Source/NSFont.m
File diff suppressed because it is too large
Load diff
|
@ -483,6 +483,10 @@ static Class imageClass;
|
||||||
{
|
{
|
||||||
if ([aCoder allowsKeyedCoding])
|
if ([aCoder allowsKeyedCoding])
|
||||||
{
|
{
|
||||||
|
if ([self isSeparatorItem])
|
||||||
|
{
|
||||||
|
[aCoder encodeBool: YES forKey: @"NSIsSeparator"];
|
||||||
|
}
|
||||||
[aCoder encodeObject: _title forKey: @"NSTitle"];
|
[aCoder encodeObject: _title forKey: @"NSTitle"];
|
||||||
[aCoder encodeObject: NSStringFromSelector(_action) forKey: @"NSAction"];
|
[aCoder encodeObject: NSStringFromSelector(_action) forKey: @"NSAction"];
|
||||||
[aCoder encodeObject: _keyEquivalent forKey: @"NSKeyEquiv"];
|
[aCoder encodeObject: _keyEquivalent forKey: @"NSKeyEquiv"];
|
||||||
|
@ -495,6 +499,11 @@ static Class imageClass;
|
||||||
[aCoder encodeInt: _keyEquivalentModifierMask forKey: @"NSKeyEquivModMask"];
|
[aCoder encodeInt: _keyEquivalentModifierMask forKey: @"NSKeyEquivModMask"];
|
||||||
[aCoder encodeInt: _mnemonicLocation forKey: @"NSMnemonicLoc"];
|
[aCoder encodeInt: _mnemonicLocation forKey: @"NSMnemonicLoc"];
|
||||||
[aCoder encodeInt: _state forKey: @"NSState"];
|
[aCoder encodeInt: _state forKey: @"NSState"];
|
||||||
|
[aCoder encodeBool: ![self isEnabled] forKey: @"NSIsDisabled"];
|
||||||
|
if (_tag)
|
||||||
|
{
|
||||||
|
[aCoder encodeInt: _tag forKey: @"NSTag"];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -529,28 +538,48 @@ static Class imageClass;
|
||||||
NSString *title;
|
NSString *title;
|
||||||
NSString *action;
|
NSString *action;
|
||||||
NSString *key;
|
NSString *key;
|
||||||
NSImage *mixedImage;
|
BOOL isSeparator = NO;
|
||||||
NSImage *onImage;
|
|
||||||
id target;
|
if ([aDecoder containsValueForKey: @"NSIsSeparator"])
|
||||||
NSMenu *submenu;
|
{
|
||||||
|
isSeparator = [aDecoder decodeBoolForKey: @"NSIsSeparator"];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isSeparator)
|
||||||
|
{
|
||||||
|
RELEASE(self);
|
||||||
|
return [NSMenuItem separatorItem];
|
||||||
|
}
|
||||||
|
|
||||||
title = [aDecoder decodeObjectForKey: @"NSTitle"];
|
title = [aDecoder decodeObjectForKey: @"NSTitle"];
|
||||||
action = [aDecoder decodeObjectForKey: @"NSAction"];
|
action = [aDecoder decodeObjectForKey: @"NSAction"];
|
||||||
key = [aDecoder decodeObjectForKey: @"NSKeyEquiv"];
|
key = [aDecoder decodeObjectForKey: @"NSKeyEquiv"];
|
||||||
mixedImage = [aDecoder decodeObjectForKey: @"NSMixedImage"];
|
|
||||||
onImage = [aDecoder decodeObjectForKey: @"NSOnImage"];
|
|
||||||
target = [aDecoder decodeObjectForKey: @"NSTarget"];
|
|
||||||
[aDecoder decodeObjectForKey: @"NSMenu"];
|
|
||||||
submenu = [aDecoder decodeObjectForKey: @"NSSubmenu"];
|
|
||||||
|
|
||||||
self = [self initWithTitle: title
|
self = [self initWithTitle: title
|
||||||
action: NSSelectorFromString(action)
|
action: NSSelectorFromString(action)
|
||||||
keyEquivalent: key];
|
keyEquivalent: key];
|
||||||
[self setTarget: target];
|
//[aDecoder decodeObjectForKey: @"NSMenu"];
|
||||||
[self setMixedStateImage: mixedImage];
|
|
||||||
[self setOnStateImage: onImage];
|
|
||||||
[self setSubmenu: submenu];
|
|
||||||
|
|
||||||
|
if ([aDecoder containsValueForKey: @"NSTarget"])
|
||||||
|
{
|
||||||
|
id target = [aDecoder decodeObjectForKey: @"NSTarget"];
|
||||||
|
[self setTarget: target];
|
||||||
|
}
|
||||||
|
if ([aDecoder containsValueForKey: @"NSMixedImage"])
|
||||||
|
{
|
||||||
|
NSImage *mixedImage = [aDecoder decodeObjectForKey: @"NSMixedImage"];
|
||||||
|
[self setMixedStateImage: mixedImage];
|
||||||
|
}
|
||||||
|
if ([aDecoder containsValueForKey: @"NSOnImage"])
|
||||||
|
{
|
||||||
|
NSImage *onImage = [aDecoder decodeObjectForKey: @"NSOnImage"];
|
||||||
|
[self setOnStateImage: onImage];
|
||||||
|
}
|
||||||
|
if ([aDecoder containsValueForKey: @"NSSubmenu"])
|
||||||
|
{
|
||||||
|
NSMenu *submenu = [aDecoder decodeObjectForKey: @"NSSubmenu"];
|
||||||
|
[self setSubmenu: submenu];
|
||||||
|
}
|
||||||
if ([aDecoder containsValueForKey: @"NSKeyEquivModMask"])
|
if ([aDecoder containsValueForKey: @"NSKeyEquivModMask"])
|
||||||
{
|
{
|
||||||
int keyMask = [aDecoder decodeIntForKey: @"NSKeyEquivModMask"];
|
int keyMask = [aDecoder decodeIntForKey: @"NSKeyEquivModMask"];
|
||||||
|
@ -566,6 +595,16 @@ static Class imageClass;
|
||||||
int state = [aDecoder decodeIntForKey: @"NSState"];
|
int state = [aDecoder decodeIntForKey: @"NSState"];
|
||||||
[self setState: state];
|
[self setState: state];
|
||||||
}
|
}
|
||||||
|
if ([aDecoder containsValueForKey: @"NSIsDisabled"])
|
||||||
|
{
|
||||||
|
BOOL flag = [aDecoder decodeBoolForKey: @"NSIsDisabled"];
|
||||||
|
[self setEnabled: !flag];
|
||||||
|
}
|
||||||
|
if ([aDecoder containsValueForKey: @"NSTag"])
|
||||||
|
{
|
||||||
|
int tag = [aDecoder decodeIntForKey: @"NSTag"];
|
||||||
|
[self setTag: tag];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -6192,13 +6192,13 @@ static BOOL selectContiguousRegion(NSTableView *self,
|
||||||
{
|
{
|
||||||
currentRow = [self rowAtPoint: p] - 1;
|
currentRow = [self rowAtPoint: p] - 1;
|
||||||
if (currentRow > 0)
|
if (currentRow > 0)
|
||||||
[self scrollRowToVisible: currentRow];
|
[self scrollRowToVisible: currentRow];
|
||||||
}
|
}
|
||||||
else if (p.y > NSMaxY([self visibleRect])-3)
|
else if (p.y > NSMaxY([self visibleRect])-3)
|
||||||
{
|
{
|
||||||
currentRow = [self rowAtPoint: p] + 1;
|
currentRow = [self rowAtPoint: p] + 1;
|
||||||
if (currentRow < _numberOfRows)
|
if (currentRow < _numberOfRows)
|
||||||
[self scrollRowToVisible: currentRow];
|
[self scrollRowToVisible: currentRow];
|
||||||
}
|
}
|
||||||
|
|
||||||
positionInRow = (int)(p.y - _bounds.origin.y) % (int)_rowHeight;
|
positionInRow = (int)(p.y - _bounds.origin.y) % (int)_rowHeight;
|
||||||
|
@ -6232,13 +6232,13 @@ static BOOL selectContiguousRegion(NSTableView *self,
|
||||||
{
|
{
|
||||||
currentDragOperation = dragOperation;
|
currentDragOperation = dragOperation;
|
||||||
if ([_dataSource respondsToSelector:
|
if ([_dataSource respondsToSelector:
|
||||||
@selector(tableView:validateDrop:proposedRow:proposedDropOperation:)])
|
@selector(tableView:validateDrop:proposedRow:proposedDropOperation:)])
|
||||||
{
|
{
|
||||||
currentDragOperation = [_dataSource tableView: self
|
currentDragOperation = [_dataSource tableView: self
|
||||||
validateDrop: sender
|
validateDrop: sender
|
||||||
proposedRow: currentDropRow
|
proposedRow: currentDropRow
|
||||||
proposedDropOperation: NSTableViewDropAbove];
|
proposedDropOperation: currentDropOperation];
|
||||||
}
|
}
|
||||||
|
|
||||||
lastQuarterPosition = quarterPosition;
|
lastQuarterPosition = quarterPosition;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue