diff --new-file --recursive --suppress-common-lines --exclude changes.txt --exclude diff.txt releases/unplug-2.035/source/chrome/content/common.js releases/unplug-2.036/source/chrome/content/common.js
135c135
< version : 2.035,
---
> version : 2.036,
139c139
< revision : 201010180152,
---
> revision : 201011142341,
diff --new-file --recursive --suppress-common-lines --exclude changes.txt --exclude diff.txt releases/unplug-2.035/source/chrome/content/config/config.js releases/unplug-2.036/source/chrome/content/config/config.js
33d32
< populate_configs();
38,47d36
< function populate_configs() {
< var elemlist = document.getElementsByTagName("configwrapper");
< for (var i = 0; i < elemlist.length; i++) {
< var el = elemlist[i];
< var value = UnPlug2.get_pref(el.getAttribute("name"), el.getAttribute("default"));
< el.setValue(value);
< }
< document.getElementById("version").setAttribute("value", "Version: " + UnPlug2.version.toFixed(3) + " (" + UnPlug2.codename + ") " + UnPlug2.revision);
< }
<
108,116d96
<
< function save_configs() {
< var elemlist = document.getElementsByTagName("configwrapper");
< for (var i = 0; i < elemlist.length; i++) {
< var el = elemlist[i];
< var value = UnPlug2.set_pref(el.getAttribute("name"), el.getValue());
< }
< }
<
123c103,104
< var tb = document.getElementById("tabbox");
---
> var pwin = document.getElementById("cn_unplug2_config");
> var p = null;
127c108
< tb.selectedIndex = 3;
---
> p = document.getElementById("tababout");
130c111
< tb.selectedIndex = 0;
---
> p = document.getElementById("tabgeneral");
133c114
< tb.selectedIndex = 1;
---
> p = document.getElementById("tabdownload");
135a117
> pwin.showPane(p);
diff --new-file --recursive --suppress-common-lines --exclude changes.txt --exclude diff.txt releases/unplug-2.035/source/chrome/content/config/config.xul releases/unplug-2.036/source/chrome/content/config/config.xul
3,4c3
<
< title="&dialog.title; – &configheader.subtitle;"
46c45
< height="500"
---
> height="400"
49,50d47
< ondialogaccept="save_configs()"
< ondialogcancel=""
55,123c52,60
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
< &rulesxml.description;
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
< &about.description;
<
---
>
>
>
>
>
>
>
> &about.description;
>
125,131c62,95
<
<
<
< &about.updated;
<
<
<
---
>
> &about.updated;
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> &rulesxml.description;
>
>
133,137c97,127
<
<
<
<
<
---
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
diff --new-file --recursive --suppress-common-lines --exclude changes.txt --exclude diff.txt releases/unplug-2.035/source/chrome/content/config/configwrapper.css releases/unplug-2.036/source/chrome/content/config/configwrapper.css
1,32d0
< /*
< * _ ___
< * /\ / /___ / _ \ /\ /\ _ ___
< * / // // _ \ / // // // // // _ \
< * / // // // / / ___// // // // // /
< * \___//_//_/ /_/ /_/ \___/ \_ /
< * \___/
< *
< * Compunach UnPlug
< * Copyright (C) 2010 David Batley
< *
< * This program is free software: you can redistribute it and/or modify
< * it under the terms of the GNU Affero General Public License as
< * published by the Free Software Foundation, either version 3 of the
< * License, or (at your option) any later version.
< *
< * This program is distributed in the hope that it will be useful,
< * but WITHOUT ANY WARRANTY; without even the implied warranty of
< * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
< * GNU General Public License for more details.
< *
< * You should have received a copy of the GNU Affero General Public License
< * along with this program. If not, see .
< *
< */
< /*
< * assign as an configwrapper.xbl widget
< */
< configwrapper {
< -moz-binding: url(chrome://unplug/content/config/configwrapper.xbl#configwrapper);
< }
<
diff --new-file --recursive --suppress-common-lines --exclude changes.txt --exclude diff.txt releases/unplug-2.035/source/chrome/content/config/configwrapper.xbl releases/unplug-2.036/source/chrome/content/config/configwrapper.xbl
1,88d0
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
< // search child nodes and set value
< var target = this.firstChild;
< switch (target.tagName) {
< case "checkbox":
< target.setAttribute("checked", value ? "true" : "false");
< break;
< case "menulist":
< // Firefox 3.0+
< // TODO - broke this too :)
< for (var i=0; i < target.itemCount; i++) {
< if (target.getItemAtIndex(i).value == value)
< target.selectedIndex = i;
< }
< break;
< default:
< alert(target.tagName + " is not an XUL element which can be configwrappered");
< break;
< }
<
<
<
<
<
< // search child nodes and get value
< var target = this.firstChild;
< switch (target.tagName) {
< case "checkbox":
< return target.getAttribute("checked") == "true";
< case "menulist":
< return String(target.selectedItem.value);
< default:
< alert(target.tagName + " is not an XUL element which can be configwrappered");
< return null;
< }
<
<
<
<
<
<
<
<
<
<
diff --new-file --recursive --suppress-common-lines --exclude changes.txt --exclude diff.txt releases/unplug-2.035/source/chrome/content/display/pop/pop.js releases/unplug-2.036/source/chrome/content/display/pop/pop.js
86d85
< this.poll()
93c92,93
< * See if we've finished looking for suff yet
---
> * Callback for UnPlug2Rules.search
> * Called for each result found. This may be asynchromous (ie, after additional files are downloaded).
95c95,108
< poll : function () {
---
> _search_callback : (function (obj) {
> UnPlug2.log("callback: " + obj.toSource());
> switch (obj.type) {
> case "result":
> return UnPlug2SearchPage._search_callback_result(obj);
> case "progress":
> return UnPlug2SearchPage._search_callback_progress(obj);
> default:
> UnPlug2.log("Callback function got a " + result.type + " (not a result)!");
> return;
> }
> }),
>
> _search_callback_progress : (function (info) {
97,98d109
< var statusinfo = UnPlug2Search.statusinfo();
< document.getElementById("dynamic_download").value = statusinfo.text;
100c111,112
< if (statusinfo.finished) {
---
> var status_label = document.getElementById("dynamic_download");
> if (info.finished) {
102a115
> status_label.value = UnPlug2.str("search_done");
115c128,135
< if (statusinfo.percent == 0 || statusinfo.percent == 100) {
---
> if (info.downloads == 1){
> status_label.value.value = UnPlug2.str("search_1_active_download");
> } else {
> // note: info.downloads can be zero if we've downloaded the last page,
> // but there are items which have been marked "defer" scheduled to be run.
> status_label.value.value = UnPlug2.str("search_n_active_downloads").replace("#", info.downloads);
> }
> if (info.percent == 0 || info.percent == 100) {
119c139
< searchbar.value = statusinfo.percent;
---
> searchbar.value = info.percent;
121d140
< window.setTimeout(UnPlug2SearchPage.poll, 500);
128c147
< },
---
> }),
130,139c149
< /**
< * Callback for UnPlug2Rules.search
< * Called for each result found. This may be asynchromous (ie, after additional files are downloaded).
< */
< _search_callback : function (result) {
< if (result.type != "result") {
< UnPlug2.log("Callback function got a " + result.type + " (not a result)!");
< return;
< }
<
---
> _search_callback_result : (function (result) {
148,149d157
< UnPlug2.log("FOUND: " + result.toSource() + " as " + (uid || "new result"));
<
192c200
< },
---
> }),
542,543d549
<
< try {
545,547d550
< } catch (e) {
< alert("hello" + e);
< }
diff --new-file --recursive --suppress-common-lines --exclude changes.txt --exclude diff.txt releases/unplug-2.035/source/chrome/content/rules.xml releases/unplug-2.036/source/chrome/content/rules.xml
285,295d284
<
<
<
<
<
<
<
<
<
<
<
383c372
<
---
>
875a865,873
>
>
>
>
>
>
>
>
>
diff --new-file --recursive --suppress-common-lines --exclude changes.txt --exclude diff.txt releases/unplug-2.035/source/chrome/content/search/search.js releases/unplug-2.036/source/chrome/content/search/search.js
101c101
< this._timeout = window.setTimeout(function () { realthis._timeout_callback(); }, this._timeout_delay);
---
> this._timeout = window.setTimeout((function () { realthis._timeout_callback(); }), this._timeout_delay);
712a713,721
> var statusinfo = UnPlug2Search.statusinfo();
> UnPlug2Search.callback(statusinfo);
>
> // noting to do, so lets stop
> if (statusinfo.finished) {
> UnPlug2.log("Finished search");
> UnPlug2Search._stopped = true;
> }
>
713a723,727
> // a message with type=progress finished=true will have
> // been sent, so we can stop the poller.
> UnPlug2.log("Stopping: search finished.");
> window.clearInterval(UnPlug2Search._poll_timer);
> UnPlug2Search._poll_timer = null;
866c880
< if (!this.has_finished()) {
---
> if (!this.statusinfo().finished) {
870c884,885
< // assign callback func
---
> // start search poller
> this._reset();
871a887,892
> // don't let UnPlug2Search.poll suggest we've finished before we really start
> // (ie: fix race condition). This gets decremented later.
> UnPlug2Search._defered_rules_count += 1;
> if (!UnPlug2Search._poll_timer) {
> UnPlug2Search._poll_timer = window.setInterval(UnPlug2Search.poll, 100);
> }
877a899,900
> UnPlug2Search._defered_rules_count -= 1; // see above
>
1177c1200,1201
< * Download method must be a javascrit object. It's used by download components (eg "copy url", "save with firefox", "save with dta", etc) to decide how and if they work. Examples below:
---
> * Download method must be a JSON object (it's sent to the callback function). It must have a type of "result".
> * It's used by download components (eg "copy url", "save with firefox", "save with dta", etc) to decide how and if they work. Examples below:
1276c1300
< UnPlug2Search.callback = function ( res ) { UnPlug2.log("Cannot use callback for result " + res); };
---
> UnPlug2Search.callback = function ( res ) { UnPlug2.log("Cannot use callback for result " + res.toSource()); };
1280,1298d1303
< if (!UnPlug2Search._poll_timer) {
< UnPlug2Search._poll_timer = window.setInterval(UnPlug2Search.poll, 100);
< }
< },
<
< /**
< * Returns false if still doing stuff
< * TODO - depricate this in favor of statusinfo()
< */
< has_finished : function () {
< if (UnPlug2Search._defered_rules_count) {
< return false;
< }
< for (var i = 0; i < UnPlug2Search._downloads.length; i++) {
< if (UnPlug2Search._downloads[i] && UnPlug2Search._downloads[i].download)
< return false;
< }
< // TODO - more checks about doing stuff while not downloading stuff
< return true;
1302a1308
> * The object returned should be JSONable and have a type of "progress"
1305c1311
< var info = { downloads : 0, finished : false, percent : 0 };
---
> // count remaining objects / data
1324,1341c1330,1336
< info.downloads = active_downloads;
< // info.percent = 100 * (attempted_downloads - active_downloads) / (attempted_downloads || 1);
< info.percent = completed_pct / (attempted_downloads || 1);
< switch (info.downloads) {
< case 0:
< info.finished = true;
< info.text = UnPlug2.str("search_done");
< break;
< case 1:
< info.text = UnPlug2.str("search_1_active_download");
< break;
< default:
< info.text = UnPlug2.str("search_n_active_downloads").replace("#", info.downloads);
< break;
< }
< if (UnPlug2Search._defered_rules_count) {
< info.finished = false;
< }
---
> var finished_ok = (active_downloads == 0 && UnPlug2Search._defered_rules_count == 0) ? true : false;
> var info = {
> type : "progress",
> downloads : active_downloads,
> finished : (finished_ok || UnPlug2Search._stopped) ? true : false,
> percent : completed_pct / (attempted_downloads || 1)
> };
diff --new-file --recursive --suppress-common-lines --exclude changes.txt --exclude diff.txt releases/unplug-2.035/source/chrome/locale/de-DE/config.dtd releases/unplug-2.036/source/chrome/locale/de-DE/config.dtd
32,35d31
<
<
<
<
36a33,35
>
>
>
56,57d54
<
<
58a56
>
64c62
<
---
>
diff --new-file --recursive --suppress-common-lines --exclude changes.txt --exclude diff.txt releases/unplug-2.035/source/chrome/locale/en-US/config.dtd releases/unplug-2.036/source/chrome/locale/en-US/config.dtd
32,35d31
<
<
<
<
36a33,35
>
>
>
56,57d54
<
<
58a56
>
64c62
<
---
>
diff --new-file --recursive --suppress-common-lines --exclude changes.txt --exclude diff.txt releases/unplug-2.035/source/chrome/locale/pl-PL/common.dtd releases/unplug-2.036/source/chrome/locale/pl-PL/common.dtd
34c34
<
---
>
diff --new-file --recursive --suppress-common-lines --exclude changes.txt --exclude diff.txt releases/unplug-2.035/source/chrome/locale/pl-PL/config.dtd releases/unplug-2.036/source/chrome/locale/pl-PL/config.dtd
32,35d31
<
<
<
<
36a33,35
>
>
>
41c40
<
---
>
43c42
<
---
>
45c44
<
---
>
48c47
<
---
>
50c49
<
---
>
56,57d54
<
<
58a56
>
64c62
<
---
>
67c65
<
---
>
diff --new-file --recursive --suppress-common-lines --exclude changes.txt --exclude diff.txt releases/unplug-2.035/source/chrome/skin/searchpage.css releases/unplug-2.036/source/chrome/skin/searchpage.css
95c95
< padding; 0;
---
> padding: 0;
Binary files releases/unplug-2.035/source/chrome/skin/tango-32/dialog-information.png and releases/unplug-2.036/source/chrome/skin/tango-32/dialog-information.png differ
Binary files releases/unplug-2.035/source/chrome/skin/tango-32/document-save-as.png and releases/unplug-2.036/source/chrome/skin/tango-32/document-save-as.png differ
Binary files releases/unplug-2.035/source/chrome/skin/tango-32/mail-attachment.png and releases/unplug-2.036/source/chrome/skin/tango-32/mail-attachment.png differ
Binary files releases/unplug-2.035/source/chrome/skin/tango-32/system-search.png and releases/unplug-2.036/source/chrome/skin/tango-32/system-search.png differ
diff --new-file --recursive --suppress-common-lines --exclude changes.txt --exclude diff.txt releases/unplug-2.035/source/install.rdf releases/unplug-2.036/source/install.rdf
11c11
< em:version="2.035"
---
> em:version="2.036"
Binary files releases/unplug-2.035/unplug.xpi and releases/unplug-2.036/unplug.xpi differ