[gnome-shell-extensions] Support globally installed themes
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions] Support globally installed themes
- Date: Mon, 2 May 2011 16:31:56 +0000 (UTC)
commit 268fd462ac59c269f7724ec5254a3994af063ad2
Author: Elad Alfassa <el il doom co il>
Date: Thu Apr 14 11:23:31 2011 +0300
Support globally installed themes
If a theme cannot be found in the user directory, try in system
data dirs (XDG_DATA_DIRS, usually /usr/share and /usr/local/share)
Signed-off-by: Giovanni Campagna <gcampagna src gnome org>
extensions/user-theme/extension.js | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/extensions/user-theme/extension.js b/extensions/user-theme/extension.js
index b0b041e..2e61dad 100644
--- a/extensions/user-theme/extension.js
+++ b/extensions/user-theme/extension.js
@@ -29,8 +29,17 @@ ThemeManager.prototype = {
file = Gio.file_new_for_path(_userCssStylesheet);
if (file.query_exists(null))
_stylesheet = _userCssStylesheet;
- else
- _stylesheet = null;
+ else {
+ let sysdirs = GLib.get_system_data_dirs();
+ for (let i = 0; i < sysdirs.length; i++) {
+ _userCssStylesheet = sysdirs[i] + '/themes/' + _themeName + '/gnome-shell/gnome-shell.css';
+ file = Gio.file_new_for_path(_userCssStylesheet);
+ if (file.query_exists(null)) {
+ _stylesheet = _userCssStylesheet;
+ break;
+ }
+ }
+ }
}
if (_stylesheet)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]