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
This commit is contained in:
Florian Müllner 2012-05-17 15:52:02 +02:00
parent c25e7f3c41
commit b5b13322d8
2 changed files with 4 additions and 4 deletions

View File

@ -71,7 +71,6 @@ let networkAgent = null;
let _startDate; let _startDate;
let _defaultCssStylesheet = null; let _defaultCssStylesheet = null;
let _cssStylesheet = null; let _cssStylesheet = null;
let _gdmCssStylesheet = null;
let _overridesSettings = null; let _overridesSettings = null;
let background = null; let background = null;
@ -166,7 +165,6 @@ function start() {
global.stage.no_clear_hint = true; global.stage.no_clear_hint = true;
_defaultCssStylesheet = global.datadir + '/theme/gnome-shell.css'; _defaultCssStylesheet = global.datadir + '/theme/gnome-shell.css';
_gdmCssStylesheet = global.datadir + '/theme/gdm.css';
loadTheme(); loadTheme();
// Set up stage hierarchy to group all UI actors under one container. // 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 }); let theme = new St.Theme ({ application_stylesheet: cssStylesheet });
if (sessionMode.sessionType == Shell.SessionType.GDM) if (sessionMode.extraStylesheet)
theme.load_stylesheet(_gdmCssStylesheet); theme.load_stylesheet(sessionMode.extraStylesheet);
if (previousTheme) { if (previousTheme) {
let customStylesheets = previousTheme.get_custom_stylesheets(); let customStylesheets = previousTheme.get_custom_stylesheets();

View File

@ -18,6 +18,7 @@ const _modes = {
hasRunDialog: false, hasRunDialog: false,
hasWorkspaces: false, hasWorkspaces: false,
createSession: Main.createGDMSession, createSession: Main.createGDMSession,
extraStylesheet: global.datadir + '/theme/gdm.css',
sessionType: Shell.SessionType.GDM }, sessionType: Shell.SessionType.GDM },
'user': { hasOverview: true, 'user': { hasOverview: true,
@ -29,6 +30,7 @@ const _modes = {
hasRunDialog: true, hasRunDialog: true,
hasWorkspaces: true, hasWorkspaces: true,
createSession: Main.createUserSession, createSession: Main.createUserSession,
extraStylesheet: null,
sessionType: Shell.SessionType.USER } sessionType: Shell.SessionType.USER }
}; };