[gnome-shell] sessionMode: Add extraStylesheet property



commit b5b13322d82fc6785aae61e333c2ba071dc35a98
Author: Florian MÃllner <fmuellner gnome org>
Date:   Thu May 17 15:52:02 2012 +0200

    sessionMode: Add extraStylesheet property
    
    Add a sessionMode.extraStylesheet property, which may be used for
    mode-specific style information.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=676156

 js/ui/main.js        |    6 ++----
 js/ui/sessionMode.js |    2 ++
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/main.js b/js/ui/main.js
index 47fd833..6adcd03 100644
--- a/js/ui/main.js
+++ b/js/ui/main.js
@@ -71,7 +71,6 @@ let networkAgent = null;
 let _startDate;
 let _defaultCssStylesheet = null;
 let _cssStylesheet = null;
-let _gdmCssStylesheet = null;
 let _overridesSettings = null;
 
 let background = null;
@@ -166,7 +165,6 @@ function start() {
     global.stage.no_clear_hint = true;
 
     _defaultCssStylesheet = global.datadir + '/theme/gnome-shell.css';
-    _gdmCssStylesheet = global.datadir + '/theme/gdm.css';
     loadTheme();
 
     // Set up stage hierarchy to group all UI actors under one container.
@@ -494,8 +492,8 @@ function loadTheme() {
 
     let theme = new St.Theme ({ application_stylesheet: cssStylesheet });
 
-    if (sessionMode.sessionType == Shell.SessionType.GDM)
-        theme.load_stylesheet(_gdmCssStylesheet);
+    if (sessionMode.extraStylesheet)
+        theme.load_stylesheet(sessionMode.extraStylesheet);
 
     if (previousTheme) {
         let customStylesheets = previousTheme.get_custom_stylesheets();
diff --git a/js/ui/sessionMode.js b/js/ui/sessionMode.js
index ebc7ab9..3814d82 100644
--- a/js/ui/sessionMode.js
+++ b/js/ui/sessionMode.js
@@ -18,6 +18,7 @@ const _modes = {
              hasRunDialog: false,
              hasWorkspaces: false,
              createSession: Main.createGDMSession,
+             extraStylesheet: global.datadir + '/theme/gdm.css',
              sessionType: Shell.SessionType.GDM },
 
     'user': { hasOverview: true,
@@ -29,6 +30,7 @@ const _modes = {
               hasRunDialog: true,
               hasWorkspaces: true,
               createSession: Main.createUserSession,
+              extraStylesheet: null,
               sessionType: Shell.SessionType.USER }
 };
 



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