Diff for /chimera/FindDlgController.mm between versions 1.6 and 1.7

version 1.6, 2002/04/10 19:35:08 version 1.7, 2002/04/12 19:45:37
Line 36 Line 36
  * ***** END LICENSE BLOCK ***** */   * ***** END LICENSE BLOCK ***** */
   
 #import "FindDlgController.h"  #import "FindDlgController.h"
   #import "BrowserWindowController.h"
   #import "Find.h"
 #include "nsCOMPtr.h"  #include "nsCOMPtr.h"
   
 @implementation FindDlgController  @implementation FindDlgController
   
 - (void)windowDidLoad  - (void)windowDidLoad
 {  {
     mWebFind = nsnull;  
 }  }
   
   
 - (void)dealloc  
 {  
     NS_IF_RELEASE(mWebFind);  
     [super dealloc];  
 }  
   
-(void)setFind: (nsIWebBrowserFind*)aFind//
 // -find
 //
 // User clicked the find button, send the action to the window controller of the
 // frontmost browser window. If we found something, hide the window. If not, beep.
 //
 -(IBAction) find: (id)aSender
 {  {
    mWebFind = aFind;  NSWindowController* controller = [[NSApp mainWindow] windowController];
    NS_IF_ADDREF(mWebFind);  if ( [controller conformsToProtocol:@protocol(Find)] ) {
     id<Find> browserController = controller;
     mSearchText = [mSearchField stringValue];
     BOOL found = [browserController findInPage:mSearchText];
     if ( found ) 
       [self close];
     else
       NSBeep();
   }
   else
     NSBeep();
 }  }
   
   
 //  //
// -find// -findAgain
 //  //
// User clicked the find button, send the action to the window controller of the// Someone hit "find again" in the edit menu, send the action to the window controller of the
// frontmost browser window// frontmost browser window. Beep if we didn't find something.
 //  //
-(IBAction) find: (id)aSender-(IBAction) findAgain: (id)aSender
 {  {
   NSWindowController* controller = [[NSApp mainWindow] windowController];    NSWindowController* controller = [[NSApp mainWindow] windowController];
  if ( [controller respondsToSelector:@selector(findInPage:)] )  if ( [controller conformsToProtocol:@protocol(Find)] ) {
    [controller findInPage:[mSearchField stringValue]];    id<Find> browserController = controller;
     BOOL found = [browserController findInPage:mSearchText];
     if ( !found )
       NSBeep();
   }
   else
     NSBeep();
 }  }
   
   

Removed from v.1.6  
changed lines
  Added in v.1.7


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>