[gnome-shell] Better API for extensions changing CSS



commit 36f3429ad2e4f2daaece1b4d94a5745972b67394
Author: Sardem FF7 <sardemff7 pub gmail com>
Date:   Tue Feb 1 15:44:15 2011 +0100

    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 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/main.js b/js/ui/main.js
index 1f650fe..16f6977 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;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]