[Phoenix-commits] rev 16919 - public/ulysses/src/trunk/ulysses/prototypes/prototype1/src/chrome/content

andi at wyona.com andi at wyona.com
Tue Aug 22 22:13:47 CEST 2006


Author: andi
Date: 2006-08-22 22:13:46 +0200 (Tue, 22 Aug 2006)
New Revision: 16919

Modified:
   public/ulysses/src/trunk/ulysses/prototypes/prototype1/src/chrome/content/editor.js
   public/ulysses/src/trunk/ulysses/prototypes/prototype1/src/chrome/content/ulysses.js
Log:
Added Ulysses favicon to editor tab.


Modified: public/ulysses/src/trunk/ulysses/prototypes/prototype1/src/chrome/content/editor.js
===================================================================
--- public/ulysses/src/trunk/ulysses/prototypes/prototype1/src/chrome/content/editor.js	2006-08-22 19:57:02 UTC (rev 16918)
+++ public/ulysses/src/trunk/ulysses/prototypes/prototype1/src/chrome/content/editor.js	2006-08-22 20:13:46 UTC (rev 16919)
@@ -30,6 +30,7 @@
 const ULYSSES_EDITOR_CHROME_URI         = "chrome://ulysses/content/editor.xul";
 const ULYSSES_CONFIRMCLOSE_CHROME_URI   = "chrome://ulysses/content/confirmclose.xul";
 const ULYSSES_AUTHENTICATION_CHROME_URI = "chrome://ulysses/content/authentication.xul";
+const ULYSSES_FAVICON_CHROME_URI        = "chrome://ulysses/skin/icons/ulysses-logo.png";
 
 var gMainBrowserWindow  = null;
 var gControlledShutdown = false;
@@ -75,7 +76,10 @@
                 instanceID = window.location.search.slice(1);
 
                 if (parameterObject = gMainBrowserWindow.ulysses.instancesManager.retrieveInstance(instanceID)) {
-                    // retrieve our parameters and instantiate the editor
+                    // set favicon
+                    gMainBrowserWindow.getBrowser().setIcon(parameterObject.tab, ULYSSES_FAVICON_CHROME_URI);
+
+                    // instantiate the editor
                     new UlyssesEditController(parameterObject);
                 } else {
                     /* Looks like the user hit reload, and therefore the

Modified: public/ulysses/src/trunk/ulysses/prototypes/prototype1/src/chrome/content/ulysses.js
===================================================================
--- public/ulysses/src/trunk/ulysses/prototypes/prototype1/src/chrome/content/ulysses.js	2006-08-22 19:57:02 UTC (rev 16918)
+++ public/ulysses/src/trunk/ulysses/prototypes/prototype1/src/chrome/content/ulysses.js	2006-08-22 20:13:46 UTC (rev 16919)
@@ -80,9 +80,15 @@
         // construct target URI
         targetURI = ULYSSES_EDITOR_CHROME_URI + "?" + instanceID;
 
-        // getBrowser() (defined in browser.js) returns a reference to the Tabbrowser element
-        ulyssesTab = self.getBrowser().addTab(targetURI);
+        // create a new tab (getBrowser() (defined in browser.js) returns a reference to the Tabbrowser element)
+        ulyssesTab = self.getBrowser().addTab("");
 
+        // pass the newly created tab to the instances manager so the editor instance can retrieve it later
+        gInstancesManager.retrieveInstance(instanceID).tab = ulyssesTab;
+
+        // load editor
+        self.getBrowser().getBrowserForTab(ulyssesTab).loadURI(targetURI, null, null);
+
         // switch ui to newly created tab
         self.getBrowser().selectedTab = ulyssesTab;
     } catch (exception) {




More information about the Phoenix-commits mailing list