rename to icedeb; bts-stamp the bts button 0.2
authorDamyan Ivanov <dmn@debian.org>
Mon, 2 Mar 2009 20:26:33 +0000 (22:26 +0200)
committerDamyan Ivanov <dmn@debian.org>
Mon, 2 Mar 2009 20:26:33 +0000 (22:26 +0200)
12 files changed:
build
chrome.manifest
chrome/button-1.png [deleted file]
chrome/button-1.xcf [deleted file]
chrome/button.css [deleted file]
chrome/button.js [deleted file]
chrome/button.xul [deleted file]
chrome/icedeb-bts.png [new file with mode: 0644]
chrome/icedeb.css [new file with mode: 0644]
chrome/icedeb.js [new file with mode: 0644]
chrome/icedeb.xul [new file with mode: 0644]
install.rdf

diff --git a/build b/build
index 0c8b3d6..7419806 100644 (file)
--- a/build
+++ b/build
@@ -3,7 +3,7 @@
 set -e
 set -u
 
-export PKG=debian-bts@modsoftsys.com
+export PKG=icedeb@modsoftsys.com-uuid
 
 [ ! -e $PKG.xpi ] || rm $PKG.xpi
 
index 659f927..b5e1f7c 100644 (file)
@@ -1,5 +1,5 @@
-content debian-bts chrome/
-style chrome://global/content/customizeToolbar.xul chrome://debian-bts/content/button.css
+content icedeb chrome/
+style chrome://global/content/customizeToolbar.xul chrome://icedeb/content/icedeb.css
 
 # Firefox
