#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);}
}
}
+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);
}
}
<!-- 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>
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" >