mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 19:30:48 +00:00
Some coding standard changes for NSSearchField
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31788 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
030f54c33b
commit
4b51be5d18
3 changed files with 46 additions and 35 deletions
|
@ -1,3 +1,8 @@
|
|||
2010-12-27 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSSearchField.m,
|
||||
* Source/NSSearchFieldCell.m: Some coding standard changes.
|
||||
|
||||
2010-12-27 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/GSDragView.m: Check whether the drag source supports
|
||||
|
|
|
@ -27,10 +27,11 @@
|
|||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <Foundation/NSString.h>
|
||||
#include <Foundation/NSArray.h>
|
||||
#include <AppKit/NSSearchField.h>
|
||||
#include <AppKit/NSSearchFieldCell.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSArray.h>
|
||||
|
||||
#import "AppKit/NSSearchField.h"
|
||||
#import "AppKit/NSSearchFieldCell.h"
|
||||
|
||||
/*
|
||||
* Class variables
|
||||
|
@ -94,7 +95,8 @@ static Class usedCellClass;
|
|||
|
||||
- (void) delete: (id)sender
|
||||
{
|
||||
[self setStringValue:@""]; // this may need to do more (like send action), but start here...
|
||||
// this may need to do more (like send action), but start here...
|
||||
[self setStringValue: @""];
|
||||
[[self cell] performClick: self];
|
||||
}
|
||||
|
||||
|
|
|
@ -29,19 +29,20 @@
|
|||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <Foundation/NSArray.h>
|
||||
#include <Foundation/NSException.h>
|
||||
#include <Foundation/NSNotification.h>
|
||||
#include <Foundation/NSString.h>
|
||||
#include <Foundation/NSUserDefaults.h>
|
||||
#include <AppKit/NSApplication.h>
|
||||
#include <AppKit/NSButtonCell.h>
|
||||
#include <AppKit/NSEvent.h>
|
||||
#include <AppKit/NSImage.h>
|
||||
#include <AppKit/NSMenu.h>
|
||||
#include "AppKit/NSMenuView.h"
|
||||
#include <AppKit/NSSearchFieldCell.h>
|
||||
#include "AppKit/NSWindow.h"
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSException.h>
|
||||
#import <Foundation/NSNotification.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSUserDefaults.h>
|
||||
|
||||
#import "AppKit/NSApplication.h"
|
||||
#import "AppKit/NSButtonCell.h"
|
||||
#import "AppKit/NSEvent.h"
|
||||
#import "AppKit/NSImage.h"
|
||||
#import "AppKit/NSMenu.h"
|
||||
#import "AppKit/NSMenuView.h"
|
||||
#import "AppKit/NSSearchFieldCell.h"
|
||||
#import "AppKit/NSWindow.h"
|
||||
|
||||
@interface NSSearchFieldCell (Private)
|
||||
|
||||
|
@ -82,8 +83,8 @@
|
|||
|
||||
//_recent_searches = [[NSMutableArray alloc] init];
|
||||
//_recents_autosave_name = nil;
|
||||
[self _loadSearches];
|
||||
_max_recents = 10;
|
||||
[self _loadSearches];
|
||||
}
|
||||
|
||||
return self;
|
||||
|
@ -558,6 +559,7 @@
|
|||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (void) selectItemAtIndex:(int)anIndex
|
||||
{
|
||||
// do nothing
|
||||
|
@ -572,7 +574,6 @@
|
|||
NSRect cellFrame;
|
||||
int i;
|
||||
int recentCount = [_recent_searches count];
|
||||
// NSRect textRect;
|
||||
|
||||
template = [self searchMenuTemplate];
|
||||
popupmenu = [[NSMenu alloc] init];
|
||||
|
@ -659,6 +660,7 @@
|
|||
- (void) _searchForRecent: (id)sender
|
||||
{
|
||||
NSString *searchTerm = [sender title];
|
||||
|
||||
[(id)_control_view setStringValue: searchTerm];
|
||||
[self performClick: self]; // do the search
|
||||
}
|
||||
|
@ -672,6 +674,7 @@
|
|||
{
|
||||
NSArray *list;
|
||||
NSString *name = [self recentsAutosaveName];
|
||||
|
||||
if (name)
|
||||
{
|
||||
list = [[NSUserDefaults standardUserDefaults]
|
||||
|
@ -684,6 +687,7 @@
|
|||
{
|
||||
NSArray *list = [self recentSearches];
|
||||
NSString *name = [self recentsAutosaveName];
|
||||
|
||||
if (name && list)
|
||||
{
|
||||
[[NSUserDefaults standardUserDefaults]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue