changeset 379:2c468e058583 branch-2.0 tip

Fixes for SeaMonkey and Thunderbird
author Philip Chee <philip.chee@gmail.com>
date Mon, 14 Dec 2009 10:29:09 -0800
parents a827ef1d27ae
children
files extension.properties src/chrome/content/crashreports/sidebar.js src/chrome/content/crashreports/sidebar.xul src/chrome/content/messenger.js src/chrome/content/messengerOverlay.xul src/chrome/content/suite.js src/chrome/content/suiteOverlay.xul src/install.rdf
diffstat 8 files changed, 80 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/extension.properties
+++ b/extension.properties
@@ -1,5 +1,5 @@
 name=nightly
 guid={8620c15f-30dc-4dba-a131-7c5d20cf4a29}
-version=2.0.3
+version=2.0.4pre
 chromejar=nightly
 globalxpt=nightly
--- a/src/chrome/content/crashreports/sidebar.js
+++ b/src/chrome/content/crashreports/sidebar.js
@@ -95,17 +95,10 @@ selectedCommand: function(event)
 clickCommand: function(event)
 {
   var tree = document.getElementById("tree");
   var row = {}, col = {};
   tree.treeBoxObject.getCellAt(event.clientX, event.clientY, row, col, {});
   sidebar.command(tree, event, row.value);
 },
 
-checkPopup: function(event)
-{
-  var tree = document.getElementById("tree");
-  var type = tree.view.getCellText(tree.currentIndex, tree.columns.getNamedColumn("type"));
-  return type=="incident";
-},
-
 QueryInterface: XPCOMUtils.generateQI([Ci.nttIBreakpadProgressListener])
 }
--- a/src/chrome/content/crashreports/sidebar.xul
+++ b/src/chrome/content/crashreports/sidebar.xul
@@ -48,17 +48,17 @@
 <?xml-stylesheet href="chrome://nightly/skin/crashreports/sidebar.css"?>
 
 <page id="CrashReportsSidebar" onload="sidebar.init();"
       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
   
   <script src="sidebar.js"/>
   
   <popupset>
-    <popup id="crashReportContext" onpopupshowing="return sidebar.checkPopup(event)">
+    <popup id="crashReportContext">
       <menuitem oncommand="sidebar.copy(event)" label="&nightly.crashreports.copyid;"/>
     </popup>
   </popupset>
   
   <vbox id="loading" align="center" pack="center" flex="1">
     <label style="font-size: 150%;" value="&nightly.leaks.loading.label;"/>
   </vbox>
   
--- a/src/chrome/content/messenger.js
+++ b/src/chrome/content/messenger.js
@@ -44,16 +44,20 @@ init: function()
 {
   var brandbundle = document.getElementById("bundle_brand");
   if (nightly.variables.name==null)
   {
     nightly.variables.name=brandbundle.getString("brandShortName");
   }
   nightly.variables.defaulttitle=brandbundle.getString("brandShortName");
   nightly.variables.brandname=brandbundle.getString("brandFullName");
+  if (!("toggleSidebar" in window)) {
+    document.getElementById("viewCrashReportsSidebar").hidden = true;
+    document.getElementById("nightly-menu-crashreports-sep").hidden = true;
+  }
 },
 
 openURL: function(url, event)
 {
   var uri = Components.classes["@mozilla.org/network/io-service;1"]
                       .getService(Components.interfaces.nsIIOService)
                       .newURI(url, null, null);
 
--- a/src/chrome/content/messengerOverlay.xul
+++ b/src/chrome/content/messengerOverlay.xul
@@ -44,25 +44,40 @@
 %leaksDTD;
 ]>
 
 <overlay id="NightlyMessengerOverlay"
          xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
        
   <script type="application/x-javascript" src="nightly.js" />
   <script type="application/x-javascript" src="messenger.js" />
-  <script type="application/x-javascript" src="breakpad/breakpad.js" />
+  <script type="application/x-javascript" src="crashreports/crashreports.js" />
   <script type="application/x-javascript" src="chrome://nightly/content/platform.js" />
 
+  <!-- Sidebar -->
+  <broadcasterset id="mainBroadcasterSet">
+    <broadcaster id="viewCrashReportsSidebar"
+                 autoCheck="false"
+                 label="&nightly.crashreports.sidebar.title;"
+                 type="checkbox"
+                 group="sidebar"
+                 sidebarurl="chrome://nightly/content/crashreports/sidebar.xul"
+                 oncommand="toggleSidebar('viewCrashReportsSidebar');"/>
+  </broadcasterset>
+
+  <menupopup id="viewSidebarMenu">
+    <menuitem observes="viewCrashReportsSidebar"/>
+  </menupopup>
+
   <toolbarpalette id="MailToolbarPalette">
     <toolbarbutton id="nightly-tester-enter"
