f-spot r3839 - trunk/src
- From: sdelcroix svn gnome org
- To: svn-commits-list gnome org
- Subject: f-spot r3839 - trunk/src
- Date: Wed, 23 Apr 2008 09:42:25 +0100 (BST)
Author: sdelcroix
Date: Wed Apr 23 08:42:25 2008
New Revision: 3839
URL: http://svn.gnome.org/viewvc/f-spot?rev=3839&view=rev
Log:
no longer rely on IsRealized to stop animation
Modified:
trunk/src/TextureDisplay.cs
Modified: trunk/src/TextureDisplay.cs
==============================================================================
--- trunk/src/TextureDisplay.cs (original)
+++ trunk/src/TextureDisplay.cs Wed Apr 23 08:42:25 2008
@@ -84,6 +84,7 @@
GdkGlx.Context glx;
float angle = 0.0f;
Animator flip;
+ bool running = false;
public TextureDisplay (BrowsablePointer item)
{
@@ -91,8 +92,8 @@
DoubleBuffered = false;
AppPaintable = true;
CanFocus = true;
-
item.Changed += HandleItemChanged;
+
flip = new Animator (6000, 6000, delegate { flip.Start (); item.MoveNext (true); });
flip.RunWhenStarted = false;
}
@@ -136,11 +137,13 @@
public void Start ()
{
+ running = true;
flip.Start ();
}
public void Stop ()
{
+ running = false;
flip.Stop ();
}
@@ -178,7 +181,7 @@
//Next = null;
PreloadNext ();
- if (IsRealized)
+ if (running)
Animator.Start ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]