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 <[EMAIL PROTECTED]>
* 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 ()
_______________________________________________
SVN-commits-list mailing list (read only)
http://mail.gnome.org/mailman/listinfo/svn-commits-list
Want to limit the commits to a few modules? Go to above URL, log in to edit
your options and select the modules ('topics') you want.
Module maintainer? It is possible to set the reply-to to your development
mailing list. Email [EMAIL PROTECTED] if interested.