Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/main.js

Issue 4744516900749312: issue #1155 - Don't allow displaying icon text with Australis theme (Closed)
Patch Set: Created July 30, 2014, 12:47 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/content/settings.xul ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/main.js
===================================================================
--- a/lib/main.js
+++ b/lib/main.js
@@ -9,6 +9,13 @@
let {Prefs} = require("prefs");
let {WindowObserver} = require("windowObserver");
+var isAustralis = false;
+try
+{
+ Cu.import("resource:///modules/CustomizableUI.jsm", null);
+ isAustralis = true;
+} catch(e) {}
+
var WindowFeature =
{
observer: null,
@@ -124,6 +131,12 @@
stylesheet: "chrome://abpcustomization/content/noActionButton.css"
};
+var AddonPageAustralisStyles =
+{
+ __proto__: StylesheetFeature,
+ stylesheet: "chrome://abpcustomization/content/addonPageAustralisStyles.css"
+};
+
var ToolbarIconDisplay =
{
__proto__: StylesheetFeature,
@@ -172,6 +185,7 @@
"preferences-one-line-subscriptions": OneLineSubscriptions,
"preferences-remove-actions-button": RemoveActionsButton,
"toolbar-icon-display": ToolbarIconDisplay,
+ "addon-page-australis-styles": AddonPageAustralisStyles,
"green-icon": GreenIcon,
"remove-menus": RemoveMenus
};
@@ -183,6 +197,10 @@
let enabled;
if (name == "addon-page-styles")
enabled = true;
+ else if (name == "toolbar-icon-display" && isAustralis)
+ enabled = false;
+ else if (name == "addon-page-australis-styles")
+ enabled = isAustralis;
else
enabled = Prefs[name];
@@ -193,7 +211,6 @@
}
}
-
// Initialize features and make sure to update them on changes
for (let feature in features)
updateFeature(feature);
« no previous file with comments | « chrome/content/settings.xul ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld