Fixing bug 154069; hooking up additional find options. Also did some file detabbing. r=ccarlen/pinkerton.
git-svn-id: svn://10.0.0.236/trunk@124022 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
|
||||
@protocol CHFind
|
||||
|
||||
- (BOOL)findInPage:(NSString*)text;
|
||||
- (BOOL)findInPageWithPattern:(NSString*)text caseSensitive:(BOOL)inCaseSensitive
|
||||
wrap:(BOOL)inWrap backwards:(BOOL)inBackwards;
|
||||
|
||||
@end
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
CLASS = FindDlgController;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mFindButton = id;
|
||||
mIgnoreCaseBox = id;
|
||||
mSearchBackwardsBox = id;
|
||||
mSearchField = id;
|
||||
mWrapAroundBox = id;
|
||||
mFindButton = NSButton;
|
||||
mIgnoreCaseBox = NSButton;
|
||||
mSearchBackwardsBox = NSButton;
|
||||
mSearchField = NSTextField;
|
||||
mWrapAroundBox = NSButton;
|
||||
};
|
||||
SUPERCLASS = NSWindowController;
|
||||
},
|
||||
|
||||
BIN
mozilla/camino/English.lproj/FindDialog.nib/objects.nib
generated
BIN
mozilla/camino/English.lproj/FindDialog.nib/objects.nib
generated
Binary file not shown.
10
mozilla/camino/FindDialog.nib/classes.nib
generated
10
mozilla/camino/FindDialog.nib/classes.nib
generated
@@ -5,11 +5,11 @@
|
||||
CLASS = FindDlgController;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mFindButton = id;
|
||||
mIgnoreCaseBox = id;
|
||||
mSearchBackwardsBox = id;
|
||||
mSearchField = id;
|
||||
mWrapAroundBox = id;
|
||||
mFindButton = NSButton;
|
||||
mIgnoreCaseBox = NSButton;
|
||||
mSearchBackwardsBox = NSButton;
|
||||
mSearchField = NSTextField;
|
||||
mWrapAroundBox = NSButton;
|
||||
};
|
||||
SUPERCLASS = NSWindowController;
|
||||
},
|
||||
|
||||
BIN
mozilla/camino/FindDialog.nib/objects.nib
generated
BIN
mozilla/camino/FindDialog.nib/objects.nib
generated
Binary file not shown.
@@ -39,11 +39,11 @@
|
||||
#include "nsIWebBrowserFind.h"
|
||||
|
||||
@interface FindDlgController : NSWindowController {
|
||||
IBOutlet id mSearchField;
|
||||
IBOutlet id mIgnoreCaseBox;
|
||||
IBOutlet id mWrapAroundBox;
|
||||
IBOutlet id mSearchBackwardsBox;
|
||||
IBOutlet id mFindButton;
|
||||
IBOutlet NSTextField* mSearchField;
|
||||
IBOutlet NSButton* mIgnoreCaseBox;
|
||||
IBOutlet NSButton* mWrapAroundBox;
|
||||
IBOutlet NSButton* mSearchBackwardsBox;
|
||||
IBOutlet NSButton* mFindButton;
|
||||
|
||||
NSString* mSearchText;
|
||||
}
|
||||
|
||||
@@ -70,8 +70,15 @@
|
||||
NSWindowController* controller = [[NSApp mainWindow] windowController];
|
||||
if ( [controller conformsToProtocol:@protocol(CHFind)] ) {
|
||||
id<CHFind> browserController = controller;
|
||||
BOOL ignoreCase = [mIgnoreCaseBox state];
|
||||
BOOL wrapSearch = [mWrapAroundBox state];
|
||||
BOOL searchBack = [mSearchBackwardsBox state];
|
||||
|
||||
[self storeSearchText:[mSearchField stringValue]];
|
||||
BOOL found = [browserController findInPage:mSearchText];
|
||||
|
||||
BOOL found = [browserController findInPageWithPattern:mSearchText caseSensitive:!ignoreCase
|
||||
wrap:wrapSearch backwards:searchBack];
|
||||
|
||||
if ( found )
|
||||
[self close];
|
||||
else
|
||||
@@ -93,7 +100,12 @@
|
||||
NSWindowController* controller = [[NSApp mainWindow] windowController];
|
||||
if ( [controller conformsToProtocol:@protocol(CHFind)] ) {
|
||||
id<CHFind> browserController = controller;
|
||||
BOOL found = [browserController findInPage:mSearchText];
|
||||
BOOL ignoreCase = [mIgnoreCaseBox state];
|
||||
BOOL wrapSearch = [mWrapAroundBox state];
|
||||
BOOL searchBack = [mSearchBackwardsBox state];
|
||||
|
||||
BOOL found = [browserController findInPageWithPattern:mSearchText caseSensitive:!ignoreCase
|
||||
wrap:wrapSearch backwards:searchBack];
|
||||
if ( !found )
|
||||
NSBeep();
|
||||
}
|
||||
@@ -101,7 +113,6 @@
|
||||
NSBeep();
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// controlTextDidChange
|
||||
//
|
||||
@@ -115,7 +126,6 @@
|
||||
[mFindButton setEnabled:PR_FALSE];
|
||||
}
|
||||
|
||||
|
||||
- (void)storeSearchText:(NSString*)inText
|
||||
{
|
||||
[mSearchText autorelease];
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
CLASS = FindDlgController;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mFindButton = id;
|
||||
mIgnoreCaseBox = id;
|
||||
mSearchBackwardsBox = id;
|
||||
mSearchField = id;
|
||||
mWrapAroundBox = id;
|
||||
mFindButton = NSButton;
|
||||
mIgnoreCaseBox = NSButton;
|
||||
mSearchBackwardsBox = NSButton;
|
||||
mSearchField = NSTextField;
|
||||
mWrapAroundBox = NSButton;
|
||||
};
|
||||
SUPERCLASS = NSWindowController;
|
||||
},
|
||||
|
||||
Binary file not shown.
@@ -32,6 +32,7 @@
|
||||
|
||||
@protocol CHFind
|
||||
|
||||
- (BOOL)findInPage:(NSString*)text;
|
||||
- (BOOL)findInPageWithPattern:(NSString*)text caseSensitive:(BOOL)inCaseSensitive
|
||||
wrap:(BOOL)inWrap backwards:(BOOL)inBackwards;
|
||||
|
||||
@end
|
||||
|
||||
@@ -39,11 +39,11 @@
|
||||
#include "nsIWebBrowserFind.h"
|
||||
|
||||
@interface FindDlgController : NSWindowController {
|
||||
IBOutlet id mSearchField;
|
||||
IBOutlet id mIgnoreCaseBox;
|
||||
IBOutlet id mWrapAroundBox;
|
||||
IBOutlet id mSearchBackwardsBox;
|
||||
IBOutlet id mFindButton;
|
||||
IBOutlet NSTextField* mSearchField;
|
||||
IBOutlet NSButton* mIgnoreCaseBox;
|
||||
IBOutlet NSButton* mWrapAroundBox;
|
||||
IBOutlet NSButton* mSearchBackwardsBox;
|
||||
IBOutlet NSButton* mFindButton;
|
||||
|
||||
NSString* mSearchText;
|
||||
}
|
||||
|
||||
@@ -70,8 +70,15 @@
|
||||
NSWindowController* controller = [[NSApp mainWindow] windowController];
|
||||
if ( [controller conformsToProtocol:@protocol(CHFind)] ) {
|
||||
id<CHFind> browserController = controller;
|
||||
BOOL ignoreCase = [mIgnoreCaseBox state];
|
||||
BOOL wrapSearch = [mWrapAroundBox state];
|
||||
BOOL searchBack = [mSearchBackwardsBox state];
|
||||
|
||||
[self storeSearchText:[mSearchField stringValue]];
|
||||
BOOL found = [browserController findInPage:mSearchText];
|
||||
|
||||
BOOL found = [browserController findInPageWithPattern:mSearchText caseSensitive:!ignoreCase
|
||||
wrap:wrapSearch backwards:searchBack];
|
||||
|
||||
if ( found )
|
||||
[self close];
|
||||
else
|
||||
@@ -93,7 +100,12 @@
|
||||
NSWindowController* controller = [[NSApp mainWindow] windowController];
|
||||
if ( [controller conformsToProtocol:@protocol(CHFind)] ) {
|
||||
id<CHFind> browserController = controller;
|
||||
BOOL found = [browserController findInPage:mSearchText];
|
||||
BOOL ignoreCase = [mIgnoreCaseBox state];
|
||||
BOOL wrapSearch = [mWrapAroundBox state];
|
||||
BOOL searchBack = [mSearchBackwardsBox state];
|
||||
|
||||
BOOL found = [browserController findInPageWithPattern:mSearchText caseSensitive:!ignoreCase
|
||||
wrap:wrapSearch backwards:searchBack];
|
||||
if ( !found )
|
||||
NSBeep();
|
||||
}
|
||||
@@ -101,7 +113,6 @@
|
||||
NSBeep();
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// controlTextDidChange
|
||||
//
|
||||
@@ -115,7 +126,6 @@
|
||||
[mFindButton setEnabled:PR_FALSE];
|
||||
}
|
||||
|
||||
|
||||
- (void)storeSearchText:(NSString*)inText
|
||||
{
|
||||
[mSearchText autorelease];
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
@protocol CHFind
|
||||
|
||||
- (BOOL)findInPage:(NSString*)text;
|
||||
- (BOOL)findInPageWithPattern:(NSString*)text caseSensitive:(BOOL)inCaseSensitive
|
||||
wrap:(BOOL)inWrap backwards:(BOOL)inBackwards;
|
||||
|
||||
@end
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
CLASS = FindDlgController;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mFindButton = id;
|
||||
mIgnoreCaseBox = id;
|
||||
mSearchBackwardsBox = id;
|
||||
mSearchField = id;
|
||||
mWrapAroundBox = id;
|
||||
mFindButton = NSButton;
|
||||
mIgnoreCaseBox = NSButton;
|
||||
mSearchBackwardsBox = NSButton;
|
||||
mSearchField = NSTextField;
|
||||
mWrapAroundBox = NSButton;
|
||||
};
|
||||
SUPERCLASS = NSWindowController;
|
||||
},
|
||||
|
||||
BIN
mozilla/chimera/English.lproj/FindDialog.nib/objects.nib
generated
BIN
mozilla/chimera/English.lproj/FindDialog.nib/objects.nib
generated
Binary file not shown.
10
mozilla/chimera/FindDialog.nib/classes.nib
generated
10
mozilla/chimera/FindDialog.nib/classes.nib
generated
@@ -5,11 +5,11 @@
|
||||
CLASS = FindDlgController;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mFindButton = id;
|
||||
mIgnoreCaseBox = id;
|
||||
mSearchBackwardsBox = id;
|
||||
mSearchField = id;
|
||||
mWrapAroundBox = id;
|
||||
mFindButton = NSButton;
|
||||
mIgnoreCaseBox = NSButton;
|
||||
mSearchBackwardsBox = NSButton;
|
||||
mSearchField = NSTextField;
|
||||
mWrapAroundBox = NSButton;
|
||||
};
|
||||
SUPERCLASS = NSWindowController;
|
||||
},
|
||||
|
||||
BIN
mozilla/chimera/FindDialog.nib/objects.nib
generated
BIN
mozilla/chimera/FindDialog.nib/objects.nib
generated
Binary file not shown.
@@ -39,11 +39,11 @@
|
||||
#include "nsIWebBrowserFind.h"
|
||||
|
||||
@interface FindDlgController : NSWindowController {
|
||||
IBOutlet id mSearchField;
|
||||
IBOutlet id mIgnoreCaseBox;
|
||||
IBOutlet id mWrapAroundBox;
|
||||
IBOutlet id mSearchBackwardsBox;
|
||||
IBOutlet id mFindButton;
|
||||
IBOutlet NSTextField* mSearchField;
|
||||
IBOutlet NSButton* mIgnoreCaseBox;
|
||||
IBOutlet NSButton* mWrapAroundBox;
|
||||
IBOutlet NSButton* mSearchBackwardsBox;
|
||||
IBOutlet NSButton* mFindButton;
|
||||
|
||||
NSString* mSearchText;
|
||||
}
|
||||
|
||||
@@ -70,8 +70,15 @@
|
||||
NSWindowController* controller = [[NSApp mainWindow] windowController];
|
||||
if ( [controller conformsToProtocol:@protocol(CHFind)] ) {
|
||||
id<CHFind> browserController = controller;
|
||||
BOOL ignoreCase = [mIgnoreCaseBox state];
|
||||
BOOL wrapSearch = [mWrapAroundBox state];
|
||||
BOOL searchBack = [mSearchBackwardsBox state];
|
||||
|
||||
[self storeSearchText:[mSearchField stringValue]];
|
||||
BOOL found = [browserController findInPage:mSearchText];
|
||||
|
||||
BOOL found = [browserController findInPageWithPattern:mSearchText caseSensitive:!ignoreCase
|
||||
wrap:wrapSearch backwards:searchBack];
|
||||
|
||||
if ( found )
|
||||
[self close];
|
||||
else
|
||||
@@ -93,7 +100,12 @@
|
||||
NSWindowController* controller = [[NSApp mainWindow] windowController];
|
||||
if ( [controller conformsToProtocol:@protocol(CHFind)] ) {
|
||||
id<CHFind> browserController = controller;
|
||||
BOOL found = [browserController findInPage:mSearchText];
|
||||
BOOL ignoreCase = [mIgnoreCaseBox state];
|
||||
BOOL wrapSearch = [mWrapAroundBox state];
|
||||
BOOL searchBack = [mSearchBackwardsBox state];
|
||||
|
||||
BOOL found = [browserController findInPageWithPattern:mSearchText caseSensitive:!ignoreCase
|
||||
wrap:wrapSearch backwards:searchBack];
|
||||
if ( !found )
|
||||
NSBeep();
|
||||
}
|
||||
@@ -101,7 +113,6 @@
|
||||
NSBeep();
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// controlTextDidChange
|
||||
//
|
||||
@@ -115,7 +126,6 @@
|
||||
[mFindButton setEnabled:PR_FALSE];
|
||||
}
|
||||
|
||||
|
||||
- (void)storeSearchText:(NSString*)inText
|
||||
{
|
||||
[mSearchText autorelease];
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
CLASS = FindDlgController;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mFindButton = id;
|
||||
mIgnoreCaseBox = id;
|
||||
mSearchBackwardsBox = id;
|
||||
mSearchField = id;
|
||||
mWrapAroundBox = id;
|
||||
mFindButton = NSButton;
|
||||
mIgnoreCaseBox = NSButton;
|
||||
mSearchBackwardsBox = NSButton;
|
||||
mSearchField = NSTextField;
|
||||
mWrapAroundBox = NSButton;
|
||||
};
|
||||
SUPERCLASS = NSWindowController;
|
||||
},
|
||||
|
||||
Binary file not shown.
@@ -32,6 +32,7 @@
|
||||
|
||||
@protocol CHFind
|
||||
|
||||
- (BOOL)findInPage:(NSString*)text;
|
||||
- (BOOL)findInPageWithPattern:(NSString*)text caseSensitive:(BOOL)inCaseSensitive
|
||||
wrap:(BOOL)inWrap backwards:(BOOL)inBackwards;
|
||||
|
||||
@end
|
||||
|
||||
@@ -39,11 +39,11 @@
|
||||
#include "nsIWebBrowserFind.h"
|
||||
|
||||
@interface FindDlgController : NSWindowController {
|
||||
IBOutlet id mSearchField;
|
||||
IBOutlet id mIgnoreCaseBox;
|
||||
IBOutlet id mWrapAroundBox;
|
||||
IBOutlet id mSearchBackwardsBox;
|
||||
IBOutlet id mFindButton;
|
||||
IBOutlet NSTextField* mSearchField;
|
||||
IBOutlet NSButton* mIgnoreCaseBox;
|
||||
IBOutlet NSButton* mWrapAroundBox;
|
||||
IBOutlet NSButton* mSearchBackwardsBox;
|
||||
IBOutlet NSButton* mFindButton;
|
||||
|
||||
NSString* mSearchText;
|
||||
}
|
||||
|
||||
@@ -70,8 +70,15 @@
|
||||
NSWindowController* controller = [[NSApp mainWindow] windowController];
|
||||
if ( [controller conformsToProtocol:@protocol(CHFind)] ) {
|
||||
id<CHFind> browserController = controller;
|
||||
BOOL ignoreCase = [mIgnoreCaseBox state];
|
||||
BOOL wrapSearch = [mWrapAroundBox state];
|
||||
BOOL searchBack = [mSearchBackwardsBox state];
|
||||
|
||||
[self storeSearchText:[mSearchField stringValue]];
|
||||
BOOL found = [browserController findInPage:mSearchText];
|
||||
|
||||
BOOL found = [browserController findInPageWithPattern:mSearchText caseSensitive:!ignoreCase
|
||||
wrap:wrapSearch backwards:searchBack];
|
||||
|
||||
if ( found )
|
||||
[self close];
|
||||
else
|
||||
@@ -93,7 +100,12 @@
|
||||
NSWindowController* controller = [[NSApp mainWindow] windowController];
|
||||
if ( [controller conformsToProtocol:@protocol(CHFind)] ) {
|
||||
id<CHFind> browserController = controller;
|
||||
BOOL found = [browserController findInPage:mSearchText];
|
||||
BOOL ignoreCase = [mIgnoreCaseBox state];
|
||||
BOOL wrapSearch = [mWrapAroundBox state];
|
||||
BOOL searchBack = [mSearchBackwardsBox state];
|
||||
|
||||
BOOL found = [browserController findInPageWithPattern:mSearchText caseSensitive:!ignoreCase
|
||||
wrap:wrapSearch backwards:searchBack];
|
||||
if ( !found )
|
||||
NSBeep();
|
||||
}
|
||||
@@ -101,7 +113,6 @@
|
||||
NSBeep();
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// controlTextDidChange
|
||||
//
|
||||
@@ -115,7 +126,6 @@
|
||||
[mFindButton setEnabled:PR_FALSE];
|
||||
}
|
||||
|
||||
|
||||
- (void)storeSearchText:(NSString*)inText
|
||||
{
|
||||
[mSearchText autorelease];
|
||||
|
||||
Reference in New Issue
Block a user