[f-spot/FSPOT_0_6_0_STABLE] raise the slideshow animation's priority
- From: Stephane Delcroix <sdelcroix src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [f-spot/FSPOT_0_6_0_STABLE] raise the slideshow animation's priority
- Date: Wed, 19 Aug 2009 13:04:24 +0000 (UTC)
commit 0dd8ee1d2f8394eaddf45c818485470ec107de0e
Author: Stephane Delcroix <stephane delcroix org>
Date: Wed Aug 19 13:58:04 2009 +0200
raise the slideshow animation's priority
src/Bling/Animation.cs | 8 +++++++-
src/Bling/DoubleAnimation.cs | 8 ++++++++
src/Bling/EasedAnimation.cs | 9 +++++++++
src/Widgets/SlideShow.cs | 25 ++++---------------------
4 files changed, 28 insertions(+), 22 deletions(-)
---
diff --git a/src/Bling/Animation.cs b/src/Bling/Animation.cs
index b0bc236..7eca223 100644
--- a/src/Bling/Animation.cs
+++ b/src/Bling/Animation.cs
@@ -31,6 +31,7 @@ namespace FSpot.Bling
T to;
Action<T> action;
AnimationState state;
+ GLib.Priority priority = GLib.Priority.DefaultIdle;
public Animation ()
{
@@ -41,12 +42,17 @@ namespace FSpot.Bling
state = AnimationState.NotRunning;
}
- public Animation (T from, T to, TimeSpan duration, Action<T> action)
+ public Animation (T from, T to, TimeSpan duration, Action<T> action) : this (from, to, duration, action, GLib.Priority.DefaultIdle)
+ {
+ }
+
+ public Animation (T from, T to, TimeSpan duration, Action<T> action, GLib.Priority priority)
{
this.from = from;
this.to = to;
this.duration = duration;
this.action = action;
+ this.priority = priority;
state = AnimationState.NotRunning;
}
diff --git a/src/Bling/DoubleAnimation.cs b/src/Bling/DoubleAnimation.cs
index 6893b1d..2bab933 100644
--- a/src/Bling/DoubleAnimation.cs
+++ b/src/Bling/DoubleAnimation.cs
@@ -16,10 +16,18 @@ namespace FSpot.Bling
{
}
+ public DoubleAnimation (double from, double to, TimeSpan duration, Action<double> action, GLib.Priority priority) : base (from, to, duration, action, priority)
+ {
+ }
+
public DoubleAnimation (double from, double to, TimeSpan duration, Action<double> action, EasingFunction easingFunction) : base (from, to, duration, action, easingFunction)
{
}
+ public DoubleAnimation (double from, double to, TimeSpan duration, Action<double> action, EasingFunction easingFunction, GLib.Priority priority) : base (from, to, duration, action, easingFunction, priority)
+ {
+ }
+
protected override double Interpolate (double from, double to, double progress)
{
return from + progress * (to - from);
diff --git a/src/Bling/EasedAnimation.cs b/src/Bling/EasedAnimation.cs
index 036b567..ace2ac6 100644
--- a/src/Bling/EasedAnimation.cs
+++ b/src/Bling/EasedAnimation.cs
@@ -28,11 +28,20 @@ namespace FSpot.Bling
{
}
+ public EasedAnimation (T from, T to, TimeSpan duration, Action<T> action, GLib.Priority priority) : this (from, to, duration, action, null, priority)
+ {
+ }
+
public EasedAnimation (T from, T to, TimeSpan duration, Action<T> action, EasingFunction easingFunction) : base (from, to, duration, action)
{
this.easingFunction = easingFunction;
}
+ public EasedAnimation (T from, T to, TimeSpan duration, Action<T> action, EasingFunction easingFunction, GLib.Priority priority) : base (from, to, duration, action, priority)
+ {
+ this.easingFunction = easingFunction;
+ }
+
public EasingFunction EasingFunction {
get { return easingFunction; }
set { easingFunction = value; }
diff --git a/src/Widgets/SlideShow.cs b/src/Widgets/SlideShow.cs
index f8992a9..a1708f3 100644
--- a/src/Widgets/SlideShow.cs
+++ b/src/Widgets/SlideShow.cs
@@ -37,7 +37,7 @@ namespace FSpot.Widgets
}
flip = new Delay (6000, delegate {item.MoveNext (true); return true;});
- animation = new DoubleAnimation (0, 1, new TimeSpan (0, 0, 2), HandleProgressChanged);
+ animation = new DoubleAnimation (0, 1, new TimeSpan (0, 0, 2), HandleProgressChanged, GLib.Priority.Default);
}
SlideShowTransition transition;
@@ -67,22 +67,6 @@ namespace FSpot.Widgets
{
flip.Stop ();
}
-
- //DROP THIS
- public ComboBox GetCombo ()
- {
- ComboBox combo = ComboBox.NewText ();
- combo.HasFrame = false;
-
-// foreach (GlTransition t in transitions)
-// combo.AppendText (t.Name);
-//
-// combo.Active = current_transition;
- // combo.Changed += HandleComboChanged;
- combo.Show ();
- return combo;
- }
-
#endregion
#region Event Handlers
@@ -112,11 +96,10 @@ namespace FSpot.Widgets
}
Cms.Profile screen_profile;
if (FSpot.ColorManagement.Profiles.TryGetValue (Preferences.Get<string> (Preferences.COLOR_MANAGEMENT_DISPLAY_PROFILE), out screen_profile))
- //FIXME: This makes the colormanagement to crash
- //FSpot.ColorManagement.ApplyProfile (next, img.GetProfile (), screen_profile);
FSpot.ColorManagement.ApplyProfile (next, screen_profile);
- } catch (Exception)
- {}
+ } catch (Exception) {
+ next = PixbufUtils.ErrorPixbuf;
+ }
}
if (animation.IsRunning)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]