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

version 1.9, 2002/02/04 11:11:34 version 1.10, 2002/02/05 00:16:30
Line 5 Line 5
 #import "MainController.h"  #import "MainController.h"
 #import "BrowserWindowController.h"  #import "BrowserWindowController.h"
   
   #include "nsCOMPtr.h"
   #include "nsIServiceManager.h"
   #include "nsIIOService.h"
   
   static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
   
 @implementation MainController  @implementation MainController
   
 -(void)awakeFromNib  -(void)awakeFromNib
 {  {
     [self newWindow: self];      [self newWindow: self];
       
       // Initialize offline mode.
       mOffline = NO;
       nsCOMPtr<nsIIOService> ioService(do_GetService(ioServiceContractID));
       if (!ioService)
           return;
       PRBool offline = PR_FALSE;
       ioService->GetOffline(&offline);
       mOffline = offline;
       
       // Set the menu item's text to "Go Online" if we're currently
       // offline.
       if (mOffline)
           [mOfflineMenuItem setTitle: @"Go Online"];
 }  }
   
 -(IBAction)newWindow:(id)aSender  -(IBAction)newWindow:(id)aSender
Line 69 Line 89
   
 -(IBAction) toggleOfflineMode:(id)aSender  -(IBAction) toggleOfflineMode:(id)aSender
 {  {
  // XXXdwh Write me!    nsCOMPtr<nsIIOService> ioService(do_GetService(ioServiceContractID));
     if (!ioService)
         return;
     PRBool offline = PR_FALSE;
     ioService->GetOffline(&offline);
     ioService->SetOffline(!offline);
     mOffline = !offline;
     
     // Update the menu item text.
     // Set the menu item's text to "Go Online" if we're currently
     // offline.
     if (mOffline)
         [mOfflineMenuItem setTitle: @"Go Online"];
     else
         [mOfflineMenuItem setTitle: @"Work Offline"];
         
     // Indicate that we are working offline.
     
 }  }
   
 -(IBAction) back:(id)aSender  -(IBAction) back:(id)aSender

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


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