Diff for /chimera/MyBrowserView.mm between versions 1.9 and 1.10

version 1.9, 2002/02/04 07:15:33 version 1.10, 2002/02/05 00:16:30
Line 4 Line 4
   
 #import "MyBrowserView.h"  #import "MyBrowserView.h"
   
   #include "nsCOMPtr.h"
   #include "nsIServiceManager.h"
   #include "nsIIOService.h"
   
 #define DOCUMENT_DONE_STRING @"Document: Done"  #define DOCUMENT_DONE_STRING @"Document: Done"
 #define LOADING_STRING @"Loading..."  #define LOADING_STRING @"Loading..."
   
   static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
   
 @implementation MyBrowserView  @implementation MyBrowserView
   
 -(void)windowClosed  -(void)windowClosed
Line 44 Line 50
       
   [progress retain];    [progress retain];
   [progress removeFromSuperview];    [progress removeFromSuperview];
     
     nsCOMPtr<nsIIOService> ioService(do_GetService(ioServiceContractID));
     if (!ioService)
       return;
     PRBool offline = PR_FALSE;
     ioService->GetOffline(&offline);
     mOffline = offline;
 }  }
   
 - (void)setFrame:(NSRect)frameRect  - (void)setFrame:(NSRect)frameRect
Line 148 Line 161
   
 - (void)setTitle:(NSString *)title  - (void)setTitle:(NSString *)title
 {  {
    if ( (title) && (! [title isEqualToString:@""]) ) {    if (mOffline) {
        [[mWindowController window] setTitle:title];        NSString* newTitle;
    } else {        if (title && ![title isEqualToString:@""])
        [[mWindowController window] setTitle:@"Untitled"];            newTitle = [title stringByAppendingString: @" [Working Offline]"];
         else
             newTitle = @"Untitled [Working Offline]";
         [[mWindowController window] setTitle: newTitle];
     }
     else {
         if (title && ![title isEqualToString:@""])
             [[mWindowController window] setTitle:title];
         else
             [[mWindowController window] setTitle:@"Untitled"];
     }      }
 }  }
   

Removed from v.1.9  
changed lines
  Added in v.1.10


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