mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 02:10:48 +00:00
Eliminate warnings
This commit is contained in:
parent
430862e7e9
commit
b6983955f6
3 changed files with 27 additions and 7 deletions
|
@ -113,9 +113,9 @@ APPKIT_EXPORT NSPasteboardTypeTextFinderOptionKey const NSTextFinderMatchingType
|
|||
// PROTOCOLS
|
||||
|
||||
@protocol NSTextFinderClient <NSObject>
|
||||
|
||||
#if GS_PROTOCOLS_HAVE_OPTIONAL
|
||||
@optional
|
||||
|
||||
#endif
|
||||
- (BOOL) isSelectable;
|
||||
- (BOOL) allowsMultipleSelection;
|
||||
- (BOOL) isEditable;
|
||||
|
@ -140,15 +140,18 @@ APPKIT_EXPORT NSPasteboardTypeTextFinderOptionKey const NSTextFinderMatchingType
|
|||
|
||||
|
||||
@protocol NSTextFinderBarContainer <NSObject>
|
||||
|
||||
#if GS_PROTOCOLS_HAVE_OPTIONAL
|
||||
@required
|
||||
#endif
|
||||
- (NSView *) findBarView;
|
||||
- (void) setFindBarView: (NSView *)view;
|
||||
- (BOOL) isfindBarVisible;
|
||||
- (void) setFindBarVisible: (BOOL)flag;
|
||||
- (void) findBarViewDidChangeHeight;
|
||||
|
||||
#if GS_PROTOCOLS_HAVE_OPTIONAL
|
||||
@optional
|
||||
#endif
|
||||
- (NSView *) contentView;
|
||||
|
||||
@end
|
||||
|
|
|
@ -46,34 +46,48 @@
|
|||
// Operation methods
|
||||
- (void) _showFindInterface
|
||||
{
|
||||
[_finder showFindPanel];
|
||||
}
|
||||
|
||||
- (void) _nextMatch
|
||||
{
|
||||
[_finder findStringInTextView: (NSTextView *)_client
|
||||
forward: YES];
|
||||
}
|
||||
|
||||
- (void) _previousMatch
|
||||
{
|
||||
[_finder findStringInTextView: (NSTextView *)_client
|
||||
forward: NO];
|
||||
}
|
||||
|
||||
- (void) _replaceAll
|
||||
{
|
||||
[_finder replaceAllInTextView: (NSTextView *)_client
|
||||
onlyInSelection: NO];
|
||||
}
|
||||
|
||||
- (void) _replace
|
||||
{
|
||||
[_finder replaceStringInTextView: (NSTextView *)_client];
|
||||
}
|
||||
|
||||
- (void) _replaceAndFind
|
||||
{
|
||||
[_finder replaceStringInTextView: (NSTextView *)_client];
|
||||
[_finder findStringInTextView: (NSTextView *)_client
|
||||
forward: YES];
|
||||
}
|
||||
|
||||
- (void) _setSearchString
|
||||
{
|
||||
[_finder takeFindStringFromTextView: (NSTextView *)_client];
|
||||
}
|
||||
|
||||
- (void) _replaceAllInSelection
|
||||
{
|
||||
[_finder replaceAllInTextView: (NSTextView *)_client
|
||||
onlyInSelection: YES];
|
||||
}
|
||||
|
||||
- (void) _selectAll
|
||||
|
@ -90,6 +104,7 @@
|
|||
|
||||
- (void) _showReplaceInterface
|
||||
{
|
||||
[_finder showFindPanel];
|
||||
}
|
||||
|
||||
- (void) _hideReplaceInterface
|
||||
|
@ -148,7 +163,7 @@
|
|||
|
||||
- (BOOL) validateAction: (NSTextFinderAction)op
|
||||
{
|
||||
return NO;
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)cancelFindIndicator;
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
#import <Foundation/NSTimer.h>
|
||||
#import <Foundation/NSUndoManager.h>
|
||||
#import <Foundation/NSValue.h>
|
||||
|
||||
#import "AppKit/NSApplication.h"
|
||||
#import "AppKit/NSAttributedString.h"
|
||||
#import "AppKit/NSClipView.h"
|
||||
|
@ -89,6 +90,8 @@
|
|||
#import "AppKit/NSTextStorage.h"
|
||||
#import "AppKit/NSTextView.h"
|
||||
#import "AppKit/NSWindow.h"
|
||||
#import "AppKit/NSStringDrawing.h"
|
||||
|
||||
#import "GSGuiPrivate.h"
|
||||
#import "GSTextFinder.h"
|
||||
#import "GSToolTips.h"
|
||||
|
@ -6159,14 +6162,13 @@ configuation! */
|
|||
- (void) drawCharactersInRange: (NSRange)range forContentView: (NSView *)view
|
||||
{
|
||||
NSArray *rectsArray = [self rectsForCharacterRange: range];
|
||||
NSAttributedString *charactersInRange = [[self string] substringWithRange: range];
|
||||
NSString *charactersInRange = [[self string] substringWithRange: range];
|
||||
NSValue *v = [rectsArray objectAtIndex: 0];
|
||||
NSRect rect = [v rectValue];
|
||||
|
||||
[charactersInRange drawWithRect: rect
|
||||
options: 0
|
||||
attributes: nil
|
||||
context: nil];
|
||||
attributes: nil];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in a new issue