mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-21 22:33:19 +00:00
2005-01-21 21:43 Alexander Malmberg <alexander@malmberg.org>
Various whitespace cleanups, comment type fixes, and changes to avoid warnings from recent versions of gcc. * Headers/Additions/GNUstepGUI/GSToolbar.h (-_toolbars): Declare. * Source/NSWindow+Toolbar.m: Remove conflicting declaration of [NSToolbar -_toolbars]. * Headers/Additions/GNUstepGUI/GSServicesManager.h, Source/GSServicesMananger.m (-item2title:, -validateMenuItem:): Adjust argument types. * Headers/AppKit/NSMenu.h (-validateMenuItem:): Adjust argument type. * Source/NSTextView.m (-sizeToFit): Don't use size uninitialized if neither resizable flags is set. (-insertText:): Adjust argument type. * Headers/AppKit/NSResponder.h, Source/NSResponder.m (-insertText:): Adjust argument type. Document. * Headers/AppKit/NSView.h: Change type of ivar _window to NSWindow *. * Source/GSTitleView.m (-mouseDown:): Always initialize startWindowOrigin. * Source/NSApplication.m (-setApplicationIconImage:): Add casts to avoid warnings. * Source/NSCell.m (-cellSize): Add default: case. * Source/NSPasteboard.m ([GSFiltered -pasteboard:provideDataForType:]): Detect and warn if we can't find a filter that will get us the desired type. * Source/NSProgressIndicator.m: Comment out unused variable 'images'. * Source/NSBezierPath.m: Declare GSBezierPath fully before using it. (-bezierPathByFlatteningPath, -bezierPathByReversingPath): Make sure variables are always initialized. * Source/NSMenuView.m, * Source/NSPrintOperation.m, * Source/NSSplitView.m, * Source/NSTableHeaderView.m: Make sure variables are always initialized. * Source/NSBox.m, * Source/NSImageview.m, * Source/NSText.m, * Source/NSTextStorage.m: Add missing includes. * Source/GSKeyBindingTable.m, * Source/GSLayoutManager.m, * Source/NSBitmapImageRep+PNM.m, * Source/NSBundleAdditions.m, * Source/NSLayoutManager.m, * Source/nsimage-tiff.h, * Source/tiff.m, * Headers/Additions/GNUstepGUI/GSDisplayServer.h, * Source/GSDisplayServer.m: Change signedness of various variables. * Source/NSPanel.m (-sendEvent:): Remove. * Source/NSWindow.m (-becomesKeyOnlyIfNeeded): New method. (-_sendEvent:becomesKeyOnlyIfNeeded:): Remove. Move code ... (-sendEvent:): ... here. Use -becomesKeyOnlyIfNeeded instead of the argument. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20590 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
efe686d736
commit
ad2419e484
38 changed files with 199 additions and 116 deletions
|
@ -674,7 +674,7 @@ that makes decoding and encoding compatible with the old code.
|
|||
|
||||
if ([aDecoder containsValueForKey: @"NSTVFlags"])
|
||||
{
|
||||
int vFlags = [aDecoder decodeIntForKey: @"NSTVFlags"];
|
||||
//int vFlags = [aDecoder decodeIntForKey: @"NSTVFlags"];
|
||||
// FIXME set the flags
|
||||
}
|
||||
if ([aDecoder containsValueForKey: @"NSSharedData"])
|
||||
|
@ -1492,26 +1492,25 @@ incorrectly. */
|
|||
if (!_layoutManager)
|
||||
return;
|
||||
|
||||
size = _bounds.size;
|
||||
|
||||
if (_tf.is_horizontally_resizable || _tf.is_vertically_resizable)
|
||||
{
|
||||
NSRect r = [_layoutManager usedRectForTextContainer: _textContainer];
|
||||
NSSize s2;
|
||||
if (_textContainer == [_layoutManager extraLineFragmentTextContainer])
|
||||
{
|
||||
r = NSUnionRect(r, [_layoutManager extraLineFragmentUsedRect]);
|
||||
}
|
||||
|
||||
size = NSMakeSize(NSMaxX(r), NSMaxY(r));
|
||||
}
|
||||
|
||||
if (!_tf.is_horizontally_resizable)
|
||||
size.width = _bounds.size.width;
|
||||
else
|
||||
size.width += 2 * _textContainerInset.width;
|
||||
s2 = NSMakeSize(NSMaxX(r), NSMaxY(r));
|
||||
|
||||
if (!_tf.is_vertically_resizable)
|
||||
size.height = _bounds.size.height;
|
||||
else
|
||||
size.height += 2 * _textContainerInset.height;
|
||||
if (_tf.is_horizontally_resizable)
|
||||
size.width = s2.width + 2 * _textContainerInset.width;
|
||||
|
||||
if (_tf.is_vertically_resizable)
|
||||
size.height = s2.height + 2 * _textContainerInset.height;
|
||||
}
|
||||
|
||||
[self setConstrainedFrameSize: size];
|
||||
}
|
||||
|
@ -1728,11 +1727,11 @@ chain if we can't handle it. */
|
|||
|
||||
/* insertString may actually be an NSAttributedString. If it is, and the
|
||||
text view isn't rich-text, we ignore the attributes and use the typing
|
||||
attributed.
|
||||
attributes.
|
||||
|
||||
This method is for user changes; see NSTextView_actions.m.
|
||||
*/
|
||||
-(void) insertText: (NSString *)insertString
|
||||
-(void) insertText: (id)insertString
|
||||
{
|
||||
NSRange insertRange = [self rangeForUserTextChange];
|
||||
NSString *string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue