mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 19:10:37 +00:00
Add some 10.4 methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25348 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f83e9a7e81
commit
22f8170973
6 changed files with 49 additions and 1 deletions
|
@ -1,3 +1,11 @@
|
|||
2007-07-23 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/AppKit/NSCell.h,
|
||||
* Source/NSCell.m,
|
||||
* Source/NSActionCell.m (-setControlView:): Add MacOSX 10.4 method.
|
||||
* Headers/AppKit/NSAlert.h,
|
||||
* Source/NSAlert.m (+alertWithError:): Add MacOSX 10.4 method.
|
||||
|
||||
2007-07-18 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/AppKit/NSPrintInfo.h,
|
||||
|
|
|
@ -33,12 +33,15 @@
|
|||
#include <Foundation/NSObject.h>
|
||||
|
||||
@class NSArray;
|
||||
@class NSError;
|
||||
@class NSString;
|
||||
@class NSMutableArray;
|
||||
@class NSButton;
|
||||
@class NSImage;
|
||||
@class NSWindow;
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
||||
|
||||
typedef enum _NSAlertStyle {
|
||||
NSWarningAlertStyle = 0,
|
||||
NSInformationalAlertStyle = 1,
|
||||
|
@ -66,6 +69,9 @@ enum {
|
|||
int _result;
|
||||
}
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
+ (NSAlert *) alertWithError: (NSError *)error;
|
||||
#endif
|
||||
+ (NSAlert *) alertWithMessageText: (NSString *)messageTitle
|
||||
defaultButton: (NSString *)defaultButtonTitle
|
||||
alternateButton: (NSString *)alternateButtonTitle
|
||||
|
@ -109,4 +115,5 @@ enum {
|
|||
@end
|
||||
#endif
|
||||
|
||||
#endif /* MAC_OS_X_VERSION_10_3 */
|
||||
#endif /* _GNUstep_H_NSAlert */
|
||||
|
|
|
@ -441,6 +441,10 @@ enum {
|
|||
- (void)setControlTint:(NSControlTint)controlTint;
|
||||
- (NSControlTint)controlTint;
|
||||
#endif
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
- (void)setControlView:(NSView*)view;
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Editing Text
|
||||
|
|
|
@ -269,6 +269,13 @@ static Class controlClass;
|
|||
return _control_view;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the control view of the receiver.
|
||||
*/
|
||||
- (void) setControlView: (NSView*)view
|
||||
{
|
||||
_control_view = view;
|
||||
}
|
||||
|
||||
- (void) drawWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
|
||||
{
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
#include <Foundation/NSDebug.h>
|
||||
#include <Foundation/NSBundle.h>
|
||||
#include <Foundation/NSError.h>
|
||||
#include <Foundation/NSString.h>
|
||||
#include "AppKit/NSAlert.h"
|
||||
#include "AppKit/NSApplication.h"
|
||||
|
@ -1384,6 +1385,20 @@ void NSBeginInformationalAlertSheet(NSString *title,
|
|||
}
|
||||
}
|
||||
|
||||
+ (NSAlert *) alertWithError: (NSError *)error
|
||||
{
|
||||
NSArray *options;
|
||||
unsigned int count;
|
||||
|
||||
options = [error localizedRecoveryOptions];
|
||||
count = [options count];
|
||||
return [self alertWithMessageText: [error localizedDescription]
|
||||
defaultButton: (count > 0) ? [options objectAtIndex: 0] : nil
|
||||
alternateButton: (count > 1) ? [options objectAtIndex: 1] : nil
|
||||
otherButton: (count > 2) ? [options objectAtIndex: 2] : nil
|
||||
informativeTextWithFormat: [error localizedRecoverySuggestion]];
|
||||
}
|
||||
|
||||
+ (NSAlert *) alertWithMessageText: (NSString *)messageTitle
|
||||
defaultButton: (NSString *)defaultButtonTitle
|
||||
alternateButton: (NSString *)alternateButtonTitle
|
||||
|
|
|
@ -1908,7 +1908,7 @@ static NSColor *shadowCol;
|
|||
return _cell.control_tint;
|
||||
}
|
||||
|
||||
/**<p>This method is used by subclasses to specified the control view.
|
||||
/**<p>This method is used by subclasses to get the control view.
|
||||
This method returns nil.</p>
|
||||
*/
|
||||
- (NSView*) controlView
|
||||
|
@ -1916,6 +1916,13 @@ static NSColor *shadowCol;
|
|||
return nil;
|
||||
}
|
||||
|
||||
/**<p>This method is used by subclasses to specify the control view.</p>
|
||||
*/
|
||||
- (void) setControlView: (NSView*)view
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
/** <p>This drawing is minimal and with no background,
|
||||
* to make it easier for subclass to customize drawing. </p>
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue