]> git.ktnx.net Git - icedeb.git/commitdiff
add new PTS lookup button 0.3
authorDamyan Ivanov <dmn@debian.org>
Mon, 2 Mar 2009 20:42:36 +0000 (22:42 +0200)
committerDamyan Ivanov <dmn@debian.org>
Mon, 2 Mar 2009 20:43:19 +0000 (22:43 +0200)
chrome/icedeb-pts.png [new file with mode: 0644]
chrome/icedeb.css
chrome/icedeb.js
chrome/icedeb.xul
install.rdf
res/button-bts.xcf

diff --git a/chrome/icedeb-pts.png b/chrome/icedeb-pts.png
new file mode 100644 (file)
index 0000000..08c77cc
Binary files /dev/null and b/chrome/icedeb-pts.png differ
index 6b21319a1fa6cde4d8ec51f8e097338f350927e6..e66fb319e6adf4eb8fce0b27383f681bce5137ab 100644 (file)
@@ -2,16 +2,20 @@
 #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");}
+
 /* common style for all custom buttons */
-.icedeb-bts
+.icedeb-button
 {-moz-image-region: rect( 0px 24px 24px  0px);}
 
-.icedeb-bts:hover
+.icedeb-bbutton:hover
 {-moz-image-region: rect(24px 24px 48px  0px);}
 
-[iconsize="small"] .icedeb-bts
+[iconsize="small"] .icedeb-button
 {-moz-image-region: rect( 0px 40px 16px 24px);}
 
-[iconsize="small"] .icedeb-bts:hover
+[iconsize="small"] .icedeb-button:hover
 {-moz-image-region: rect(24px 40px 40px 24px);}
 
index 823c2afdb6f48973b1cadbe4dd576d17a49216e9..66159cff2e222a782dd54c4d57dcdf0bf6799adb 100644 (file)
@@ -42,12 +42,33 @@ function lookup_bts(in_new) {
     }
 }
 
+function lookup_pts(in_new) {
+    var pkg = 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);
+    }
+}
+
 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);
     }
 }
 
index 68cd39b4f6eaeef89d2fafc2088b09d08b79c390..b390d03ed269cf5c14353c08363bb941c6d03416 100644 (file)
@@ -12,6 +12,7 @@
 <!-- Firefox -->
 <toolbarpalette id="BrowserToolbarPalette">
   <toolbarbutton id="icedeb-bts"/>
+  <toolbarbutton id="icedeb-pts"/>
   </toolbarpalette>
 
 
   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"
+  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"
   />
 
 </overlay>
index 31a45a305bfacce1c192a0c7a3d2e4ecb57ab8c5..97e046c31de00e9f66d313ba9cecdbb0e00f0649 100644 (file)
@@ -11,7 +11,7 @@
     em:creator="Damyan Ivanov"
 
     em:id="icedeb@modsoftsys.com-uuid"
-    em:version="0.2"
+    em:version="0.3"
     em:homepageURL=""
 
     em:iconURL="chrome://icedeb/content/icon.png" >
index 3ef3eb14823531b26d8cecc7c934bbdbc1277d52..de1ea8a763a889c1536f330e3eb9180861b3e8ee 100644 (file)
Binary files a/res/button-bts.xcf and b/res/button-bts.xcf differ