Fix bug 157950: make sure that Find Again is disabled if there is no search string stored. Also changed the Find dialog behaviour to stay up when you hit Find (as it should, since it's a panel), to default to 'wrap' and 'ignore case' being on, and added key shortcuts for the checkboxes.

This commit is contained in:
sfraser%netscape.com 2002-07-25 00:42:53 +00:00
Родитель 6fdc84bae1
Коммит fe26729757
24 изменённых файлов: 42 добавлений и 243 удалений

12
camino/English.lproj/FindDialog.nib/info.nib сгенерированный
Просмотреть файл

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">
<dict>
<key>IBDocumentLocation</key>
<string>293 321 356 240 0 0 1152 746 </string>
<key>IBFramework Version</key>
<string>248.0</string>
<key>IBSystem Version</key>
<string>5S66</string>
</dict>
</plist>

Двоичные данные
camino/English.lproj/FindDialog.nib/objects.nib сгенерированный

Двоичный файл не отображается.

12
camino/FindDialog.nib/info.nib сгенерированный
Просмотреть файл

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">
<dict>
<key>IBDocumentLocation</key>
<string>293 321 356 240 0 0 1152 746 </string>
<key>IBFramework Version</key>
<string>248.0</string>
<key>IBSystem Version</key>
<string>5S66</string>
</dict>
</plist>

Двоичные данные
camino/FindDialog.nib/objects.nib сгенерированный

Двоичный файл не отображается.

Просмотреть файл

@ -1,58 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* 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 mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#import <AppKit/AppKit.h>
#include "nsIWebBrowserFind.h"
@interface FindDlgController : NSWindowController {
IBOutlet NSTextField* mSearchField;
IBOutlet NSButton* mIgnoreCaseBox;
IBOutlet NSButton* mWrapAroundBox;
IBOutlet NSButton* mSearchBackwardsBox;
IBOutlet NSButton* mFindButton;
NSString* mSearchText;
}
-(IBAction) find: (id)aSender;
-(IBAction) findAgain: (id)aSender;
-(void) storeSearchText:(NSString*)inText;
// delegates for NSTextView
- (void)controlTextDidChange:(NSNotification *)aNotification;
@end

Просмотреть файл

@ -80,10 +80,9 @@
BOOL found = [browserController findInPageWithPattern:mSearchText caseSensitive:!ignoreCase
wrap:wrapSearch backwards:searchBack];
if ( found )
[self close];
else
if (! found )
NSBeep();
// we stay open
}
else
NSBeep();
@ -133,4 +132,10 @@
mSearchText = inText;
[mSearchText retain];
}
- (NSString*)getSearchText
{
return mSearchText;
}
@end

Просмотреть файл

@ -613,7 +613,7 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
// check if someone has previously done a find before allowing findAgain to be enabled
if (action == @selector(findAgain:)) {
if ([self isMainWindowABrowserWindow])
return (mFindDialog != nil);
return (mFindDialog && [[mFindDialog getSearchText] length] > 0);
else
return NO;
}

Просмотреть файл

@ -3,7 +3,7 @@
<plist version="0.9">
<dict>
<key>IBDocumentLocation</key>
<string>293 321 356 240 0 0 1152 746 </string>
<string>180 86 356 240 0 0 1152 746 </string>
<key>IBFramework Version</key>
<string>248.0</string>
<key>IBSystem Version</key>

Двоичные данные
camino/resources/localized/English.lproj/FindDialog.nib/objects.nib сгенерированный

Двоичный файл не отображается.

Просмотреть файл

@ -613,7 +613,7 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
// check if someone has previously done a find before allowing findAgain to be enabled
if (action == @selector(findAgain:)) {
if ([self isMainWindowABrowserWindow])
return (mFindDialog != nil);
return (mFindDialog && [[mFindDialog getSearchText] length] > 0);
else
return NO;
}

Просмотреть файл

@ -48,9 +48,10 @@
NSString* mSearchText;
}
-(IBAction) find: (id)aSender;
-(IBAction) findAgain: (id)aSender;
-(void) storeSearchText:(NSString*)inText;
- (IBAction) find: (id)aSender;
- (IBAction) findAgain: (id)aSender;
- (void) storeSearchText:(NSString*)inText;
- (NSString*)getSearchText;
// delegates for NSTextView
- (void)controlTextDidChange:(NSNotification *)aNotification;

Просмотреть файл

@ -80,10 +80,9 @@
BOOL found = [browserController findInPageWithPattern:mSearchText caseSensitive:!ignoreCase
wrap:wrapSearch backwards:searchBack];
if ( found )
[self close];
else
if (! found )
NSBeep();
// we stay open
}
else
NSBeep();
@ -133,4 +132,10 @@
mSearchText = inText;
[mSearchText retain];
}
- (NSString*)getSearchText
{
return mSearchText;
}
@end

