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:

committed by
Jasper St. Pierre

parent
642bf2b778
commit
49c4ba5656
@ -127,7 +127,7 @@ const AuthPrompt = new Lang.Class({
|
||||
|
||||
this._initButtons();
|
||||
|
||||
let spinnerIcon = Gio.File.new_for_path(global.datadir + '/theme/process-working.svg');
|
||||
let spinnerIcon = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/process-working.svg');
|
||||
this._spinner = new Animation.AnimatedIcon(spinnerIcon, DEFAULT_BUTTON_WELL_ICON_SIZE);
|
||||
this._spinner.actor.opacity = 0;
|
||||
this._spinner.actor.show();
|
||||
|
@ -459,7 +459,7 @@ const SystemBackground = new Lang.Class({
|
||||
Name: 'SystemBackground',
|
||||
|
||||
_init: function() {
|
||||
let file = Gio.File.new_for_path(global.datadir + '/theme/noise-texture.png');
|
||||
let file = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/noise-texture.png');
|
||||
|
||||
if (_systemBackground == null) {
|
||||
_systemBackground = new Meta.Background({ meta_screen: global.screen });
|
||||
|
@ -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;
|
||||
|
||||
|
@ -194,7 +194,7 @@ const ModalDialog = new Lang.Class({
|
||||
},
|
||||
|
||||
placeSpinner: function(layoutInfo) {
|
||||
let spinnerIcon = Gio.File.new_for_path(global.datadir + '/theme/process-working.svg');
|
||||
let spinnerIcon = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/process-working.svg');
|
||||
this._workSpinner = new Animation.AnimatedIcon(spinnerIcon, WORK_SPINNER_ICON_SIZE);
|
||||
this._workSpinner.actor.opacity = 0;
|
||||
this._workSpinner.actor.show();
|
||||
|
@ -876,7 +876,7 @@ const NMWirelessDialog = new Lang.Class({
|
||||
x_align: Clutter.ActorAlign.CENTER,
|
||||
y_align: Clutter.ActorAlign.CENTER });
|
||||
|
||||
let file = Gio.File.new_for_path(global.datadir + '/theme/process-working.svg');
|
||||
let file = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/process-working.svg');
|
||||
this._noNetworksSpinner = new Animation.AnimatedIcon(file, 24, 24);
|
||||
this._noNetworksBox.add_actor(this._noNetworksSpinner.actor);
|
||||
this._noNetworksBox.add_actor(new St.Label({ style_class: 'no-networks-label',
|
||||
|
Reference in New Issue
Block a user