зеркало из https://github.com/mozilla/pjs.git
Fixing bug 154069; hooking up additional find options. Also did some file detabbing. r=ccarlen/pinkerton.
This commit is contained in:
Родитель
752fcbe9fd
Коммит
97571663be
|
@ -1,37 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 2002 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Mike Pinkerton <pinkerton@netscape.com> (Original Author)
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
//
|
||||
// protocol CHFind
|
||||
//
|
||||
// Any window who wants to be able to work with the Find dialog should implement
|
||||
// this protocol.
|
||||
//
|
||||
|
||||
@protocol CHFind
|
||||
|
||||
- (BOOL)findInPage:(NSString*)text;
|
||||
|
||||
@end
|
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
IBClasses = (
|
||||
{
|
||||
ACTIONS = {find = id; };
|
||||
CLASS = FindDlgController;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mFindButton = id;
|
||||
mIgnoreCaseBox = id;
|
||||
mSearchBackwardsBox = id;
|
||||
mSearchField = id;
|
||||
mWrapAroundBox = id;
|
||||
};
|
||||
SUPERCLASS = NSWindowController;
|
||||
},
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
Двоичный файл не отображается.
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
IBClasses = (
|
||||
{
|
||||
ACTIONS = {find = id; };
|
||||
CLASS = FindDlgController;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mFindButton = id;
|
||||
mIgnoreCaseBox = id;
|
||||
mSearchBackwardsBox = id;
|
||||
mSearchField = id;
|
||||
mWrapAroundBox = id;
|
||||
};
|
||||
SUPERCLASS = NSWindowController;
|
||||
},
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
Двоичный файл не отображается.
|
@ -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;
|
||||
},
|
||||
|
|
Двоичный файл не отображается.
|
@ -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];
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 2002 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Mike Pinkerton <pinkerton@netscape.com> (Original Author)
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
//
|
||||
// protocol CHFind
|
||||
//
|
||||
// Any window who wants to be able to work with the Find dialog should implement
|
||||
// this protocol.
|
||||
//
|
||||
|
||||
@protocol CHFind
|
||||
|
||||
- (BOOL)findInPage:(NSString*)text;
|
||||
|
||||
@end
|
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
IBClasses = (
|
||||
{
|
||||
ACTIONS = {find = id; };
|
||||
CLASS = FindDlgController;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mFindButton = id;
|
||||
mIgnoreCaseBox = id;
|
||||
mSearchBackwardsBox = id;
|
||||
mSearchField = id;
|
||||
mWrapAroundBox = id;
|
||||
};
|
||||
SUPERCLASS = NSWindowController;
|
||||
},
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
Двоичный файл не отображается.
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
IBClasses = (
|
||||
{
|
||||
ACTIONS = {find = id; };
|
||||
CLASS = FindDlgController;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mFindButton = id;
|
||||
mIgnoreCaseBox = id;
|
||||
mSearchBackwardsBox = id;
|
||||
mSearchField = id;
|
||||
mWrapAroundBox = id;
|
||||
};
|
||||
SUPERCLASS = NSWindowController;
|
||||
},
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
Двоичный файл не отображается.
|
@ -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;
|
||||
},
|
||||
|
|
Двоичные данные
chimera/resources/localized/English.lproj/FindDialog.nib/objects.nib
сгенерированный
Двоичные данные
chimera/resources/localized/English.lproj/FindDialog.nib/objects.nib
сгенерированный
Двоичный файл не отображается.
|
@ -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];
|
||||
|
|
Загрузка…
Ссылка в новой задаче