banshee r3397 - in trunk/banshee: . src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView
- From: abock svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3397 - in trunk/banshee: . src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView
- Date: Fri, 7 Mar 2008 23:40:23 +0000 (GMT)
Author: abock
Date: Fri Mar 7 23:40:23 2008
New Revision: 3397
URL: http://svn.gnome.org/viewvc/banshee?rev=3397&view=rev
Log:
2008-03-07 Aaron Bockover <abock gnome org>
* src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_DragAndDrop.cs:
Some minor fixes and cleanups
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_DragAndDrop.cs
trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs
Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_DragAndDrop.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_DragAndDrop.cs (original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_DragAndDrop.cs Fri Mar 7 23:40:23 2008
@@ -101,6 +101,7 @@
}
private uint drag_scroll_timeout_id;
+ private uint drag_scroll_timeout_duration = 50;
private double drag_scroll_velocity;
private double drag_scroll_velocity_max = 100.0;
@@ -117,6 +118,7 @@
protected override bool OnDragMotion (Gdk.DragContext context, int x, int y, uint time)
{
if (!Reorderable) {
+ StopDragScroll ();
return false;
}
@@ -132,7 +134,7 @@
}
if (drag_scroll_timeout_id == 0) {
- drag_scroll_timeout_id = GLib.Timeout.Add (50, OnDragScrollTimeout);
+ drag_scroll_timeout_id = GLib.Timeout.Add (drag_scroll_timeout_duration, OnDragScrollTimeout);
}
return true;
@@ -150,16 +152,7 @@
private bool OnDragScrollTimeout ()
{
- double actual_velocity = drag_scroll_velocity * drag_scroll_velocity_max;
-
- if (vadjustment.Value + actual_velocity < vadjustment.Lower) {
- vadjustment.Value = vadjustment.Lower;
- } else if (vadjustment.Value + actual_velocity > vadjustment.Upper - vadjustment.PageSize) {
- vadjustment.Value = vadjustment.Upper - vadjustment.PageSize;
- } else {
- vadjustment.Value += actual_velocity;
- }
-
+ ScrollTo (vadjustment.Value + (drag_scroll_velocity * drag_scroll_velocity_max));
return true;
}
}
Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs (original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs Fri Mar 7 23:40:23 2008
@@ -444,7 +444,7 @@
#endregion
#region Adjustments & Scrolling
-
+
private void UpdateAdjustments (Adjustment hadj, Adjustment vadj)
{
if (vadj != null) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]