theme: make a GResource

Now that we have all the infrastructure ready, port the theme to a
GResource.

https://bugzilla.gnome.org/show_bug.cgi?id=736936
This commit is contained in:
Cosimo Cecchi
2014-09-18 19:24:46 -07:00
committed by Jasper St. Pierre
parent 642bf2b778
commit 49c4ba5656
8 changed files with 60 additions and 45 deletions

View File

@@ -131,6 +131,9 @@ function _initializeUI() {
Shell.WindowTracker.get_default();
Shell.AppUsage.get_default();
let resource = Gio.Resource.load(global.datadir + '/gnome-shell-theme.gresource');
resource._register();
_loadDefaultStylesheet();
// Setup the stage hierarchy early
@@ -228,7 +231,7 @@ function _loadDefaultStylesheet() {
if (!sessionMode.isPrimary)
return;
let stylesheet = Gio.File.new_for_path(global.datadir + '/theme/' + sessionMode.stylesheetName);
let stylesheet = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/' + sessionMode.stylesheetName);
if (_defaultCssStylesheet && _defaultCssStylesheet.equal(stylesheet))
return;