-            class="toolbarbutton-1"
-            label="&nightly.id.insert.label;"
-            tooltiptext="&nightly.id.insert.tooltip;"
-            oncommand="nightly.insertTemplate('buildid');"/>
+                   class="toolbarbutton-1"
+                   label="&nightly.id.insert.label;"
+                   tooltiptext="&nightly.id.insert.tooltip;"
+                   oncommand="nightly.insertTemplate('buildid');"/>
   </toolbarpalette>
 
   <popupset id="mainPopupSet">
     <tooltip orient="vertical" id="nightly-crashreport-tooltip" onpopupshowing="return crashreports.popupTooltip(event)">
       <label/>
     </tooltip>
     <popup id="nightly-crashreport-context">
       <menuitem oncommand="crashreports.copy(event)" label="&nightly.crashreports.copyid;"/>
@@ -74,17 +89,18 @@
       <menupopup onpopupshowing="nightly.menuPopup(event,this);">
         <menuitem id="build-copy" label="&nightly.id.copy.label;" oncommand="nightly.copyTemplate('buildid');"/>
         <menuitem id="build-insert" label="&nightly.id.insert.label;" oncommand="nightly.insertTemplate('buildid');"/>
         <menuitem id="list-copy" label="&nightly.extensions.copy.label;" oncommand="nightly.copyExtensions();"/>
         <menuitem id="list-insert" label="&nightly.extensions.insert.label;" oncommand="nightly.insertExtensions();"/>
         <menuseparator/>
         <menuitem label="&nightly.openprofile.label;" oncommand="nightly.openProfileDir();"/>
 #include "crashreports/crashreports.inc.xul"
-        <menuseparator/>
+        <menuitem id="nightly-crashreports-sidebar" observes="viewCrashReportsSidebar"/>
+        <menuseparator id="nightly-menu-crashreports-sep"/>
         <menuitem label="&nightly.leakreporter.label;" oncommand="nightlyApp.detectLeaks(event);"/>
         <menuseparator/>
         <menuitem label="&nightly.options.label;" oncommand="nightly.launchOptions();"/>
       </menupopup>
     </menu>
   </menupopup>
   
 </overlay>
--- a/src/chrome/content/suite.js
+++ b/src/chrome/content/suite.js
@@ -32,42 +32,70 @@
 # 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 MPL, the GPL or the LGPL.
 #
 # ***** END LICENSE BLOCK *****
 #
 var nightlyApp = {
 
+storedTitle: document.documentElement.getAttribute("titlemodifier"),
+
 init: function()
 {
   var brandbundle = document.getElementById("bundle_brand");
   if (nightly.variables.name==null)
   {
     nightly.variables.name=brandbundle.getString("brandShortName");
   }
   nightly.variables.brandname=brandbundle.getString("brandFullName");
   nightly.variables.defaulttitle=nightlyApp.storedTitle;
+  document.getElementById("content").addEventListener("DOMTitleChanged",nightlyApp.titleUpdated,false);
+  if (!("toggleSidebar" in window)) {
+    document.getElementById("viewCrashReportsSidebar").hidden = true;
+  }
 },
 
 detectLeaks: function(event)
 {
   this.openURL('chrome://nightly/content/leaks/leaks.xul', event);
 },
 
 openURL: function(url, event)
 {
-  openTopWin(url);
+  if ("openUILink" in window)
+    openUILink(url, event, false, true);
+  else
+    openTopWin(url);
+},
+
+titleUpdated: function()
+{
+  gBrowser.updateTitlebar();
+},
+
+updateTitlebar: function()
+{
+  window.setTimeout("gBrowser.updateTitlebar();", 50);
 },
 
 setCustomTitle: function(title)
 {
+  document.documentElement.setAttribute("titlemodifier",title);
+  document.documentElement.setAttribute("titlemenuseparator"," - ");
+  nightlyApp.updateTitlebar();
 },
 
 setBlankTitle: function()
 {
+  document.documentElement.setAttribute("titlemodifier","");
+  document.documentElement.setAttribute("titlemenuseparator","");
+  nightlyApp.updateTitlebar();
 },
 
 setStandardTitle: function()
 {
+  document.documentElement.setAttribute("titlemodifier",nightlyApp.storedTitle);
+  document.documentElement.setAttribute("titlemenuseparator"," - ");
+  nightlyApp.updateTitlebar();
 }
 
 }
--- a/src/chrome/content/suiteOverlay.xul
+++ b/src/chrome/content/suiteOverlay.xul
@@ -44,55 +44,72 @@
 %leaksDTD;
 ]>
 
 <overlay id="NightlySuiteOverlay"
          xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
        
   <script type="application/x-javascript" src="nightly.js" />
   <script type="application/x-javascript" src="suite.js" />
-  <script type="application/x-javascript" src="breakpad/breakpad.js" />
+  <script type="application/x-javascript" src="session/session.js" />
+  <script type="application/x-javascript" src="crashreports/crashreports.js" />
   <script type="application/x-javascript" src="chrome://nightly/content/platform.js" />
 
   <!-- Sidebar -->
   <broadcasterset id="mainBroadcasterSet">
     <broadcaster id="viewCrashReportsSidebar"
           autoCheck="false" 
           label="&nightly.crashreports.sidebar.title;"
           type="checkbox"
           group="sidebar"
