[gnome-shell] panel: Pass a full pathname to AnimatedIcon
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] panel: Pass a full pathname to AnimatedIcon
- Date: Tue, 16 Apr 2013 17:27:44 +0000 (UTC)
commit 2fc76e6d9e377dbaf6dad6e0adb03ca72c8f140f
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Apr 16 16:57:09 2013 +0200
panel: Pass a full pathname to AnimatedIcon
For classic mode, we want to use a different styling for the spinner,
so we will pick up the image filename from CSS to make use of mode
specific styling. As the CSS will give us a full pathname, adapt the
API to take a full pathname instead of building it inside AnimatedIcon
from the passed basename.
https://bugzilla.gnome.org/show_bug.cgi?id=693688
js/gdm/loginDialog.js | 3 ++-
js/ui/panel.js | 8 ++++----
js/ui/unlockDialog.js | 3 ++-
3 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
index 77bd2eb..c023f4c 100644
--- a/js/gdm/loginDialog.js
+++ b/js/gdm/loginDialog.js
@@ -774,7 +774,8 @@ const LoginDialog = new Lang.Class({
},
_prepareDialog: function(forSecret, hold) {
- this._workSpinner = new Panel.AnimatedIcon('process-working.svg', WORK_SPINNER_ICON_SIZE);
+ let spinnerIcon = global.datadir + '/theme/process-working.svg';
+ this._workSpinner = new Panel.AnimatedIcon(spinnerIcon, WORK_SPINNER_ICON_SIZE);
this._workSpinner.actor.opacity = 0;
this._workSpinner.actor.show();
diff --git a/js/ui/panel.js b/js/ui/panel.js
index c16e318..49f1769 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -144,8 +144,8 @@ const AnimatedIcon = new Lang.Class({
Name: 'AnimatedIcon',
Extends: Animation,
- _init: function(name, size) {
- this.parent(global.datadir + '/theme/' + name, size, size, ANIMATED_ICON_UPDATE_TIMEOUT);
+ _init: function(filename, size) {
+ this.parent(filename, size, size, ANIMATED_ICON_UPDATE_TIMEOUT);
}
});
@@ -297,8 +297,8 @@ const AppMenuButton = new Lang.Class({
this._stop = true;
- this._spinner = new AnimatedIcon('process-working.svg',
- PANEL_ICON_SIZE);
+ let spinnerIcon = global.datadir + '/theme/process-working.svg';
+ this._spinner = new AnimatedIcon(spinnerIcon, PANEL_ICON_SIZE);
this._container.add_actor(this._spinner.actor);
this._spinner.actor.hide();
this._spinner.actor.lower_bottom();
diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js
index 727df61..6c8bc6e 100644
--- a/js/ui/unlockDialog.js
+++ b/js/ui/unlockDialog.js
@@ -91,7 +91,8 @@ const UnlockDialog = new Lang.Class({
this._promptLoginHint.hide();
this.contentLayout.add_actor(this._promptLoginHint);
- this._workSpinner = new Panel.AnimatedIcon('process-working.svg',
LoginDialog.WORK_SPINNER_ICON_SIZE);
+ let spinnerIcon = global.datadir + '/theme/process-working.svg';
+ this._workSpinner = new Panel.AnimatedIcon(spinnerIcon, LoginDialog.WORK_SPINNER_ICON_SIZE);
this._workSpinner.actor.opacity = 0;
this.allowCancel = false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]