12
chimera/English.lproj/FindDialog.nib/info.nib сгенерированный
Просмотреть файл

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">
<dict>
<key>IBDocumentLocation</key>
<string>293 321 356 240 0 0 1152 746 </string>
<key>IBFramework Version</key>
<string>248.0</string>
<key>IBSystem Version</key>
<string>5S66</string>
</dict>
</plist>

Двоичные данные
chimera/English.lproj/FindDialog.nib/objects.nib сгенерированный

Двоичный файл не отображается.

12
chimera/FindDialog.nib/info.nib сгенерированный
Просмотреть файл

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">
<dict>
<key>IBDocumentLocation</key>
<string>293 321 356 240 0 0 1152 746 </string>
<key>IBFramework Version</key>
<string>248.0</string>
<key>IBSystem Version</key>
<string>5S66</string>
</dict>
</plist>

Двоичные данные
chimera/FindDialog.nib/objects.nib сгенерированный

Двоичный файл не отображается.

Просмотреть файл

@ -1,58 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* 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 mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#import <AppKit/AppKit.h>
#include "nsIWebBrowserFind.h"
@interface FindDlgController : NSWindowController {
IBOutlet NSTextField* mSearchField;
IBOutlet NSButton* mIgnoreCaseBox;
IBOutlet NSButton* mWrapAroundBox;
IBOutlet NSButton* mSearchBackwardsBox;
IBOutlet NSButton* mFindButton;
NSString* mSearchText;
}
-(IBAction) find: (id)aSender;
-(IBAction) findAgain: (id)aSender;
-(void) storeSearchText:(NSString*)inText;
// delegates for NSTextView
- (void)controlTextDidChange:(NSNotification *)aNotification;
@end

Просмотреть файл

@ -80,10 +80,9 @@
BOOL found = [browserController findInPageWithPattern:mSearchText caseSensitive:!ignoreCase
wrap:wrapSearch backwards:searchBack];
if ( found )
[self close];
else
if (! found )
NSBeep();
// we stay open
}
else
NSBeep();
@ -133,4 +132,10 @@
mSearchText = inText;
[mSearchText retain];
}
- (NSString*)getSearchText
{
return mSearchText;
}
@end

Просмотреть файл

@ -613,7 +613,7 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
// check if someone has previously done a find before allowing findAgain to be enabled
if (action == @selector(findAgain:)) {
if ([self isMainWindowABrowserWindow])
return (mFindDialog != nil);
return (mFindDialog && [[mFindDialog getSearchText] length] > 0);
else
return NO;
}

Просмотреть файл

@ -3,7 +3,7 @@
<plist version="0.9">
<dict>
<key>IBDocumentLocation</key>
<string>293 321 356 240 0 0 1152 746 </string>
<string>180 86 356 240 0 0 1152 746 </string>
<key>IBFramework Version</key>
<string>248.0</string>
<key>IBSystem Version</key>

Двоичные данные
chimera/resources/localized/English.lproj/FindDialog.nib/objects.nib сгенерированный

Двоичный файл не отображается.

Просмотреть файл

@ -613,7 +613,7 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
// check if someone has previously done a find before allowing findAgain to be enabled
if (action == @selector(findAgain:)) {
if ([self isMainWindowABrowserWindow])
return (mFindDialog != nil);
return (mFindDialog && [[mFindDialog getSearchText] length] > 0);
else
return NO;
}

Просмотреть файл

@ -1,58 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* 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 mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#import <AppKit/AppKit.h>
#include "nsIWebBrowserFind.h"
@interface FindDlgController : NSWindowController {
IBOutlet NSTextField* mSearchField;
IBOutlet NSButton* mIgnoreCaseBox;
IBOutlet NSButton* mWrapAroundBox;
IBOutlet NSButton* mSearchBackwardsBox;
IBOutlet NSButton* mFindButton;
NSString* mSearchText;
}
-(IBAction) find: (id)aSender;
-(IBAction) findAgain: (id)aSender;
-(void) storeSearchText:(NSString*)inText;
// delegates for NSTextView
- (void)controlTextDidChange:(NSNotification *)aNotification;
@end

Просмотреть файл

@ -80,10 +80,9 @@
BOOL found = [browserController findInPageWithPattern:mSearchText caseSensitive:!ignoreCase
wrap:wrapSearch backwards:searchBack];
if ( found )
[self close];
else
if (! found )
NSBeep();
// we stay open
}
else
NSBeep();
@ -133,4 +132,10 @@
mSearchText = inText;
[mSearchText retain];
}
- (NSString*)getSearchText
{
return mSearchText;
}
@end