[gnome-shell-extensions] user-theme: fix resetting theme to null
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions] user-theme: fix resetting theme to null
- Date: Mon, 2 May 2011 16:23:48 +0000 (UTC)
commit d942e255f734eddc4bb1d4698aea75aafe52072f
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Mon May 2 18:07:39 2011 +0200
user-theme: fix resetting theme to null
Previously null stylesheets were ignored, making it impossible to
reset the default. We still need to filter out invalid (non existing)
stylesheets, as no check is performed by shell code.
extensions/user-theme/extension.js | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/extensions/user-theme/extension.js b/extensions/user-theme/extension.js
index a9f095e..b0b041e 100644
--- a/extensions/user-theme/extension.js
+++ b/extensions/user-theme/extension.js
@@ -29,13 +29,16 @@ ThemeManager.prototype = {
file = Gio.file_new_for_path(_userCssStylesheet);
if (file.query_exists(null))
_stylesheet = _userCssStylesheet;
+ else
+ _stylesheet = null;
}
- if (_stylesheet) {
- global.log('loading user theme: ' + _stylesheet)
- Main.setThemeStylesheet(_stylesheet);
- Main.loadTheme();
- }
+ if (_stylesheet)
+ global.log('loading user theme: ' + _stylesheet);
+ else
+ global.log('loading default theme (Adwaita)');
+ Main.setThemeStylesheet(_stylesheet);
+ Main.loadTheme();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]