mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 19:50:38 +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
bbf693d751
commit
8b0730a303
38 changed files with 199 additions and 116 deletions
|
@ -2915,11 +2915,15 @@ resetCursorRectsForView(NSView *theView)
|
|||
// Quietly discard an unused mouse down.
|
||||
}
|
||||
|
||||
- (BOOL) becomesKeyOnlyIfNeeded
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
/** Handles mouse and other events sent to the receiver by NSApplication.
|
||||
Do not invoke this method directly.
|
||||
*/
|
||||
- (void) _sendEvent: (NSEvent*)theEvent
|
||||
becomesKeyOnlyIfNeeded: (BOOL)becomesKeyOnlyIfNeeded
|
||||
- (void) sendEvent: (NSEvent*)theEvent
|
||||
{
|
||||
NSView *v;
|
||||
NSEventType type;
|
||||
|
@ -2955,7 +2959,8 @@ resetCursorRectsForView(NSView *theView)
|
|||
if (_f.is_key == NO && _windowLevel != NSDesktopWindowLevel)
|
||||
{
|
||||
/* NSPanel modification: check becomesKeyOnlyIfNeeded. */
|
||||
if (!becomesKeyOnlyIfNeeded || [v needsPanelToBecomeKey])
|
||||
if (![self becomesKeyOnlyIfNeeded]
|
||||
|| [v needsPanelToBecomeKey])
|
||||
[self makeKeyAndOrderFront: self];
|
||||
}
|
||||
/* Activate the app *after* making the receiver key, as app
|
||||
|
@ -3035,13 +3040,13 @@ resetCursorRectsForView(NSView *theView)
|
|||
switch (type)
|
||||
{
|
||||
case NSLeftMouseDragged:
|
||||
[_lastView mouseDragged: theEvent];
|
||||
[_lastView mouseDragged: theEvent];
|
||||
break;
|
||||
case NSOtherMouseDragged:
|
||||
[_lastView otherMouseDragged: theEvent];
|
||||
[_lastView otherMouseDragged: theEvent];
|
||||
break;
|
||||
case NSRightMouseDragged:
|
||||
[_lastView rightMouseDragged: theEvent];
|
||||
[_lastView rightMouseDragged: theEvent];
|
||||
break;
|
||||
default:
|
||||
if (_f.accepts_mouse_moved)
|
||||
|
@ -3417,15 +3422,6 @@ resetCursorRectsForView(NSView *theView)
|
|||
}
|
||||
}
|
||||
|
||||
/** Handles mouse and other events sent to the receiver by NSApplication.
|
||||
Do not invoke this method directly.
|
||||
*/
|
||||
- (void) sendEvent: (NSEvent*)theEvent
|
||||
{
|
||||
[self _sendEvent: theEvent
|
||||
becomesKeyOnlyIfNeeded: NO];
|
||||
}
|
||||
|
||||
|
||||
- (BOOL) tryToPerform: (SEL)anAction with: (id)anObject
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue