banshee r3141 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Sources.Gui src/Core/Hyena.Gui/Hyena.Gui.Theatrics
- From: abock svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3141 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Sources.Gui src/Core/Hyena.Gui/Hyena.Gui.Theatrics
- Date: Mon, 4 Feb 2008 16:40:20 +0000 (GMT)
Author: abock
Date: Mon Feb 4 16:40:20 2008
New Revision: 3141
URL: http://svn.gnome.org/viewvc/banshee?rev=3141&view=rev
Log:
2008-02-04 Aaron Bockover <abock gnome org>
* src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs: Check
to see if the actor TreeIter is valid in notify_stage.ActorStep - expire
the actor if it is not
* src/Core/Hyena.Gui/Hyena.Gui.Theatrics/Stage.cs: Allow the step handler
to expire the actor by returning false
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs
trunk/banshee/src/Core/Hyena.Gui/Hyena.Gui.Theatrics/Stage.cs
Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs (original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs Mon Feb 4 16:40:20 2008
@@ -129,8 +129,13 @@
};
notify_stage.ActorStep += delegate (Actor<TreeIter> actor) {
+ if (!store.IterIsValid (actor.Target)) {
+ return false;
+ }
+
Gdk.Rectangle rect = GetBackgroundArea (store.GetPath (actor.Target), focus_column);
QueueDrawArea (rect.X, rect.Y, rect.Width, rect.Height);
+ return true;
};
}
Modified: trunk/banshee/src/Core/Hyena.Gui/Hyena.Gui.Theatrics/Stage.cs
==============================================================================
--- trunk/banshee/src/Core/Hyena.Gui/Hyena.Gui.Theatrics/Stage.cs (original)
+++ trunk/banshee/src/Core/Hyena.Gui/Hyena.Gui.Theatrics/Stage.cs Mon Feb 4 16:40:20 2008
@@ -33,7 +33,7 @@
{
public class Stage<T>
{
- public delegate void ActorStepHandler (Actor<T> actor);
+ public delegate bool ActorStepHandler (Actor<T> actor);
private Dictionary<T, Actor<T>> actors = new Dictionary<T, Actor<T>> ();
private uint timeout_id;
@@ -144,9 +144,9 @@
foreach (KeyValuePair<T, Actor<T>> entry in actors) {
entry.Value.Step ();
- OnActorStep (entry.Value);
- if (entry.Value.Expired) {
+ if (!OnActorStep (entry.Value) || entry.Value.Expired) {
+ Console.WriteLine ("EXPIRED");
expired_actors.Enqueue (entry.Value);
}
}
@@ -160,12 +160,13 @@
return true;
}
- protected virtual void OnActorStep (Actor<T> actor)
+ protected virtual bool OnActorStep (Actor<T> actor)
{
ActorStepHandler handler = ActorStep;
if (handler != null) {
- handler (actor);
+ return handler (actor);
}
+ return false;
}
protected virtual void OnIteration ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]