From: Damyan Ivanov Date: Fri, 20 Jan 2012 20:26:31 +0000 (+0200) Subject: add security-tracker button X-Git-Tag: 1.7~4 X-Git-Url: https://git.ktnx.net/?p=icedeb.git;a=commitdiff_plain;h=9c0f9450341bf66a1c317322527427a7b834ae28 add security-tracker button Suggested by Paul Wise --- diff --git a/chrome/content/icedeb-security.png b/chrome/content/icedeb-security.png new file mode 100644 index 0000000..b45ab7d Binary files /dev/null and b/chrome/content/icedeb-security.png differ diff --git a/chrome/content/icedeb.css b/chrome/content/icedeb.css index 6be7df7..acd8e43 100644 --- a/chrome/content/icedeb.css +++ b/chrome/content/icedeb.css @@ -22,6 +22,10 @@ #wrapper-icedeb-buildd {list-style-image: url("chrome://icedeb/content/icedeb-buildd.png");} +#icedeb-security, +#wrapper-icedeb-security +{list-style-image: url("chrome://icedeb/content/icedeb-security.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 742ca82..e6c7adb 100644 --- a/chrome/content/icedeb.js +++ b/chrome/content/icedeb.js @@ -129,6 +129,21 @@ IceDeb = { loadURI(uri); } }, + lookup_security: function(in_new) { + var keyword = IceDeb.trim_keyword(IceDeb.getClipboardText()); + var uri="http://security-tracker.debian.org/"; + + if (keyword) uri += "tracker/" + 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 ) @@ -165,6 +180,12 @@ IceDeb = { IceDeb.lookup_buildd(false) else if ( e.button == 1 ) IceDeb.lookup_buildd(true); + }, + securityButton: function (e) { + if ( e.button == 0 ) + IceDeb.lookup_security(false) + else if ( e.button == 1 ) + IceDeb.lookup_security(true); } } diff --git a/chrome/content/icedeb.xul b/chrome/content/icedeb.xul index b7bdf6f..7b8e347 100644 --- a/chrome/content/icedeb.xul +++ b/chrome/content/icedeb.xul @@ -18,6 +18,7 @@ + @@ -64,5 +65,12 @@ class="toolbarbutton-1 chromeclass-toolbar-additional icedeb-buildd icedeb-button" /> + + diff --git a/chrome/locale/bg-BG/icedeb.dtd b/chrome/locale/bg-BG/icedeb.dtd index 1ef9f1d..9d2f584 100644 --- a/chrome/locale/bg-BG/icedeb.dtd +++ b/chrome/locale/bg-BG/icedeb.dtd @@ -10,3 +10,5 @@ + + diff --git a/chrome/locale/en-US/icedeb.dtd b/chrome/locale/en-US/icedeb.dtd index 97aace9..86270eb 100644 --- a/chrome/locale/en-US/icedeb.dtd +++ b/chrome/locale/en-US/icedeb.dtd @@ -10,3 +10,5 @@ + + diff --git a/res/button-bts.xcf b/res/button-bts.xcf index afb4427..5d66e07 100644 Binary files a/res/button-bts.xcf and b/res/button-bts.xcf differ