mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
* Source/NSCollectionView.m (-_moveUpAndExpandSelection:):
* Correct the comparision. Bug reported by Gregory John Casamento <greg.casamento@gmail.com> * Headers/AppKit/NSPopover.h: Add missing import. * Source/GSXibLoader.m: Disable NSCustomView hack again. * Headers/AppKit/NSApplication.h: Replace GSAppDelegateProtocol with NSApplicationDelegate. * Source/NSApplication.m: Adjust documentation to this * replacement. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36553 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
eab097631c
commit
12a29ad4d7
6 changed files with 34 additions and 18 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2013-04-21 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSCollectionView.m (-_moveUpAndExpandSelection:): Correct
|
||||
the comparision. Bug reported by Gregory John Casamento
|
||||
<greg.casamento@gmail.com>
|
||||
* Headers/AppKit/NSPopover.h: Add missing import.
|
||||
* Source/GSXibLoader.m: Disable NSCustomView hack again.
|
||||
* Headers/AppKit/NSApplication.h: Replace GSAppDelegateProtocol
|
||||
with NSApplicationDelegate.
|
||||
* Source/NSApplication.m: Adjust documentation to this replacement.
|
||||
|
||||
|
||||
2013-04-21 09:26-EDT Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Headers/AppKit/AppKit.h: Add NSPopover.h to set of files
|
||||
|
|
|
@ -440,13 +440,19 @@ APPKIT_EXPORT NSString *NSEventTrackingRunLoopMode;
|
|||
@end
|
||||
|
||||
/**
|
||||
* This is a formal protocol that duplicates the informal protocol for
|
||||
* [NSApplication] delegates. Your delegate does not need to implement the
|
||||
* formal protocol; it is declared only for documentation purposes. Your
|
||||
* This is now a formal optional protocol.
|
||||
* Your delegate does not need to implement the full formal protocol. Your
|
||||
* delegate should just implement the methods it needs to, which will allow
|
||||
* <code>NSApp</code> to use default implementations in other cases.
|
||||
*/
|
||||
@protocol GSAppDelegateProtocol
|
||||
@protocol NSApplicationDelegate <NSObject>
|
||||
#ifdef __OBJC2__
|
||||
@optional
|
||||
#else
|
||||
@end
|
||||
@interface NSObject (NSApplicationDelegate)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sender app (not necessarily this application) requests application to open
|
||||
* file without bringing up its normal UI, for programmatic manipulation.
|
||||
|
@ -623,12 +629,14 @@ APPKIT_EXPORT NSString *NSEventTrackingRunLoopMode;
|
|||
- (BOOL) application: (NSApplication*)sender
|
||||
delegateHandlesKey: (NSString*)key;
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_1, GS_API_LATEST)
|
||||
/**
|
||||
* Method used on OS X to allow an application to override the standard menu
|
||||
* obtained by right-clicking on the application's dock icon. <em>Called
|
||||
* when the application uses Macintosh or Windows95 style menus.</em>
|
||||
*/
|
||||
- (NSMenu *) applicationDockMenu: (NSApplication*)sender;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Method used on OS X to allow delegate to handle event when user clicks on
|
||||
|
@ -650,13 +658,6 @@ APPKIT_EXPORT NSString *NSEventTrackingRunLoopMode;
|
|||
@end
|
||||
#endif
|
||||
|
||||
/*
|
||||
* NSApplicationDelegate inherits from GSAppDelegateProtocol to
|
||||
* avoid compiler warnings.
|
||||
*/
|
||||
@protocol NSApplicationDelegate <GSAppDelegateProtocol>
|
||||
@end
|
||||
|
||||
/*
|
||||
* Notifications
|
||||
*/
|
||||
|
|
|
@ -29,8 +29,9 @@
|
|||
#ifndef _GNUstep_H_NSPopover
|
||||
#define _GNUstep_H_NSPopover
|
||||
|
||||
#include <Foundation/NSGeometry.h>
|
||||
#include <AppKit/NSResponder.h>
|
||||
#import <Foundation/NSGeometry.h>
|
||||
#import <AppKit/NSNibDeclarations.h>
|
||||
#import <AppKit/NSResponder.h>
|
||||
|
||||
/* Keys */
|
||||
APPKIT_EXPORT NSString *NSPopoverCloseReasonKey;
|
||||
|
|
|
@ -1492,10 +1492,12 @@ didStartElement: (NSString*)elementName
|
|||
if ([@"object" isEqualToString: elementName])
|
||||
{
|
||||
NSString *classname = [element attributeForKey: @"class"];
|
||||
if([classname isEqualToString:@"NSCustomView"])
|
||||
/*
|
||||
if ([classname isEqualToString:@"NSCustomView"])
|
||||
{
|
||||
classname = @"NSView"; // instantiate an NSView instead...
|
||||
}
|
||||
*/
|
||||
return [self decodeObjectForXib: element
|
||||
forClassName: classname
|
||||
withID: objID];
|
||||
|
|
|
@ -742,7 +742,7 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
|
|||
*
|
||||
* <p>To avoid most common needs for subclassing, NSApplication allows you to
|
||||
* specify a <em>delegate</em> that is messaged in particular situations.
|
||||
* See -delegate , -setDelegate: , and [(GSAppDelegateProtocol)].</p>
|
||||
* See -delegate , -setDelegate: , and [(NSApplicationDelegate)].</p>
|
||||
*
|
||||
* <p><strong>Subclassing</strong> should be a last resort, and delegate
|
||||
* methods should be used in most cases. However, subclassing is most
|
||||
|
@ -3576,7 +3576,7 @@ struct _DelegateWrapper
|
|||
* messages sent to the application from remote processes (see the
|
||||
* section documenting distributed objects for [NSPasteboard]).
|
||||
* </p>
|
||||
* <p>See -setDelegate: and [(GSAppDelegateProtocol)] for more information.</p>
|
||||
* <p>See -setDelegate: and [(NSApplicationDelegate)] for more information.</p>
|
||||
*/
|
||||
- (id) delegate
|
||||
{
|
||||
|
@ -3590,7 +3590,7 @@ struct _DelegateWrapper
|
|||
* stop it being the application delagate by calling this
|
||||
* method again with another object (or nil) as the argument.
|
||||
* </p>
|
||||
* <p>See -delegate and [(GSAppDelegateProtocol)] for more information.</p>
|
||||
* <p>See -delegate and [(NSApplicationDelegate)] for more information.</p>
|
||||
*/
|
||||
- (void) setDelegate: (id)anObject
|
||||
{
|
||||
|
|
|
@ -782,7 +782,7 @@ static NSString *placeholderItem = nil;
|
|||
- (void) _moveUpAndExpandSelection: (BOOL)shouldExpand
|
||||
{
|
||||
NSInteger index = [[self selectionIndexes] firstIndex];
|
||||
if (index != NSNotFound && (index - _numberOfColumns) >= 0)
|
||||
if (index != NSNotFound && index >= _numberOfColumns)
|
||||
{
|
||||
[self _modifySelectionWithNewIndex: index - _numberOfColumns
|
||||
direction: -1
|
||||
|
|
Loading…
Reference in a new issue