mac instant apply fixes
authorjkkn <jkkn>
Fri, 2 Nov 2007 02:55:17 +0000 (02:55 +0000)
committerjkkn <jkkn>
Fri, 2 Nov 2007 02:55:17 +0000 (02:55 +0000)
content/browser_overlay.xul
content/options.js
content/options.xul
content/tv2developer.js
version
webroot/index.html

index 7570721a150844c3b0cf879003aa5404d90311bf..f8cd06ef5dadf60441a8eb591f2a61f65b192aa8 100755 (executable)
 <popupset id="mainPopupSet">
     <popup id="tv2developer-contextmenu">
         <menuitem label="&config.label;..." accesskey="&config.accesskey;"
-                  oncommand="window.openDialog('chrome://tv2developer/content/options.xul','tv2options','chrome,dialog,modal')" />
+                  oncommand="TV2Developer.openOptionsDialog(event)" />
         <menuseparator />
         <menuitem label="&about.label;" accesskey="&about.accesskey;"
-                  oncommand="window.openDialog('chrome://tv2developer/content/about.xul','tv2about','chrome,dialog,modal')" />
+                  oncommand="window.openDialog('chrome://tv2developer/content/about.xul','tv2about','modal,centerscreen,chrome,resizable=no')" />
     </popup>
 </popupset>
 
index 86528dc5ff333e5fb63fa1cdbe800a5c1683a8a9..1543deab76749e64f3a15c036413c5602103345d 100755 (executable)
@@ -2,21 +2,22 @@
 var TV2Options = {
     
     _keyBranch: null,
+    _prefBranch: null,
     _hackEnabled: false,
     init: function() {
         var hacks = document.getElementById('mac-hacks');
-        this._keyBranch =
-            Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService)
-            .getBranch('ui.key.');
+        var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
+        this._keyBranch = prefs.getBranch('ui.key.');
+        this._prefBranch = prefs.getBranch('browser.preferences.');
         // we show the options for hacing accesskeys if user has set a preference or accesskeys are disabled
         this._hackEnabled =
             this._keyBranch.prefHasUserValue('menuAccessKey') ||
-            (this._keyBranch.getIntPref('menuAccessKey') == -1);
+            (this._keyBranch.getIntPref('menuAccessKey') == 0);
         if (!this._hackEnabled) {
             hacks.style.display = 'none';
         } else {
             document.getElementById('mac-accesskeys').checked =
-                (this._keyBranch.getIntPref('menuAccessKey') != -1);
+                (this._keyBranch.getIntPref('menuAccessKey') != 0);
         }
     },
     
@@ -29,6 +30,11 @@ var TV2Options = {
                 this._keyBranch.clearUserPref('menuAccessKey');
             }
         }
+    },
+    
+    update: function() {
+       var instantApply = this._prefBranch.getBoolPref("instantApply", false);
+       if (instantApply) this.save();
     }
     
 }
\ No newline at end of file
index 37acd153f0893f961c67bca43b4de72a203b84f4..e8f240722ea0cb61f1ee77cd562df56f67c5e0fe 100755 (executable)
@@ -6,8 +6,7 @@
             xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
                title="&optionsDialog.title;"
                onload="TV2Options.init()"
-               ondialogaccept="TV2Options.save()"
-               >
+               ondialogaccept="TV2Options.save()">
 <script type="application/x-javascript" src="options.js" />
   
   <prefpane id="pane1" label="&optionsDialog.options.label;">
@@ -21,7 +20,9 @@
     </groupbox>
 
     <groupbox id="mac-hacks">
-        <checkbox id="mac-accesskeys" label="&optionsDialog.mac.accesskeys;" tooltiptext="&optionsDialog.mac.accesskeys.tooltiptext;"/>
+        <checkbox id="mac-accesskeys" label="&optionsDialog.mac.accesskeys;"
+          oncommand="TV2Options.update()"
+          tooltiptext="&optionsDialog.mac.accesskeys.tooltiptext;"/>
     </groupbox>
   </prefpane>
 
index c2a246b2cfb8211a58d8d1e7a5d6b1fd49e3b603..efc1c025ec14d4ac8a755c266ecb0bb43d940d9d 100755 (executable)
@@ -671,7 +671,15 @@ var TV2Developer = {
        },
        
        openQuickbox: function(event) {
-           window.openDialog('chrome://tv2developer/content/quickbox.xul','tv2quickbox','chrome,dialog,modal');
-       }
+           window.openDialog('chrome://tv2developer/content/quickbox.xul','tv2quickbox','modal,centerscreen,chrome,resizable=no');
+       },
+       
+       /* Options */
+       openOptionsDialog: function(event) {
+      var instantApply = getBoolPref("browser.preferences.instantApply", false);
+      var features = "chrome,titlebar,toolbar,centerscreen" + (instantApply ? ",dialog=no" : ",modal");
+      window.openDialog('chrome://tv2developer/content/options.xul','tv2options',features);
+  }
+
 
 }
diff --git a/version b/version
index a918a2aa18d5bec6a8bb93891a7a63c243111796..ef5e4454454da88572cbefa4d65ef2254b9a5fe6 100644 (file)
--- a/version
+++ b/version
@@ -1 +1 @@
-0.6.0
+0.6.5
index e875c15c7e0a5e59b8bab0a083569388e555316a..61ef39c0ba880f50a40b912f8650ce1831713e46 100644 (file)
@@ -31,7 +31,7 @@
                 <li>Åbn siden op i Tangos requeue værktøj (evt. udfra Tango_URL hvis siden har sat denne).</li>
                 <li>Se alle database forespørgsler på siden ved at køre DB_PDO_Logging værktøjet på siden.</li>
                    <em>Browserens cache tømmes desuden automatisk</em>.</li>
-                <li>Quick link dialog, hvor man hurtig kan navigere hen til et tv2.dk site (genvej <code>ALT+3</code>, (På mac, <code>CTRL+1</code>)</li>
+                <li>Quick link dialog, hvor man hurtig kan navigere hen til et tv2.dk site - genvej <code>ALT+3</code>, (På mac, <code>CTRL+3</code>)</li>
             </ul>
             <h3>Feature liste på i2-images og i2-files:</h3>
             <ul>