banshee r3742 - in trunk/banshee: . src/Libraries/Hyena.Gui/Hyena.Gui.Theatrics src/Libraries/Hyena.Gui/Hyena.Widgets
- From: abock svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3742 - in trunk/banshee: . src/Libraries/Hyena.Gui/Hyena.Gui.Theatrics src/Libraries/Hyena.Gui/Hyena.Widgets
- Date: Thu, 10 Apr 2008 05:00:55 +0100 (BST)
Author: abock
Date: Thu Apr 10 05:00:55 2008
New Revision: 3742
URL: http://svn.gnome.org/viewvc/banshee?rev=3742&view=rev
Log:
2008-04-10 Aaron Bockover <abock gnome org>
* src/Libraries/Hyena.Gui/Hyena.Gui.Theatrics/Choreographer.cs:
* src/Libraries/Hyena.Gui/Hyena.Widgets/AnimatedBox.cs: Avoid using
nullable types for some stuffs
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Gui.Theatrics/Choreographer.cs
trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Widgets/AnimatedBox.cs
Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Gui.Theatrics/Choreographer.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Gui.Theatrics/Choreographer.cs (original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Gui.Theatrics/Choreographer.cs Thu Apr 10 05:00:55 2008
@@ -33,12 +33,14 @@
{
public enum Blocking
{
+ None,
Upstage,
Downstage
}
public enum Easing
{
+ None,
Linear,
QuadraticIn,
QuadraticOut,
Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Widgets/AnimatedBox.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Widgets/AnimatedBox.cs (original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Widgets/AnimatedBox.cs Thu Apr 10 05:00:55 2008
@@ -228,37 +228,37 @@
public new void Remove (Widget widget)
{
- RemoveCore (widget, null, null, null);
+ RemoveCore (widget, 0, Easing.None, Blocking.None);
}
public void Remove (Widget widget, uint duration)
{
- RemoveCore (widget, duration, null, null);
+ RemoveCore (widget, duration, Easing.None, Blocking.None);
}
public void Remove (Widget widget, Easing easing)
{
- RemoveCore (widget, null, easing, null);
+ RemoveCore (widget, 0, easing, Blocking.None);
}
public void Remove (Widget widget, uint duration, Easing easing)
{
- RemoveCore (widget, duration, easing, null);
+ RemoveCore (widget, duration, easing, Blocking.None);
}
public void Remove (Widget widget, Blocking blocking)
{
- RemoveCore (widget, null, null, blocking);
+ RemoveCore (widget, 0, Easing.None, blocking);
}
public void Remove (Widget widget, uint duration, Blocking blocking)
{
- RemoveCore (widget, duration, null, blocking);
+ RemoveCore (widget, duration, Easing.None, blocking);
}
public void Remove (Widget widget, Easing easing, Blocking blocking)
{
- RemoveCore (widget, null, easing, blocking);
+ RemoveCore (widget, 0, easing, blocking);
}
public void Remove (Widget widget, uint duration, Easing easing, Blocking blocking)
@@ -266,7 +266,7 @@
RemoveCore (widget, duration, easing, blocking);
}
- private void RemoveCore (Widget widget, uint? duration, Easing? easing, Blocking? blocking)
+ private void RemoveCore (Widget widget, uint duration, Easing easing, Blocking blocking)
{
if (widget == null) {
throw new ArgumentNullException ("widget");
@@ -292,19 +292,19 @@
RemoveCore (widget, widget.Duration, widget.Easing, widget.Blocking);
}
- private void RemoveCore (AnimatedWidget widget, uint? duration, Easing? easing, Blocking? blocking)
+ private void RemoveCore (AnimatedWidget widget, uint duration, Easing easing, Blocking blocking)
{
lock (widget) {
- if (duration != null) {
- widget.Duration = duration.Value;
+ if (duration > 0) {
+ widget.Duration = duration;
}
- if (easing != null) {
- widget.Easing = easing.Value;
+ if (easing != Easing.None) {
+ widget.Easing = easing;
}
- if (blocking != null) {
- widget.Blocking = blocking.Value;
+ if (blocking != Blocking.None) {
+ widget.Blocking = blocking;
}
if (widget.AnimationState == AnimationState.Coming) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]