]> git.ktnx.net Git - icedeb.git/commitdiff
add .deb lookup button
authorDamyan Ivanov <dmn@debian.org>
Mon, 2 Mar 2009 20:53:42 +0000 (22:53 +0200)
committerDamyan Ivanov <dmn@debian.org>
Mon, 2 Mar 2009 20:53:42 +0000 (22:53 +0200)
chrome/icedeb-deb.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-deb.png b/chrome/icedeb-deb.png
new file mode 100644 (file)
index 0000000..1e8cb38
Binary files /dev/null and b/chrome/icedeb-deb.png differ
index e66fb319e6adf4eb8fce0b27383f681bce5137ab..8ecf6fbe719a511ac10683873180de0b8d2de26b 100644 (file)
@@ -6,6 +6,10 @@
 #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);}
index 66159cff2e222a782dd54c4d57dcdf0bf6799adb..df6363f3cfab8cfa1124fd07411783f32eb2349e 100644 (file)
@@ -57,6 +57,21 @@ function lookup_pts(in_new) {
     }
 }
 
+function lookup_deb(in_new) {
+    var pkg = 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 )
@@ -69,6 +84,12 @@ Debian = {
             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);
     }
 }
 
index b390d03ed269cf5c14353c08363bb941c6d03416..3f83af03bcdfc23b6699ed3f62b1818e5989931c 100644 (file)
@@ -13,6 +13,7 @@
 <toolbarpalette id="BrowserToolbarPalette">
   <toolbarbutton id="icedeb-bts"/>
   <toolbarbutton id="icedeb-pts"/>
+  <toolbarbutton id="icedeb-deb"/>
   </toolbarpalette>
 
 
   class="toolbarbutton-1 chromeclass-toolbar-additional icedeb-pts icedeb-button"
   />
 
+<toolbarbutton id="icedeb-deb"
+  label=".deb info"
+  tooltiptext="Show information about binary deb pacckage"
+  onclick="Debian.debButton(event)"
+  class="toolbarbutton-1 chromeclass-toolbar-additional icedeb-deb icedeb-button"
+  />
+
 </overlay>
 
index 97e046c31de00e9f66d313ba9cecdbb0e00f0649..497de0be0c8bb570ca1a081338d7f80ca551b734 100644 (file)
@@ -11,7 +11,7 @@
     em:creator="Damyan Ivanov"
 
     em:id="icedeb@modsoftsys.com-uuid"
-    em:version="0.3"
+    em:version="0.4"
     em:homepageURL=""
 
     em:iconURL="chrome://icedeb/content/icon.png" >
index de1ea8a763a889c1536f330e3eb9180861b3e8ee..84268281fd6db602f6e488c70cc88dfd1a2bb447 100644 (file)
Binary files a/res/button-bts.xcf and b/res/button-bts.xcf differ