]> git.ktnx.net Git - icedeb.git/commitdiff
remove legacy XPCOM implementation
authorDamyan Ivanov <dmn@debian.org>
Mon, 19 Jun 2017 12:46:43 +0000 (12:46 +0000)
committerDamyan Ivanov <dmn@debian.org>
Mon, 19 Jun 2017 12:49:04 +0000 (12:49 +0000)
17 files changed:
Makefile
build
chrome.manifest [deleted file]
chrome/content/icedeb-bts.png [deleted file]
chrome/content/icedeb-buildd.png [deleted file]
chrome/content/icedeb-ddpo.png [deleted file]
chrome/content/icedeb-deb.png [deleted file]
chrome/content/icedeb-ml.png [deleted file]
chrome/content/icedeb-pts.png [deleted file]
chrome/content/icedeb-security.png [deleted file]
chrome/content/icedeb.css [deleted file]
chrome/content/icedeb.js [deleted file]
chrome/content/icedeb.xul [deleted file]
chrome/content/icon.png [deleted file]
chrome/locale/bg-BG/icedeb.dtd [deleted file]
chrome/locale/en-US/icedeb.dtd [deleted file]
install.rdf [deleted file]

index 61187feff6fcd5e0e0ddf7e0e652b144b7b2effd..da40095aa5c27e71c97b0fdca0f1fa61a6f996d5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,29 +1,15 @@
 #!/usr/bin/make -f
-# vim: noet ts=8 ft=makefile
+# vim: noet sts=8 sw=8 ts=8 ft=makefile
 
 PKG := icedeb
 
-ALL_FILES := README TODO install.rdf chrome.manifest \
-    $(shell find res -type f) $(shell find chrome -type f)
+ALL_FILES := README TODO manifest.json icedeb.js icedeb.css icedeb.html icedeb-content.js \
+    $(shell find res -type f) icons/openlogo-nd.svg icons/icedeb-addon.png
 
 all: $(PKG).xpi
 $(PKG).xpi: $(ALL_FILES)
        rm -f $@
        zip $@ $^
 
-XCF := res/button-bts.xcf
-
-chrome/content/icedeb-bts.png: $(XCF)
-       xcf2png -o "$@" "$<" "base" "bts small" "bts big"
-chrome/content/icedeb-buildd.png: $(XCF)
-       xcf2png -o "$@" "$<" "base" "buildd small" "buildd big"
-chrome/content/icedeb-ddpo.png: $(XCF)
-       xcf2png -o "$@" "$<" "base" "DD small" "DD big"
-chrome/content/icedeb-deb.png: $(XCF)
-       xcf2png -o "$@" "$<" "base" "deb small" "deb big"
-chrome/content/icedeb-ml.png: $(XCF)
-       xcf2png -o "$@" "$<" "base" "ML small" "ML big"
-chrome/content/icedeb-pts.png: $(XCF)
-       xcf2png -o "$@" "$<" "base" "pts small" "pts big"
-chrome/content/icedeb-security.png: $(XCF)
-       xcf2png -o "$@" "$<" "base" "security small" "security big"
+icons/icedeb-addon.png: res/icon.xcf
+       xcf2png -o "$@" $< -f -T
diff --git a/build b/build
index 08d261af14d288a2e1042282c06687c4d31819fe..c9b7c2a62dd9ae08fcdc5bc96eda62e09e5f0723 100644 (file)
--- a/build
+++ b/build
@@ -5,23 +5,8 @@ set -u
 
 export PKG=icedeb
 
-btn2png() {
-    local tag="$1"
-    local btn="${2:-$tag}"
-
-    xcf2png -o "chrome/content/$PKG-$btn.png" res/button-bts.xcf "base" "$tag small" "$tag big"
-}
-
 xcf2png -o "icons/icedeb-addon.png" res/icon.xcf -f -T
 
-btn2png bts
-btn2png pts
-btn2png deb
-btn2png ML ml
-btn2png DD ddpo
-btn2png buildd
-btn2png security
-
 [ ! -e $PKG.xpi ] || rm $PKG.xpi
 
 zip -r $PKG.xpi README TODO res \