-overlay chrome://browser/content/browser.xul chrome://debian-bts/content/button.xul
+overlay chrome://browser/content/browser.xul chrome://icedeb/content/icedeb.xul
diff --git a/chrome/button-1.png b/chrome/button-1.png
deleted file mode 100644 (file)
index 6ae5a5f..0000000
Binary files a/chrome/button-1.png and /dev/null differ
diff --git a/chrome/button-1.xcf b/chrome/button-1.xcf
deleted file mode 100644 (file)
index 2e104f6..0000000
Binary files a/chrome/button-1.xcf and /dev/null differ
diff --git a/chrome/button.css b/chrome/button.css
deleted file mode 100644 (file)
index f587cf4..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#debian-bts-query-button-1,
-#wrapper-debian-bts-query-button-1
-{list-style-image: url("chrome://debian-bts/content/button-1.png");}
-
-/* common style for all custom buttons */
-.debian-bts-query-button
-{-moz-image-region: rect( 0px 24px 24px  0px);}
-
-.debian-bts-query-button:hover
-{-moz-image-region: rect(24px 24px 48px  0px);}
-
-[iconsize="small"] .debian-bts-query-button
-{-moz-image-region: rect( 0px 40px 16px 24px);}
-
-[iconsize="small"] .debian-bts-query-button:hover
-{-moz-image-region: rect(24px 40px 40px 24px);}
-
diff --git a/chrome/button.js b/chrome/button.js
deleted file mode 100644 (file)
index 823c2af..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-function getClipboardText() {
-    var clip = Components.classes['@mozilla.org/widget/clipboard;1']
-        .getService(Components.interfaces.nsIClipboard);
-    if (!clip) return null;
-
-    var trans = Components.classes['@mozilla.org/widget/transferable;1']
-        .createInstance(Components.interfaces.nsITransferable);
-    if (!trans) return null;
-
-    trans.addDataFlavor("text/unicode");
-    clip.getData(trans,
-            clip.supportsSelectionClipboard()
-            ? clip.kSelectionClipboard
-            : clip.kGlobalClipboard
-    );
-
-    var str = new Object;
-    var strLength = new Object;
-    trans.getTransferData("text/unicode", str, strLength);
-
-    var text = null;
-
-    if (str) str  = str.value.QueryInterface(Components.interfaces.nsISupportsString);
-    if (str) text = str.data.substring(0, strLength.value / 2);
-
-    return text;
-}
-
-function lookup_bts(in_new) {
-    var bug = getClipboardText();
-    if (!bug) return null;
-    bug = bug.replace(/^#/, '');
-    var uri="http://bugs.debian.org/" + bug;
-
-    if (in_new) {
-        var b = getBrowser();
-        var new_tab = b.addTab(uri);
-        b.selectedTab = new_tab;
-    }
-    else {
-        loadURI(uri);
-    }
-}
-
-Debian = {
-    btsButton: function (e) {
-        if ( e.button == 0 )
-            lookup_bts(false)
-        else if ( e.button == 1 )
-            lookup_bts(true);
-    }
-}
-
diff --git a/chrome/button.xul b/chrome/button.xul
deleted file mode 100644 (file)
index 25e0ee5..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet type="text/css"
-  href="chrome://debian-bts/content/button.css"?>
-
-<!DOCTYPE overlay >
-<overlay id="debian-bts-button-overlay"
-  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-<script type="application/x-javascript"
-  src="chrome://debian-bts/content/button.js"/>
-
-<!-- Firefox -->
-<toolbarpalette id="BrowserToolbarPalette">
-  <toolbarbutton id="debian-bts-query-button-1"/>
-  </toolbarpalette>
-
-
-<!-- button details -->
-<toolbarbutton id="debian-bts-query-button-1"
-  label="Debian BTS"
-  tooltiptext="Query Debian BTS using the text in the clipboard"
-  onclick="Debian.btsButton(event)"
-  class="toolbarbutton-1 chromeclass-toolbar-additional debian-bts-query-button"
-  />
-
-</overlay>
-
diff --git a/chrome/icedeb-bts.png b/chrome/icedeb-bts.png
new file mode 100644 (file)
index 0000000..af626a4
Binary files /dev/null and b/chrome/icedeb-bts.png differ
diff --git a/chrome/icedeb.css b/chrome/icedeb.css
new file mode 100644 (file)
index 0000000..6b21319
--- /dev/null
@@ -0,0 +1,17 @@
+#icedeb-bts,
+#wrapper-icedeb-bts
+{list-style-image: url("chrome://icedeb/content/icedeb-bts.png");}
+
+/* common style for all custom buttons */
+.icedeb-bts
+{-moz-image-region: rect( 0px 24px 24px  0px);}
+
+.icedeb-bts:hover
+{-moz-image-region: rect(24px 24px 48px  0px);}
+
+[iconsize="small"] .icedeb-bts
+{-moz-image-region: rect( 0px 40px 16px 24px);}
+
+[iconsize="small"] .icedeb-bts:hover
+{-moz-image-region: rect(24px 40px 40px 24px);}
+
diff --git a/chrome/icedeb.js b/chrome/icedeb.js
new file mode 100644 (file)
index 0000000..823c2af
--- /dev/null
@@ -0,0 +1,53 @@
+function getClipboardText() {
+    var clip = Components.classes['@mozilla.org/widget/clipboard;1']
+        .getService(Components.interfaces.nsIClipboard);
+    if (!clip) return null;
+
+    var trans = Components.classes['@mozilla.org/widget/transferable;1']
+        .createInstance(Components.interfaces.nsITransferable);
+    if (!trans) return null;
+
+    trans.addDataFlavor("text/unicode");
+    clip.getData(trans,
+            clip.supportsSelectionClipboard()
+            ? clip.kSelectionClipboard
+            : clip.kGlobalClipboard
+    );
+
+    var str = new Object;
+    var strLength = new Object;
+    trans.getTransferData("text/unicode", str, strLength);
+
+    var text = null;
+
+    if (str) str  = str.value.QueryInterface(Components.interfaces.nsISupportsString);
+    if (str) text = str.data.substring(0, strLength.value / 2);
+
+    return text;
+}
+
+function lookup_bts(in_new) {
+    var bug = getClipboardText();
+    if (!bug) return null;
+    bug = bug.replace(/^#/, '');
+    var uri="http://bugs.debian.org/" + bug;
+
+    if (in_new) {
+        var b = getBrowser();
+        var new_tab = b.addTab(uri);
+        b.selectedTab = new_tab;
+    }
+    else {
+        loadURI(uri);
+    }
+}
+
+Debian = {
+    btsButton: function (e) {
+        if ( e.button == 0 )
+            lookup_bts(false)
+        else if ( e.button == 1 )
+            lookup_bts(true);
+    }
+}
+
diff --git a/chrome/icedeb.xul b/chrome/icedeb.xul
new file mode 100644 (file)
index 0000000..68cd39b
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/css"
+  href="chrome://icedeb/content/icedeb.css"?>
+
+<!DOCTYPE overlay >
+<overlay id="icedeb-overlay"
+  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+<script type="application/x-javascript"
+  src="chrome://icedeb/content/icedeb.js"/>
+
+<!-- Firefox -->
+<toolbarpalette id="BrowserToolbarPalette">
+  <toolbarbutton id="icedeb-bts"/>
+  </toolbarpalette>
+
+
+<!-- button details -->
+<toolbarbutton id="icedeb-bts"
+  label="Debian BTS"
+  tooltiptext="Query Debian BTS using the text in the clipboard"
+  onclick="Debian.btsButton(event)"
+  class="toolbarbutton-1 chromeclass-toolbar-additional icedeb-bts"
+  />
+
+</overlay>
+
index 15dc852..31a45a3 100644 (file)
@@ -6,15 +6,15 @@
   <Description
     about="urn:mozilla:install-manifest"
 
-    em:name="Debian BTS"
-    em:description="Query Debian bug-tracking system using the text in the clipboard"
+    em:name="Debian buttons"
+    em:description="Collection of buttons for querying Debian-related pages using the text in the clipboard"
     em:creator="Damyan Ivanov"
 
-    em:id="debian-bts-query@modsoftsys.com"
-    em:version="0.1"
+    em:id="icedeb@modsoftsys.com-uuid"
+    em:version="0.2"
     em:homepageURL=""
 
-    em:iconURL="chrome://debian-bts/content/icon.png" >
+    em:iconURL="chrome://icedeb/content/icon.png" >
 
     <em:targetApplication><!-- Firefox -->
       <Description
@@ -25,8 +25,8 @@
 
     <em:file>
       <Description
-        about="urn:mozilla:extension:debian-bts"
-        em:package="content/debian-bts/" />
+        about="urn:mozilla:extension:icedeb"
+        em:package="content/icedeb/" />
     </em:file>
 
   </Description>