[Pkg-mozext-commits] [itsalltext] 49/459: Okay, the preferences are saving now. Yay!

David Prévot taffit at moszumanska.debian.org
Tue Feb 24 23:26:05 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository itsalltext.

commit 7fffc0220d0adcb10d17c336a673d5b02b5e8244
Author: Christian Höltje <docwhat at gerf.org>
Date:   Wed Jan 3 23:19:13 2007 -0500

    Okay, the preferences are saving now. Yay!
---
 chrome/content/preferences.js  |  7 +++----
 chrome/content/preferences.xul | 18 +++++++++++-------
 2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/chrome/content/preferences.js b/chrome/content/preferences.js
index 5b28a13..e94299b 100644
--- a/chrome/content/preferences.js
+++ b/chrome/content/preferences.js
@@ -6,9 +6,7 @@
 /**
  * Open a filepicker to select the value of the editor.
  */
-function pref_editor_select() {
-  var tb = document.getElementById('editor');
-  
+function pref_editor_select() {  
   // Note: If jslint could, we'd use const here
   var nsIFilePicker = Components.interfaces.nsIFilePicker;
  
@@ -27,6 +25,7 @@ function pref_editor_select() {
   var rv = fp.show();
   if (rv == nsIFilePicker.returnOK) {
     var file = fp.file;
-    tb.value = file.path;
+    var pref_editor = document.getElementById('pref_editor');
+    pref_editor.value = file.path;
   }
 }
diff --git a/chrome/content/preferences.xul b/chrome/content/preferences.xul
index 761c5bc..90dc5a2 100644
--- a/chrome/content/preferences.xul
+++ b/chrome/content/preferences.xul
@@ -3,7 +3,8 @@
  
 <prefwindow id="itsalltext-prefs"
      title="It's All Text Preferences"
-     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+     onload="document.getElementById('browse').focus();">
 
 <script type="application/x-javascript" src="preferences.js"/>
  
@@ -21,23 +22,26 @@
 
   <vbox> 
     <hbox align="right">
-      <label control="editor" value="Editor (needs full path): "/>
-      <textbox preference="pref_editor" id="editor" size="20"/>
-      <button oncommand="pref_editor_select();" label="Browse" accesskey="b"/>
+      <label control="editor" value="Editor: "/>
+      <textbox preference="pref_editor" id="editor" size="20" readonly="false"
+       style="-moz-appearance: none !important; background: inherit !important;" />
+      <button oncommand="pref_editor_select();" label="Browse" id="browse"
+      accesskey="b" tabindex="1"/>
     </hbox>
     <hbox align="right">
       <label control="seconds" value="Seconds between refreshing: "/>
-      <textbox preference="pref_seconds" id="seconds" size="2" maxlength="2"/>
+      <textbox preference="pref_seconds" id="seconds" size="2"
+      maxlength="2" tabindex="2"/>
     </hbox>
     <hbox align="right">
       <label control="charset"
              value="Character Set (default: UTF-8): "/>
-      <textbox preference="pref_charset" id="charset" size="8"/>
+      <textbox preference="pref_charset" id="charset" size="8" tabindex="3"/>
     </hbox>
     <hbox align="right">
       <label control="debug"
              value="Enable Debugging: "/>
-      <checkbox preference="pref_debug" id="debug"/>
+      <checkbox preference="pref_debug" id="debug" tabindex="4"/>
     </hbox>
   </vbox>
 </prefpane>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/itsalltext.git



More information about the Pkg-mozext-commits mailing list