diff --git a/chrome.manifest b/chrome.manifest
deleted file mode 100644 (file)
index 88666b5..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-content icedeb chrome/content/
-style chrome://global/content/customizeToolbar.xul chrome://icedeb/content/icedeb.css
-
-locale icedeb en-US chrome/locale/en-US/
-locale icedeb bg-BG chrome/locale/bg-BG/
-
-# Firefox
-overlay chrome://browser/content/browser.xul chrome://icedeb/content/icedeb.xul
diff --git a/chrome/content/icedeb-bts.png b/chrome/content/icedeb-bts.png
deleted file mode 100644 (file)
index c691b25..0000000
Binary files a/chrome/content/icedeb-bts.png and /dev/null differ
diff --git a/chrome/content/icedeb-buildd.png b/chrome/content/icedeb-buildd.png
deleted file mode 100644 (file)
index 977755f..0000000
Binary files a/chrome/content/icedeb-buildd.png and /dev/null differ
diff --git a/chrome/content/icedeb-ddpo.png b/chrome/content/icedeb-ddpo.png
deleted file mode 100644 (file)
index 2bd850e..0000000
Binary files a/chrome/content/icedeb-ddpo.png and /dev/null differ
diff --git a/chrome/content/icedeb-deb.png b/chrome/content/icedeb-deb.png
deleted file mode 100644 (file)
index 3718c76..0000000
Binary files a/chrome/content/icedeb-deb.png and /dev/null differ
diff --git a/chrome/content/icedeb-ml.png b/chrome/content/icedeb-ml.png
deleted file mode 100644 (file)
index 90eaee8..0000000
Binary files a/chrome/content/icedeb-ml.png and /dev/null differ
diff --git a/chrome/content/icedeb-pts.png b/chrome/content/icedeb-pts.png
deleted file mode 100644 (file)
index d13f38e..0000000
Binary files a/chrome/content/icedeb-pts.png and /dev/null differ
diff --git a/chrome/content/icedeb-security.png b/chrome/content/icedeb-security.png
deleted file mode 100644 (file)
index b45ab7d..0000000
Binary files a/chrome/content/icedeb-security.png and /dev/null differ
diff --git a/chrome/content/icedeb.css b/chrome/content/icedeb.css
deleted file mode 100644 (file)
index acd8e43..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#icedeb-bts,
-#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");}
-
-#icedeb-deb,
-#wrapper-icedeb-deb
-{list-style-image: url("chrome://icedeb/content/icedeb-deb.png");}
-
-#icedeb-ml,
-#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");}
-
-#icedeb-buildd,
-#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);}
-
-[iconsize="small"] .icedeb-button
-{-moz-image-region: rect( 0px 40px 16px 24px);}
diff --git a/chrome/content/icedeb.js b/chrome/content/icedeb.js
deleted file mode 100644 (file)
index a8db84b..0000000
+++ /dev/null
@@ -1,195 +0,0 @@
-IceDeb = {
-    getClipboardText: function() {
-        var clip = Components.classes['@mozilla.org/widget/clipboard;1']
-            .getService(Components.interfaces.nsIClipboard);
-        if (!clip) return null;
-
-        var trans = Components.classes['@mozilla.org/widget/transferable;1']
-            .createInstance(Components.interfaces.nsITransferable);
-        if (!trans) return null;
-
-        if (typeof(trans.init) === 'function')
-            trans.init(null);
-
-        trans.addDataFlavor("text/unicode");
-        clip.getData(trans,
-                clip.supportsSelectionClipboard()
-                ? clip.kSelectionClipboard
-                : clip.kGlobalClipboard
-        );
-
-        var s = new Object;
-        var p;
-        var len = new Object;
-        trans.getTransferData("text/unicode", s, len);
-
-        var text = null;
-        var res;
-
-        if (s)
-            p = s.value.QueryInterface(Components.interfaces.nsISupportsString, res);
-        if (p)
-            text = p.data.substring(0, len.value / 2);
-
-        return text;
-    },
-    trim_keyword: function(word) {
-        if (!word) return word;
-
-        var oldword;
-        do {
-            oldword = word;
-
-            word = word.replace(/^[^a-zA-Z0-9]+/, '');
-            word = word.replace(/[^a-zA-Z0-9]+$/, '');
-            word = word.replace(/^Bug#/i, '');
-        } while ( oldword != word );
-
-        return word;
-    },
-    lookup_bts: function(in_new) {
-        var bug = IceDeb.trim_keyword(IceDeb.getClipboardText());
-        if (!bug) return null;
-        var uri="https://bugs.debian.org/" + bug;
-
-        if (in_new) {
-            var b = getBrowser();
-            var new_tab = b.addTab(uri);
-            b.selectedTab = new_tab;
-        }
-        else {
-            loadURI(uri);
-        }
-    },
-    lookup_pts: function(in_new) {
-        var pkg = IceDeb.trim_keyword(IceDeb.getClipboardText());
-        if (!pkg) return null;
-        var uri="https://tracker.debian.org/" + pkg;
-
-        if (in_new) {
-            var b = getBrowser();
-            var new_tab = b.addTab(uri);
-            b.selectedTab = new_tab;
-        }
-        else {
-            loadURI(uri);
-        }
-    },
-    lookup_deb: function(in_new) {
-        var pkg = IceDeb.trim_keyword(IceDeb.getClipboardText());
-        if (!pkg) return null;
-        var uri="https://packages.debian.org/" + pkg;
-
-        if (in_new) {
-            var b = getBrowser();
-            var new_tab = b.addTab(uri);
-            b.selectedTab = new_tab;
-        }
-        else {
-            loadURI(uri);
-        }
-    },
-    lookup_ml: function(in_new) {
-        var msg_id = IceDeb.trim_keyword(IceDeb.getClipboardText());
-        if (!msg_id) msg_id = '';
-        var uri="https://lists.debian.org/msgid-search/" + msg_id;
-
-        if (in_new) {
-            var b = getBrowser();
-            var new_tab = b.addTab(uri);
-            b.selectedTab = new_tab;
-        }
-        else {
-            loadURI(uri);
-        }
-    },
-    lookup_ddpo: function(in_new) {
-        var keyword = IceDeb.trim_keyword(IceDeb.getClipboardText());
-        var uri="https://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);
-        }
-    },
-    lookup_buildd: function(in_new) {
-        var keyword = IceDeb.trim_keyword(IceDeb.getClipboardText());
-        var uri="https://buildd.debian.org/";
-
-        if (keyword) uri += keyword;
-
-        if (in_new) {
-            var b = getBrowser();
-            var new_tab = b.addTab(uri);
-            b.selectedTab = new_tab;
-        }
-        else {
-            loadURI(uri);
-        }
-    },
-    lookup_security: function(in_new) {
-        var keyword = IceDeb.trim_keyword(IceDeb.getClipboardText());
-        var uri="https://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 )
-            IceDeb.lookup_bts(false)
-        else if ( e.button == 1 )
-            IceDeb.lookup_bts(true);
-    },
-    ptsButton: function (e) {
-        if ( e.button == 0 )
-            IceDeb.lookup_pts(false)
-        else if ( e.button == 1 )
-            IceDeb.lookup_pts(true);
-    },
-    debButton: function (e) {
-        if ( e.button == 0 )
-            IceDeb.lookup_deb(false)
-        else if ( e.button == 1 )
-            IceDeb.lookup_deb(true);
-    },
-    mlButton: function (e) {
-        if ( e.button == 0 )
-            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);
-    },
-    builddButton: function (e) {
-        if ( e.button == 0 )
-            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
deleted file mode 100644 (file)
index 7b8e347..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet type="text/css"
-  href="chrome://icedeb/content/icedeb.css"?>
-
-<!DOCTYPE overlay SYSTEM "chrome://icedeb/locale/icedeb.dtd">
-
-<overlay id="icedeb-overlay"
-  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-<script type="application/x-javascript"
-  src="chrome://icedeb/content/icedeb.js"/>
-
-<!-- Firefox -->
-<toolbarpalette id="BrowserToolbarPalette">
-  <toolbarbutton id="icedeb-bts"/>
-  <toolbarbutton id="icedeb-pts"/>
-  <toolbarbutton id="icedeb-deb"/>
-  <toolbarbutton id="icedeb-ml"/>
-  <toolbarbutton id="icedeb-ddpo"/>
-  <toolbarbutton id="icedeb-buildd"/>
-  <toolbarbutton id="icedeb-security"/>
-  </toolbarpalette>
-
-
-<!-- button details -->
-<toolbarbutton id="icedeb-bts"
-  label="&bts.label;"
-  tooltiptext="&bts.tooltiptext;"
-  onclick="IceDeb.btsButton(event)"
-  class="toolbarbutton-1 chromeclass-toolbar-additional icedeb-bts icedeb-button"
-  />
-
-<toolbarbutton id="icedeb-pts"
-  label="&pts.label;"
-  tooltiptext="&pts.tooltiptext;"
-  onclick="IceDeb.ptsButton(event)"
-  class="toolbarbutton-1 chromeclass-toolbar-additional icedeb-pts icedeb-button"
-  />
-
-<toolbarbutton id="icedeb-deb"
-  label="&deb.label;"
-  tooltiptext="&deb.tooltiptext;"
-  onclick="IceDeb.debButton(event)"
-  class="toolbarbutton-1 chromeclass-toolbar-additional icedeb-deb icedeb-button"
-  />
-
-<toolbarbutton id="icedeb-ml"
-  label="&ml.label;"
-  tooltiptext="&ml.tooltiptext;"
-  onclick="IceDeb.mlButton(event)"
-  class="toolbarbutton-1 chromeclass-toolbar-additional icedeb-ml icedeb-button"
-  />
-
-<toolbarbutton id="icedeb-ddpo"
-  label="&ddpo.label;"
-  tooltiptext="&ddpo.tooltiptext;"
-  onclick="IceDeb.ddpoButton(event)"
-  class="toolbarbutton-1 chromeclass-toolbar-additional icedeb-ddpo icedeb-button"
-  />
-
-<toolbarbutton id="icedeb-buildd"
-  label="&buildd.label;"
-  tooltiptext="&buildd.tooltiptext;"
-  onclick="IceDeb.builddButton(event)"
-  class="toolbarbutton-1 chromeclass-toolbar-additional icedeb-buildd icedeb-button"
-  />
-
-<toolbarbutton id="icedeb-security"
-  label="&security.label;"
-  tooltiptext="&security.tooltiptext;"
-  onclick="IceDeb.securityButton(event)"
-  class="toolbarbutton-1 chromeclass-toolbar-additional icedeb-security icedeb-button"
-  />
-
-</overlay>
-
diff --git a/chrome/content/icon.png b/chrome/content/icon.png
deleted file mode 100644 (file)
index 27b5e84..0000000
Binary files a/chrome/content/icon.png and /dev/null differ
diff --git a/chrome/locale/bg-BG/icedeb.dtd b/chrome/locale/bg-BG/icedeb.dtd
deleted file mode 100644 (file)
index 9d2f584..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<!ENTITY bts.label "Грешки">
-<!ENTITY bts.tooltiptext "Запитване до системата за проследяване на проблеми на Дебиан">
-<!ENTITY pts.label "Пакет-източник">
-<!ENTITY pts.tooltiptext "Запитване до системата за следене на пакети на Дебиан">
-<!ENTITY deb.label ".deb пакет">
-<!ENTITY deb.tooltiptext "Информация за пакет">
-<!ENTITY ml.label "Списъци">
-<!ENTITY ml.tooltiptext "Търсене по идентификатор на съобщение в пощенските списъци на Дебиан">
-<!ENTITY ddpo.label "Обзор">
-<!ENTITY ddpo.tooltiptext "Обобщена информация за пакетите на даден разработчик на Дебиан">
-<!ENTITY buildd.label "журнали от компилацията">
-<!ENTITY buildd.tooltiptext "Информация от системите за автоматично компилиране на пакети">
-<!ENTITY security.label "информация за сигурността">
-<!ENTITY security.tooltiptext "Информация от сигурността на пакет или доклад на mitre.org (CVE)">
diff --git a/chrome/locale/en-US/icedeb.dtd b/chrome/locale/en-US/icedeb.dtd
deleted file mode 100644 (file)
index 86270eb..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<!ENTITY bts.label "Debian BTS">
-<!ENTITY bts.tooltiptext "Query Debian BTS using the text in the clipboard">
-<!ENTITY pts.label "Debian PTS">
-<!ENTITY pts.tooltiptext "Query Debian Package tracking system using the text in the clipboard">
-<!ENTITY deb.label ".deb info">
-<!ENTITY deb.tooltiptext "Show information about binary deb package">
-<!ENTITY ml.label "Debian ML">
-<!ENTITY ml.tooltiptext "Search Debian mailing list by message ID">
-<!ENTITY ddpo.label "DDPO">
-<!ENTITY ddpo.tooltiptext "Show an overview of Debian developer contributions">
-<!ENTITY buildd.label "build logs">
-<!ENTITY buildd.tooltiptext "Show logs from Debian auto-builders">
-<!ENTITY security.label "security information">
-<!ENTITY security.tooltiptext "Information about package security status or mitre.org report (CVE)">
diff --git a/install.rdf b/install.rdf
deleted file mode 100644 (file)
index ddeae21..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-  <Description about="urn:mozilla:install-manifest">
-    <em:name>Debian buttons</em:name>
-    <em:description>Query Debian-related pages using the text in the clipboard</em:description>
-    <em:creator>Damyan Ivanov</em:creator>
-    <em:id>{8fb11c5b-84eb-4da0-9128-292eacce2dcb}</em:id>
-    <em:version>1.11</em:version>
-    <em:homepageURL>http://icedeb.ktnx.net/</em:homepageURL>
-    <em:type>2</em:type> <!-- type=extension -->
-    <em:iconURL>chrome://icedeb/content/icon.png</em:iconURL>
-    <em:targetApplication><!-- Firefox -->
-      <Description>
-        <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
-        <em:minVersion>1.4</em:minVersion>
-        <em:maxVersion>31.*</em:maxVersion>
-      </Description>
-    </em:targetApplication>
-  </Description>
-</RDF>