Add prefs panel to allow toggling prompt pref
authorGavin Sharp <gavin@gavinsharp.com>
Tue, 10 Nov 2009 22:31:54 -0500
changeset 13 3b5a6ceb7e0f
parent 12 a17a63e59463
child 14 d9eb37c90121
push id14
push usergsharp@mozilla.com
push dateWed, 11 Nov 2009 03:30:48 +0000
Add prefs panel to allow toggling prompt pref
config_build.sh
content/prefs.xul
defaults/preferences/tabcloser.js
install.rdf
locale/en-US/tabcloser.dtd
tabcloser.xpi
--- a/config_build.sh
+++ b/config_build.sh
@@ -1,8 +1,8 @@
 #!/bin/bash
 # Build config for build.sh
 APP_NAME=tabcloser
 CHROME_PROVIDERS="content locale"
 ROOT_FILES=
-ROOT_DIRS=
+ROOT_DIRS=defaults
 BEFORE_BUILD=
 AFTER_BUILD=
new file mode 100644
--- /dev/null
+++ b/content/prefs.xul
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+
+<!DOCTYPE prefwindow SYSTEM "chrome://tabcloser/locale/tabcloser.dtd">
+
+<prefwindow title="&prefs.title;"
+            xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+  <prefpane flex="1">
+    <preferences>
+      <preference id="tabcloser.confirm" name="tabcloser.confirm" type="bool"/>
+    </preferences>
+    <checkbox label="&prefs.prompt.checkbox;" preference="tabcloser.confirm" />
+  </prefpane>
+</prefwindow>
new file mode 100644
--- /dev/null
+++ b/defaults/preferences/tabcloser.js
@@ -0,0 +1,1 @@
+pref("tabcloser.confirm", true);
--- a/install.rdf
+++ b/install.rdf
@@ -3,16 +3,17 @@
  xmlns:em="http://www.mozilla.org/2004/em-rdf#">
   <Description about="urn:mozilla:install-manifest">
     <em:id>tabcloser@gavinsharp.com</em:id>
     <em:name>TabCloser</em:name>
     <em:version>1.06</em:version>
     <em:creator>Gavin Sharp</em:creator>
     <em:contributor>Johnathan Nightingale</em:contributor>
     <em:description>Close all tabs for a given site.</em:description>
+    <em:optionsURL>chrome://tabcloser/content/prefs.xul</em:optionsURL>
     <em:targetApplication>
       <Description>
         <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <!-- firefox -->
         <em:minVersion>3.0</em:minVersion>
         <em:maxVersion>3.7a1pre</em:maxVersion>
       </Description>
     </em:targetApplication>
   </Description>
new file mode 100644
--- /dev/null
+++ b/locale/en-US/tabcloser.dtd
@@ -0,0 +1,2 @@
+<!ENTITY prefs.title           "TabCloser Preferences">
+<!ENTITY prefs.prompt.checkbox "Prompt when closing multiple tabs">
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..531b42a76a173c8c0eac5cb93747a2292d75f875
GIT binary patch
literal 4156
zc$|$_byO7IwjK#3h8}W8O1hEmk`@@cV`PRHQU(kfBy<Q#fuTDDq(P)xq;aGKq(>S-
z5CnYOx8A$Id+)n<t+&tGe|-C_Z?Cn_clIA2R2QEB1ONbt0H5oTa)-#tYhoY(V896g
z{H^Nf;^XCk5cY*Va&-4XA$)|8FrO+WJumQ}sWyhy!QVB}&Yve|CQgld)kr6R=z$?Q
z=O;;+CG|tuFvpew@26VT5+6S8@1o&WcjrT(dAMSnAfZ41L_ukeKQ4bTCtxqXG$&v;
zK<u}uZWX+rm2B#3#@UsETDGG9mNkp##12bL$o}QtGE2KuK#1durR6~hZr~&4zP(!d
zqsJ}MGFyobx&etV7eA2N0~B?IfvsPf+7Y)XvL=3pYtQ)0wk=<LZv9}s(2hl_B-_=5
z{K^XfYF@qQUF&AsWyyxfPsvGy(g6aiUH7`yrti%*H7`&c{xR6CI!(N;)AJ^IBE6BI
z!^H+slmE#PtI!>$4uRkI@6TpfrIeDEC-3|b;oyyljo9i++&WbL5t~^MJ(8ziW7g^>
zAzK5aIh>;o7l|UEBH;>LIkW`Yg{uA%TdD0@5jk5eXV>sGx-TiO`zoR^olRaXcFrg!
zOYK$+?W%aZv)tZkpki~7VEtW<WJ#;Ss#EMBD`XHgHT4q?d0xn|DZ~->sgPP5ge4$K
z^aGfA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