Diff for /chimera/ContentClickListener.mm between versions 1.8 and 1.9

version 1.8, 2002/04/14 00:08:17 version 1.9, 2002/04/14 08:43:03
Line 93  ContentClickListener::MouseClick(nsIDOME Line 93  ContentClickListener::MouseClick(nsIDOME
   mouseEvent->GetMetaKey(&metaKey);    mouseEvent->GetMetaKey(&metaKey);
   mouseEvent->GetShiftKey(&shiftKey);    mouseEvent->GetShiftKey(&shiftKey);
   mouseEvent->GetAltKey(&altKey);    mouseEvent->GetAltKey(&altKey);
   
     NSString* hrefStr = [NSString stringWithCharacters: href.get() length:nsCRT::strlen(href.get())];
     NSURL* linkURL = [NSURL URLWithString: hrefStr];
   
   if ((metaKey && button == 0) || button == 1) {    if ((metaKey && button == 0) || button == 1) {
     // The command key is down or we got a middle click.  Open the link in a new window or tab.      // The command key is down or we got a middle click.  Open the link in a new window or tab.
     PRBool useTab;      PRBool useTab;
     pref->GetBoolPref("browser.tabs.opentabfor.middleclick", &useTab);      pref->GetBoolPref("browser.tabs.opentabfor.middleclick", &useTab);
   
     NSString* hrefStr = [NSString stringWithCharacters: href.get() length:nsCRT::strlen(href.get())];  
     NSURL* urlToLoad = [NSURL URLWithString: hrefStr];  
   
     PRBool loadInBackground;      PRBool loadInBackground;
     pref->GetBoolPref("browser.tabs.loadInBackground", &loadInBackground);      pref->GetBoolPref("browser.tabs.loadInBackground", &loadInBackground);
     if (shiftKey)      if (shiftKey)
       loadInBackground = !loadInBackground;        loadInBackground = !loadInBackground;
     if (useTab)      if (useTab)
      [mBrowserController openNewTabWithURL: urlToLoad loadInBackground: loadInBackground];      [mBrowserController openNewTabWithURL: linkURL loadInBackground: loadInBackground];
     else      else
      [mBrowserController openNewWindowWithURL: urlToLoad loadInBackground: loadInBackground];      [mBrowserController openNewWindowWithURL: linkURL loadInBackground: loadInBackground];
   }    }
   else if (altKey) {    else if (altKey) {
     // The user wants to save this link.      // The user wants to save this link.
     nsAutoString text;      nsAutoString text;
     GeckoUtils::GatherTextUnder(content, text);      GeckoUtils::GatherTextUnder(content, text);
   
       [mBrowserController saveURL: nil filterList: nil
                 url: linkURL suggestedFilename: [NSString stringWithCharacters: text.get()
                                                                         length: nsCRT::strlen(text.get())]];
   }    }
   
   return NS_OK;    return NS_OK;

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


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