]> git.ktnx.net Git - icedeb.git/commitdiff
move extension content to content/
authorDamyan Ivanov <dmn@debian.org>
Tue, 6 Apr 2010 10:39:24 +0000 (13:39 +0300)
committerDamyan Ivanov <dmn@debian.org>
Tue, 6 Apr 2010 10:39:24 +0000 (13:39 +0300)
15 files changed:
chrome.manifest
chrome/content/icedeb-bts.png [new file with mode: 0644]
chrome/content/icedeb-deb.png [new file with mode: 0644]
chrome/content/icedeb-pts.png [new file with mode: 0644]
chrome/content/icedeb.css [new file with mode: 0644]
chrome/content/icedeb.js [new file with mode: 0644]
chrome/content/icedeb.xul [new file with mode: 0644]
chrome/content/icon.png [new file with mode: 0644]
chrome/icedeb-bts.png [deleted file]
chrome/icedeb-deb.png [deleted file]
chrome/icedeb-pts.png [deleted file]
chrome/icedeb.css [deleted file]
chrome/icedeb.js [deleted file]
chrome/icedeb.xul [deleted file]
chrome/icon.png [deleted file]

index b5e1f7cd5489edc0c2b12ccb8adf54ab5f272bf8..e7f026380230958ce112dcc0e5a308a0385d0f4d 100644 (file)
@@ -1,4 +1,4 @@
-content icedeb chrome/
+content icedeb chrome/content/
 style chrome://global/content/customizeToolbar.xul chrome://icedeb/content/icedeb.css
 
 # Firefox
