[gnome-shell-extensions/gnome-3-0] Support globally installed themes
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions/gnome-3-0] Support globally installed themes
- Date: Fri, 20 May 2011 13:50:07 +0000 (UTC)
commit 7576883744db6b09d94fa7a5fcf89c03b99bb94e
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]