-          sidebarurl="chrome://nightly/content/breakpad/sidebar.xul"
+          sidebarurl="chrome://nightly/content/crashreports/sidebar.xul"
           oncommand="toggleSidebar('viewCrashReportsSidebar');"/>
   </broadcasterset>
 
+  <menupopup id="viewSidebarMenu">
+    <menuitem observes="viewCrashReportsSidebar"/>
+  </menupopup>
+
   <keyset id="navKeys">
     <key key="s" modifiers="accel,shift" oncommand="nightly.getScreenshot();"/>
   </keyset>
 
+  <toolbarpalette id="BrowserToolbarPalette">
+    <toolbarbutton id="nightly-tester-enter"
+            class="toolbarbutton-1"
+            label="&nightly.id.insert.label;"
+            tooltiptext="&nightly.id.insert.tooltip;"
+            oncommand="nightly.insertTemplate('buildid');"/>
+  </toolbarpalette>
+
   <popupset id="mainPopupSet">
     <tooltip orient="vertical" id="nightly-crashreport-tooltip" onpopupshowing="return crashreports.popupTooltip(event)">
       <label/>
     </tooltip>
     <popup id="nightly-crashreport-context">
       <menuitem oncommand="crashreports.copy(event)" label="&nightly.crashreports.copyid;"/>
     </popup>
   </popupset>
   
+  <menupopup id="goPopup">
+    <menuitem id="nightly-session-restore" label="&nightly.session.restore;" insertbefore="endUndoSeparator" oncommand="session.restore()"/>
+  </menupopup>
+
   <menupopup id="taskPopup">
     <menu id="nightly-menu" label="Nightly Tester Tools" insertbefore="sep_switchprofile">
       <menupopup onpopupshowing="nightly.menuPopup(event,this);">
         <menuitem id="build-copy" label="&nightly.id.copy.label;" oncommand="nightly.copyTemplate('buildid');"/>
         <menuitem id="build-insert" label="&nightly.id.insert.label;" oncommand="nightly.insertTemplate('buildid');"/>
         <menuitem id="list-copy" label="&nightly.extensions.copy.label;" oncommand="nightly.copyExtensions();"/>
         <menuitem id="list-insert" label="&nightly.extensions.insert.label;" oncommand="nightly.insertExtensions();"/>
         <menuseparator/>
         <menuitem label="&nightly.openprofile.label;" oncommand="nightly.openProfileDir();"/>
 #include "crashreports/crashreports.inc.xul"
-        <menuitem id="nightly-breakpad-sidebar" observes="viewBreakpadSidebar"/>
+        <menuitem id="nightly-crashreports-sidebar" observes="viewCrashReportsSidebar"/>
         <menuseparator/>
-        <menuitem label="&nightly.leakreporter.label;" oncommand="nightlyApp.detectLeaks(event);"/>
+        <menuitem label="&nightly.leakreporter.label;" oncommand="nightlyApp.detectLeaks(event);" onclick="checkForMiddleClick(this, event);"/>
         <menuseparator/>
         <menuitem label="&nightly.options.label;" oncommand="nightly.launchOptions();"/>
       </menupopup>
     </menu>
   </menupopup>
   
 </overlay>
--- a/src/install.rdf
+++ b/src/install.rdf
@@ -72,17 +72,17 @@
 #      </Description>
 #    </em:targetApplication>
 
     <!-- Suiterunner version -->
     <em:targetApplication>
       <Description>
         <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id>
         <em:minVersion>2.0a1pre</em:minVersion>
-        <em:maxVersion>2.0b1pre</em:maxVersion>
+        <em:maxVersion>2.0.*</em:maxVersion>
       </Description>
     </em:targetApplication>
 	
     <!-- Songbird version -->
     <em:targetApplication>
       <Description>
         <em:id>songbird@songbirdnest.com</em:id>
         <em:minVersion>0.6pre</em:minVersion>
@@ -94,15 +94,16 @@
     <em:name>Nightly Tester Tools</em:name>
     <em:description>Useful tools for the nightly tester.</em:description>
     <em:creator>Mossop</em:creator>
     <em:contributor>Peter van der Woude (original idea)</em:contributor>
     <em:contributor>Jesse Ruderman (Mac fixes)</em:contributor>
     <em:contributor>Steve England (QA)</em:contributor>
     <em:contributor>Stephen Lau (Songbird port)</em:contributor>
     <em:contributor>FAMFAMFAM (Some icons)</em:contributor>
+    <em:contributor>Philip Chee (SeaMonkey and Thunderbird fixes)</em:contributor>
 
     <em:iconURL>chrome://nightly/content/brand/icon.png</em:iconURL>
     <em:optionsURL>chrome://nightly/content/options/options.xul</em:optionsURL>
     <em:homepageURL>http://www.oxymoronical.com/web/firefox/${extension.name}</em:homepageURL>
     
   </Description>      
 </RDF>