diff --git a/chrome/content/icedeb-bts.png b/chrome/content/icedeb-bts.png
new file mode 100644 (file)
index 0000000..5f4b36f
Binary files /dev/null and b/chrome/content/icedeb-bts.png differ
diff --git a/chrome/content/icedeb-deb.png b/chrome/content/icedeb-deb.png
new file mode 100644 (file)
index 0000000..e349c6e
Binary files /dev/null and b/chrome/content/icedeb-deb.png differ
diff --git a/chrome/content/icedeb-pts.png b/chrome/content/icedeb-pts.png
new file mode 100644 (file)
index 0000000..c24902f
Binary files /dev/null and b/chrome/content/icedeb-pts.png differ
diff --git a/chrome/content/icedeb.css b/chrome/content/icedeb.css
new file mode 100644 (file)
index 0000000..08e60dd
--- /dev/null
@@ -0,0 +1,18 @@
+#icedeb-bts,
+#wrapper-icedeb-bts
+{list-style-image: url("chrome://icedeb/content/icedeb-bts.png");}
+
+#icedeb-pts,
+#wrapper-icedeb-pts
+{list-style-image: url("chrome://icedeb/content/icedeb-pts.png");}
+
+#icedeb-deb,
+#wrapper-icedeb-deb
+{list-style-image: url("chrome://icedeb/content/icedeb-deb.png");}
+
+/* common style for all custom buttons */
+.icedeb-button
+{-moz-image-region: rect( 0px 24px 24px  0px);}
+
+[iconsize="small"] .icedeb-button
+{-moz-image-region: rect( 0px 40px 16px 24px);}
diff --git a/chrome/content/icedeb.js b/chrome/content/icedeb.js
new file mode 100644 (file)
index 0000000..3a08f11
--- /dev/null
@@ -0,0 +1,110 @@
+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 trim_keyword(word) {
+    if (!word) return word;
+
+    var oldword;
+    do {
+        oldword = word;
+
+        word = word.replace(/^\s+/, '');
+        word = word.replace(/\s+$/, '');
+        word = word.replace(/^#/, '');
+        word = word.replace(/[-:\/,.]$/, '');
+    } while ( oldword != word );
+
+    return word;
+}
+
+function lookup_bts(in_new) {
+    var bug = trim_keyword(getClipboardText());
+    if (!bug) return null;
+    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);
+    }
+}
+
+function lookup_pts(in_new) {
+    var pkg = trim_keyword(getClipboardText());
+    if (!pkg) return null;
+    var uri="http://packages.qa.debian.org/" + pkg;
+
+    if (in_new) {
+        var b = getBrowser();
+        var new_tab = b.addTab(uri);
+        b.selectedTab = new_tab;
+    }
+    else {
+        loadURI(uri);
+    }
+}
+
+function lookup_deb(in_new) {
+    var pkg = trim_keyword(getClipboardText());
+    if (!pkg) return null;
+    var uri="http://packages.debian.org/" + pkg;
+
+    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);
+    },
+    ptsButton: function (e) {
+        if ( e.button == 0 )
+            lookup_pts(false)
+        else if ( e.button == 1 )
+            lookup_pts(true);
+    },
+    debButton: function (e) {
+        if ( e.button == 0 )
+            lookup_deb(false)
+        else if ( e.button == 1 )
+            lookup_deb(true);
+    }
+}
+
diff --git a/chrome/content/icedeb.xul b/chrome/content/icedeb.xul
new file mode 100644 (file)
index 0000000..04bb0dd
--- /dev/null
@@ -0,0 +1,43 @@
+<?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"/>
+  <toolbarbutton id="icedeb-pts"/>
+  <toolbarbutton id="icedeb-deb"/>
+  </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 icedeb-button"
+  />
+
+<toolbarbutton id="icedeb-pts"
+  label="Debian PTS"
+  tooltiptext="Query Debian Package tracking system using the text in the clipboard"
+  onclick="Debian.ptsButton(event)"
+  class="toolbarbutton-1 chromeclass-toolbar-additional icedeb-pts icedeb-button"
+  />
+
+<toolbarbutton id="icedeb-deb"
+  label=".deb info"
+  tooltiptext="Show information about binary deb package"
+  onclick="Debian.debButton(event)"
+  class="toolbarbutton-1 chromeclass-toolbar-additional icedeb-deb icedeb-button"
+  />
+
+</overlay>
+
diff --git a/chrome/content/icon.png b/chrome/content/icon.png
new file mode 100644 (file)
index 0000000..27b5e84
Binary files /dev/null and b/chrome/content/icon.png differ
diff --git a/chrome/icedeb-bts.png b/chrome/icedeb-bts.png
deleted file mode 100644 (file)
index 5f4b36f..0000000
Binary files a/chrome/icedeb-bts.png and /dev/null differ
diff --git a/chrome/icedeb-deb.png b/chrome/icedeb-deb.png
deleted file mode 100644 (file)
index e349c6e..0000000
Binary files a/chrome/icedeb-deb.png and /dev/null differ
diff --git a/chrome/icedeb-pts.png b/chrome/icedeb-pts.png
deleted file mode 100644 (file)
index c24902f..0000000
Binary files a/chrome/icedeb-pts.png and /dev/null differ
diff --git a/chrome/icedeb.css b/chrome/icedeb.css
deleted file mode 100644 (file)
index 08e60dd..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#icedeb-bts,
-#wrapper-icedeb-bts
-{list-style-image: url("chrome://icedeb/content/icedeb-bts.png");}
-
-#icedeb-pts,
-#wrapper-icedeb-pts
-{list-style-image: url("chrome://icedeb/content/icedeb-pts.png");}
-
-#icedeb-deb,
-#wrapper-icedeb-deb
-{list-style-image: url("chrome://icedeb/content/icedeb-deb.png");}
-
-/* common style for all custom buttons */
-.icedeb-button
-{-moz-image-region: rect( 0px 24px 24px  0px);}
-
-[iconsize="small"] .icedeb-button
-{-moz-image-region: rect( 0px 40px 16px 24px);}
diff --git a/chrome/icedeb.js b/chrome/icedeb.js
deleted file mode 100644 (file)
index 3a08f11..0000000
+++ /dev/null
@@ -1,110 +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 trim_keyword(word) {
-    if (!word) return word;
-
-    var oldword;
-    do {
-        oldword = word;
-
-        word = word.replace(/^\s+/, '');
-        word = word.replace(/\s+$/, '');
-        word = word.replace(/^#/, '');
-        word = word.replace(/[-:\/,.]$/, '');
-    } while ( oldword != word );
-
-    return word;
-}
-
-function lookup_bts(in_new) {
-    var bug = trim_keyword(getClipboardText());
-    if (!bug) return null;
-    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);
-    }
-}
-
-function lookup_pts(in_new) {
-    var pkg = trim_keyword(getClipboardText());
-    if (!pkg) return null;
-    var uri="http://packages.qa.debian.org/" + pkg;
-
-    if (in_new) {
-        var b = getBrowser();
-        var new_tab = b.addTab(uri);
-        b.selectedTab = new_tab;
-    }
-    else {
-        loadURI(uri);
-    }
-}
-
-function lookup_deb(in_new) {
-    var pkg = trim_keyword(getClipboardText());
-    if (!pkg) return null;
-    var uri="http://packages.debian.org/" + pkg;
-
-    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);
-    },
-    ptsButton: function (e) {
-        if ( e.button == 0 )
-            lookup_pts(false)
-        else if ( e.button == 1 )
-            lookup_pts(true);
-    },
-    debButton: function (e) {
-        if ( e.button == 0 )
-            lookup_deb(false)
-        else if ( e.button == 1 )
-            lookup_deb(true);
-    }
-}
-
diff --git a/chrome/icedeb.xul b/chrome/icedeb.xul
deleted file mode 100644 (file)
index 04bb0dd..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?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"/>
-  <toolbarbutton id="icedeb-pts"/>
-  <toolbarbutton id="icedeb-deb"/>
-  </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 icedeb-button"
-  />
-
-<toolbarbutton id="icedeb-pts"
-  label="Debian PTS"
-  tooltiptext="Query Debian Package tracking system using the text in the clipboard"
-  onclick="Debian.ptsButton(event)"
-  class="toolbarbutton-1 chromeclass-toolbar-additional icedeb-pts icedeb-button"
-  />
-
-<toolbarbutton id="icedeb-deb"
-  label=".deb info"
-  tooltiptext="Show information about binary deb package"
-  onclick="Debian.debButton(event)"
-  class="toolbarbutton-1 chromeclass-toolbar-additional icedeb-deb icedeb-button"
-  />
-
-</overlay>
-
diff --git a/chrome/icon.png b/chrome/icon.png
deleted file mode 100644 (file)
index 27b5e84..0000000
Binary files a/chrome/icon.png and /dev/null differ