mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 02:30:59 +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>
|
||||
|
||||
* 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 encodeBool: [self isEnabled] forKey: @"NSEnabled"];
|
||||
if (_tag)
|
||||
{
|
||||
[aCoder encodeInt: [self tag] forKey: @"NSTag"];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -930,12 +934,17 @@ static NSNotificationCenter *nc;
|
|||
|
||||
if (cell != nil)
|
||||
{
|
||||
[self setCell: cell];
|
||||
}
|
||||
[self setCell: cell];
|
||||
}
|
||||
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
|
||||
{
|
||||
|
|
|
@ -352,7 +352,7 @@ withContentsOfURL: (NSURL *)url
|
|||
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 ([self isSeparatorItem])
|
||||
{
|
||||
[aCoder encodeBool: YES forKey: @"NSIsSeparator"];
|
||||
}
|
||||
[aCoder encodeObject: _title forKey: @"NSTitle"];
|
||||
[aCoder encodeObject: NSStringFromSelector(_action) forKey: @"NSAction"];
|
||||
[aCoder encodeObject: _keyEquivalent forKey: @"NSKeyEquiv"];
|
||||
|
@ -495,6 +499,11 @@ static Class imageClass;
|
|||
[aCoder encodeInt: _keyEquivalentModifierMask forKey: @"NSKeyEquivModMask"];
|
||||
[aCoder encodeInt: _mnemonicLocation forKey: @"NSMnemonicLoc"];
|
||||
[aCoder encodeInt: _state forKey: @"NSState"];
|
||||
[aCoder encodeBool: ![self isEnabled] forKey: @"NSIsDisabled"];
|
||||
if (_tag)
|
||||
{
|
||||
[aCoder encodeInt: _tag forKey: @"NSTag"];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -529,28 +538,48 @@ static Class imageClass;
|
|||
NSString *title;
|
||||
NSString *action;
|
||||
NSString *key;
|
||||
NSImage *mixedImage;
|
||||
NSImage *onImage;
|
||||
id target;
|
||||
NSMenu *submenu;
|
||||
BOOL isSeparator = NO;
|
||||
|
||||
if ([aDecoder containsValueForKey: @"NSIsSeparator"])
|
||||
{
|
||||
isSeparator = [aDecoder decodeBoolForKey: @"NSIsSeparator"];
|
||||
}
|
||||
|
||||
if (isSeparator)
|
||||
{
|
||||
RELEASE(self);
|
||||
return [NSMenuItem separatorItem];
|
||||
}
|
||||
|
||||
title = [aDecoder decodeObjectForKey: @"NSTitle"];
|
||||
action = [aDecoder decodeObjectForKey: @"NSAction"];
|
||||
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
|
||||
action: NSSelectorFromString(action)
|
||||
keyEquivalent: key];
|
||||
[self setTarget: target];
|
||||
[self setMixedStateImage: mixedImage];
|
||||
[self setOnStateImage: onImage];
|
||||
[self setSubmenu: submenu];
|
||||
action: NSSelectorFromString(action)
|
||||
keyEquivalent: key];
|
||||
//[aDecoder decodeObjectForKey: @"NSMenu"];
|
||||
|
||||
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"])
|
||||
{
|
||||
int keyMask = [aDecoder decodeIntForKey: @"NSKeyEquivModMask"];
|
||||
|
@ -566,6 +595,16 @@ static Class imageClass;
|
|||
int state = [aDecoder decodeIntForKey: @"NSState"];
|
||||
[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
|
||||
{
|
||||
|
|
|
@ -6192,13 +6192,13 @@ static BOOL selectContiguousRegion(NSTableView *self,
|
|||
{
|
||||
currentRow = [self rowAtPoint: p] - 1;
|
||||
if (currentRow > 0)
|
||||
[self scrollRowToVisible: currentRow];
|
||||
[self scrollRowToVisible: currentRow];
|
||||
}
|
||||
else if (p.y > NSMaxY([self visibleRect])-3)
|
||||
{
|
||||
currentRow = [self rowAtPoint: p] + 1;
|
||||
if (currentRow < _numberOfRows)
|
||||
[self scrollRowToVisible: currentRow];
|
||||
[self scrollRowToVisible: currentRow];
|
||||
}
|
||||
|
||||
positionInRow = (int)(p.y - _bounds.origin.y) % (int)_rowHeight;
|
||||
|
@ -6232,13 +6232,13 @@ static BOOL selectContiguousRegion(NSTableView *self,
|
|||
{
|
||||
currentDragOperation = dragOperation;
|
||||
if ([_dataSource respondsToSelector:
|
||||
@selector(tableView:validateDrop:proposedRow:proposedDropOperation:)])
|
||||
{
|
||||
currentDragOperation = [_dataSource tableView: self
|
||||
validateDrop: sender
|
||||
proposedRow: currentDropRow
|
||||
proposedDropOperation: NSTableViewDropAbove];
|
||||
}
|
||||
@selector(tableView:validateDrop:proposedRow:proposedDropOperation:)])
|
||||
{
|
||||
currentDragOperation = [_dataSource tableView: self
|
||||
validateDrop: sender
|
||||
proposedRow: currentDropRow
|
||||
proposedDropOperation: currentDropOperation];
|
||||
}
|
||||
|
||||
lastQuarterPosition = quarterPosition;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue