From: Damyan Ivanov Date: Tue, 10 Jan 2012 15:02:20 +0000 (+0200) Subject: add a button for querying DDPO X-Git-Tag: 1.6~1 X-Git-Url: https://git.ktnx.net/?p=icedeb.git;a=commitdiff_plain;h=da549daa0245fd1e8f4fc55ab22583780d218253;ds=sidebyside add a button for querying DDPO --- diff --git a/README b/README index bf856a8..45e0811 100644 --- a/README +++ b/README @@ -30,7 +30,7 @@ SOFTWARE. All the rest ------------ -Copyright (C) 2009, 2010, 2011 Damyan Ivanov +Copyright (C) 2009, 2010, 2011, 2012 Damyan Ivanov Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/chrome/content/icedeb-ddpo.png b/chrome/content/icedeb-ddpo.png new file mode 100644 index 0000000..17b81ac Binary files /dev/null and b/chrome/content/icedeb-ddpo.png differ diff --git a/chrome/content/icedeb.css b/chrome/content/icedeb.css index 2bca4e3..c0f09fd 100644 --- a/chrome/content/icedeb.css +++ b/chrome/content/icedeb.css @@ -14,6 +14,10 @@ #wrapper-icedeb-ml {list-style-image: url("chrome://icedeb/content/icedeb-ml.png");} +#icedeb-ddpo, +#wrapper-icedeb-ddpo +{list-style-image: url("chrome://icedeb/content/icedeb-ddpo.png");} + /* common style for all custom buttons */ .icedeb-button {-moz-image-region: rect( 0px 24px 24px 0px);} diff --git a/chrome/content/icedeb.js b/chrome/content/icedeb.js index 9c39346..236112a 100644 --- a/chrome/content/icedeb.js +++ b/chrome/content/icedeb.js @@ -99,6 +99,21 @@ IceDeb = { loadURI(uri); } }, + lookup_ddpo: function(in_new) { + var keyword = IceDeb.trim_keyword(IceDeb.getClipboardText()); + var uri="http://qa.debian.org/developer.php"; + + if (keyword) uri += "?login=" + keyword; + + if (in_new) { + var b = getBrowser(); + var new_tab = b.addTab(uri); + b.selectedTab = new_tab; + } + else { + loadURI(uri); + } + }, btsButton: function (e) { if ( e.button == 0 ) @@ -123,6 +138,12 @@ IceDeb = { IceDeb.lookup_ml(false) else if ( e.button == 1 ) IceDeb.lookup_ml(true); + }, + ddpoButton: function (e) { + if ( e.button == 0 ) + IceDeb.lookup_ddpo(false) + else if ( e.button == 1 ) + IceDeb.lookup_ddpo(true); } } diff --git a/chrome/content/icedeb.xul b/chrome/content/icedeb.xul index af44767..d173358 100644 --- a/chrome/content/icedeb.xul +++ b/chrome/content/icedeb.xul @@ -16,6 +16,7 @@ + @@ -48,5 +49,12 @@ class="toolbarbutton-1 chromeclass-toolbar-additional icedeb-ml icedeb-button" /> + + diff --git a/chrome/locale/bg-BG/icedeb.dtd b/chrome/locale/bg-BG/icedeb.dtd index 198a76a..550f8ae 100644 --- a/chrome/locale/bg-BG/icedeb.dtd +++ b/chrome/locale/bg-BG/icedeb.dtd @@ -6,3 +6,5 @@ + + diff --git a/chrome/locale/en-US/icedeb.dtd b/chrome/locale/en-US/icedeb.dtd index d8651fb..d45e5b7 100644 --- a/chrome/locale/en-US/icedeb.dtd +++ b/chrome/locale/en-US/icedeb.dtd @@ -6,3 +6,5 @@ + + diff --git a/install.rdf b/install.rdf index 32143cb..7b36bd9 100644 --- a/install.rdf +++ b/install.rdf @@ -2,7 +2,7 @@ Debian buttons - Collection of buttons for querying Debian-related pages using the text in the clipboard. Place some text in the clipboard (package name, bug number, message-ID) and click on one of the buttons. Clicking with the middle mouse button opens a new tab. + Buttons for querying Debian-related pages using the text in the clipboard. Place some text in the clipboard (package name, bug number, message-ID, developer ID/email) and click on one of the buttons. Clicking with the middle mouse button opens a new tab. Damyan Ivanov {8fb11c5b-84eb-4da0-9128-292eacce2dcb} 1.5 diff --git a/res/button-bts.xcf b/res/button-bts.xcf index 0f1c5a6..2825bee 100644 Binary files a/res/button-bts.xcf and b/res/button-bts.xcf differ