Skip to content

Commit

Permalink
remove "collapse"
Browse files Browse the repository at this point in the history
  • Loading branch information
lovelywcm committed Feb 21, 2009
1 parent 3f098a0 commit 8192932
Show file tree
Hide file tree
Showing 11 changed files with 8 additions and 53 deletions.
10 changes: 1 addition & 9 deletions chrome/content/composer.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,6 @@ function init() {
typeGroup.appendChild(typeNode);
}

let collapseDefault = E("collapseDefault");
collapseDefault.label = collapseDefault.getAttribute(aup.prefs.fastcollapse ? "label_no" : "label_yes");
E("collapse").value = "";
E("collapse").setAttribute("label", collapseDefault.label);

updatePatternSelection();

document.getElementById("disabledWarning").hidden = aup.prefs.enabled;
Expand Down Expand Up @@ -184,10 +179,7 @@ function updateFilter()
if (E("matchCase").checked)
options.push("match-case");

let collapse = E("collapse");
disableElement(collapse, type == "whitelist", "value", "");
if (collapse.value != "")
options.push(collapse.value);
disableElement(false, type == "whitelist", "value", "");

let enabledTypes = [];
let disabledTypes = [];
Expand Down
10 changes: 0 additions & 10 deletions chrome/content/composer.xul
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,6 @@
</hbox>
<vbox flex="1" id="typeGroup"/>

<vbox>
<label control="collapse" value="&collapse.label;" accesskey="&collapse.accesskey;"/>
<menulist id="collapse" oncommand="updateFilter()">
<menupopup>
<menuitem id="collapseDefault" value="" label_yes="&collapse.default.yes.label;" label_no="&collapse.default.no.label;" selected="true"/>
<menuitem label="&collapse.yes.label;" value="collapse"/>
<menuitem label="&collapse.no.label;" value="~collapse"/>
</menupopup>
</menulist>
</vbox>
</groupbox>
</hbox>
</dialog>
21 changes: 4 additions & 17 deletions chrome/content/filterClasses.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,6 @@ RegExpFilter.fromText = function(text)
let matchCase = null;
let domains = null;
let thirdParty = null;
let collapse = null;
let options;
if (Filter.optionsRegExp.test(text))
{
Expand Down Expand Up @@ -409,10 +408,6 @@ RegExpFilter.fromText = function(text)
thirdParty = true;
else if (option == "~THIRD_PARTY")
thirdParty = false;
else if (option == "COLLAPSE")
collapse = true;
else if (option == "~COLLAPSE")
collapse = false;
}
}

Expand Down Expand Up @@ -445,7 +440,7 @@ RegExpFilter.fromText = function(text)

