From 36f3429ad2e4f2daaece1b4d94a5745972b67394 Mon Sep 17 00:00:00 2001 From: Sardem FF7 Date: Tue, 1 Feb 2011 15:44:15 +0100 Subject: [PATCH] Better API for extensions changing CSS Rename the setter to reflect the fact that it's the stylesheet which is changing Add a getter to allow some useful checks --- js/ui/main.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/js/ui/main.js b/js/ui/main.js index 1f650fed9..16f69774e 100644 --- a/js/ui/main.js +++ b/js/ui/main.js @@ -208,13 +208,26 @@ function start() { } /** - * setTheme + * getThemeStylesheet: + * + * Get the theme CSS file that the shell will load + * + * Returns: A file path that contains the theme CSS, + * null if using the default + */ +function getThemeStylesheet() +{ + return _css_stylesheet; +} + +/** + * setThemeStylesheet: * @css_stylesheet: A file path that contains the theme CSS, * set it to null to use the default * * Set the theme CSS file that the shell will load */ -function setTheme(css_stylesheet) +function setThemeStylesheet(css_stylesheet) { _css_stylesheet = css_stylesheet; }