Getting the real old school flavor



Owen said that the look right now is very GNOME 0.9-esque, but really,
it's missing a critical piece.  Wanda.

So I sat down and did a quick and dirty implementation just to see how
things fit together.  Presumes that you have the gnome-panel wanda image
as /usr/share/gnome-panel/pixmaps/wanda.png

And then, you get http://katzj.fedorapeople.org/wanda.ogg

Jeremy
Index: js/ui/panel.js
===================================================================
--- js/ui/panel.js	(revision 29)
+++ js/ui/panel.js	(working copy)
@@ -44,6 +44,10 @@
 	this._clock.set_position(global.screen_width - 5, 5);
 	this._group.add_actor(this._clock);
 
+	this._wanda = new Clutter.Texture({ filename: "/usr/share/gnome-panel/pixmaps/wanda.png" })
+	this._group.add_actor(this._wanda);
+	this._timeline = new Clutter.Timeline({ num_frames: 8, fps: 3, loop: true });
+
 	message.connect('button-press-event',
 	    function(o, event) {
 		// See comment above
@@ -61,8 +65,25 @@
 
 	this._updateClock();
 	this._startClock();
+	this._updateWanda(0);
+	this._startWanda();
     },
 
+    _startWanda: function() {
+	let me = this;
+ 	this._timeline.connect('new-frame',
+            function(o, frame) {
+		me._updateWanda(frame);
+	    });
+	this._timeline.start();
+    },
+
+    _updateWanda: function(frame) {
+	this._wanda.set_clip((frame-1)*36, 0, 36, 22);
+	this._wanda.set_position(Shell.global_get().screen_width / 2, 5);
+	this._wanda.move_by(-36*(frame-1), 0);
+    },
+
     _startClock: function() {
 	let me = this;
 	Mainloop.timeout_add_seconds(60,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]