try
{
return new constructor(origText, regexp, contentType, matchCase, domains, thirdParty, collapse);
return new constructor(origText, regexp, contentType, matchCase, domains, thirdParty, false);
}
catch (e)
{
Expand Down Expand Up @@ -481,25 +476,17 @@ RegExpFilter.typeMap = {
* @param {Boolean} matchCase see RegExpFilter()
* @param {String} domains see RegExpFilter()
* @param {Boolean} thirdParty see RegExpFilter()
* @param {Boolean} collapse defines whether the filter should collapse blocked content, can be null
* @constructor
* @augments RegExpFilter
*/
function BlockingFilter(text, regexp, contentType, matchCase, domains, thirdParty, collapse)
function BlockingFilter(text, regexp, contentType, matchCase, domains, thirdParty, false)
{
RegExpFilter.call(this, text, regexp, contentType, matchCase, domains, thirdParty);

this.collapse = collapse;
}
BlockingFilter.prototype =
{
__proto__: RegExpFilter.prototype,

/**
* Defines whether the filter should collapse blocked content. Can be null (use the global preference).
* @type Boolean
*/
collapse: null
__proto__: RegExpFilter.prototype

};
aup.BlockingFilter = BlockingFilter;

Expand Down
1 change: 0 additions & 1 deletion chrome/content/overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,6 @@ function aupFillPopup(popup) {

elements.enabled.setAttribute("checked", aupPrefs.enabled);
elements.frameobjects.setAttribute("checked", aupPrefs.frameobjects);
elements.slowcollapse.setAttribute("checked", !aupPrefs.fastcollapse);
elements.showintoolbar.setAttribute("checked", aupPrefs.showintoolbar);
elements.showinstatusbar.setAttribute("checked", aupPrefs.showinstatusbar);

Expand Down
1 change: 0 additions & 1 deletion chrome/content/overlayGeneral.xul
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
<menu id="aup-status-options" label="&options.label;" accesskey="&options.accesskey;">
<menupopup id="aup-status-options-popup">
<menuitem id="aup-status-frameobjects" label="&objecttabs.label;" accesskey="&objecttabs.accesskey;" type="checkbox" oncommand="aupTogglePref('frameobjects')"/>
<menuitem id="aup-status-slowcollapse" label="&collapse.label;" accesskey="&collapse.accesskey;" type="checkbox" oncommand="aupTogglePref('fastcollapse')"/>
<menuseparator/>
<menuitem id="aup-status-showintoolbar" label="&showintoolbar.label;" accesskey="&showintoolbar.accesskey;" type="checkbox" oncommand="aupTogglePref('showintoolbar')"/>
<menuitem id="aup-status-showinstatusbar" label="&showinstatusbar.label;" accesskey="&showinstatusbar.accesskey;" type="checkbox" oncommand="aupTogglePref('showinstatusbar')"/>
Expand Down
3 changes: 1 addition & 2 deletions chrome/content/policy.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,9 @@ var policy =
* @param node {nsIDOMElement}
* @param contentType {String}
* @param location {nsIURI}
* @param collapse {Boolean} true to force hiding of the node
* @return {Boolean} false if the node is blocked
*/
processNode: function(wnd, node, contentType, location, collapse) {
processNode: function(wnd, node, contentType, location, false) {
var topWnd = wnd.top;
if (!topWnd || !topWnd.location || !topWnd.location.href)
return true;
Expand Down
1 change: 0 additions & 1 deletion chrome/content/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,6 @@ function fillOptionsPopup()
{
E("aup-enabled").setAttribute("checked", prefs.enabled);
E("frameobjects").setAttribute("checked", prefs.frameobjects);
E("slowcollapse").setAttribute("checked", !prefs.fastcollapse);
E("showintoolbar").setAttribute("checked", prefs.showintoolbar);
E("showinstatusbar").setAttribute("checked", prefs.showinstatusbar);
}
Expand Down
7 changes: 0 additions & 7 deletions chrome/locale/en-US/composer.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,3 @@
<!ENTITY types.label "Apply to types:">
<!ENTITY selectAllTypes.label "Select all">
<!ENTITY unselectAllTypes.label "Select none">

<!ENTITY collapse.label "Collapse blocked:">
<!ENTITY collapse.accesskey "l">
<!ENTITY collapse.default.yes.label "Use default (yes)">
<!ENTITY collapse.default.no.label "Use default (no)">
<!ENTITY collapse.yes.label "Yes">
<!ENTITY collapse.no.label "No">
2 changes: 0 additions & 2 deletions chrome/locale/en-US/settings.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@
<!ENTITY showinstatusbar.accesskey "S">
<!ENTITY objecttabs.label "Show tabs on Flash and Java">
<!ENTITY objecttabs.accesskey "T">
<!ENTITY collapse.label "Collapse blocked elements">
<!ENTITY collapse.accesskey "L">

<!ENTITY help.label "Help">
<!ENTITY help.accesskey "H">
Expand Down
1 change: 0 additions & 1 deletion defaults/preferences/autoproxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
pref("extensions.autoproxy.currentVersion", "0.0");
pref("extensions.autoproxy.enabled", true);
pref("extensions.autoproxy.frameobjects", true);
pref("extensions.autoproxy.fastcollapse", false);
pref("extensions.autoproxy.showintoolbar", true);
pref("extensions.autoproxy.showinstatusbar", false);
pref("extensions.autoproxy.detachsidebar", false);
Expand Down
4 changes: 2 additions & 2 deletions test_locales.pl
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
['aup:settings:cut.accesskey', 'aup:settings:copy.accesskey', 'aup:settings:paste.accesskey', 'aup:settings:remove.accesskey', 'aup:settings:menu.find.accesskey', 'aup:settings:menu.findagain.accesskey'],
['aup:settings:filter.accesskey', 'aup:settings:enabled.accesskey', 'aup:settings:hitcount.accesskey', 'aup:settings:lasthit.accesskey', 'aup:settings:sort.accesskey'],
['aup:settings:sort.none.accesskey', 'aup:settings:filter.accesskey', 'aup:settings:enabled.accesskey', 'aup:settings:hitcount.accesskey', 'aup:settings:lasthit.accesskey', 'aup:settings:sort.ascending.accesskey', 'aup:settings:sort.descending.accesskey'],
['aup:settings:enable.accesskey', 'aup:settings:showintoolbar.accesskey', 'aup:settings:showinstatusbar.accesskey', 'aup:settings:objecttabs.accesskey', 'aup:settings:collapse.accesskey'],
['aup:settings:enable.accesskey', 'aup:settings:showintoolbar.accesskey', 'aup:settings:showinstatusbar.accesskey', 'aup:settings:objecttabs.accesskey'],
['aup:settings:gettingStarted.accesskey', 'aup:settings:faq.accesskey', 'aup:settings:filterdoc.accesskey', 'aup:settings:about.accesskey'],
['aup:findbar:next.accesskey', 'aup:findbar:previous.accesskey', 'aup:findbar:highlight.accesskey'],
['aup:subscription:location.accesskey', 'aup:subscription:title.accesskey', 'aup:subscription:autodownload.accesskey', 'aup:subscription:enabled.accesskey'],
['aup:composer:filter.accesskey', 'aup:composer:preferences.accesskey', 'aup:composer:type.filter.accesskey', 'aup:composer:type.whitelist.accesskey', 'aup:composer:custom.pattern.accesskey', 'aup:composer:anchor.start.accesskey', 'aup:composer:anchor.end.accesskey', 'aup:composer:domainRestriction.accesskey', 'aup:composer:firstParty.accesskey', 'aup:composer:thirdParty.accesskey', 'aup:composer:matchCase.accesskey', 'aup:composer:collapse.accesskey'],
['aup:composer:filter.accesskey', 'aup:composer:preferences.accesskey', 'aup:composer:type.filter.accesskey', 'aup:composer:type.whitelist.accesskey', 'aup:composer:custom.pattern.accesskey', 'aup:composer:anchor.start.accesskey', 'aup:composer:anchor.end.accesskey', 'aup:composer:domainRestriction.accesskey', 'aup:composer:firstParty.accesskey', 'aup:composer:thirdParty.accesskey', 'aup:composer:matchCase.accesskey'],
);

my @must_equal = (
Expand Down

0 comments on commit 8192932

Please sign in to comment.