banshee r4077 - in trunk/banshee: . src/Libraries/Hyena.Gui/Hyena.Widgets
- From: abock svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r4077 - in trunk/banshee: . src/Libraries/Hyena.Gui/Hyena.Widgets
- Date: Mon, 2 Jun 2008 22:14:25 +0000 (UTC)
Author: abock
Date: Mon Jun 2 22:14:25 2008
New Revision: 4077
URL: http://svn.gnome.org/viewvc/banshee?rev=4077&view=rev
Log:
2008-06-02 Aaron Bockover <abock gnome org>
* src/Libraries/Hyena.Gui/Hyena.Widgets/RatingMenuItem.cs:
* src/Libraries/Hyena.Gui/Hyena.Widgets/RatingEntry.cs: Only set the rating
when the mouse is released; fix some small issues with leave notify on
the menu item (BGO #535338)
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Widgets/RatingEntry.cs
trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Widgets/RatingMenuItem.cs
Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Widgets/RatingEntry.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Widgets/RatingEntry.cs (original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Widgets/RatingEntry.cs Mon Jun 2 22:14:25 2008
@@ -285,9 +285,7 @@
protected override bool OnLeaveNotifyEvent (Gdk.EventCrossing crossing)
{
- ClearHover ();
- QueueDraw ();
- return true;
+ return HandleLeaveNotify (crossing);
}
protected override bool OnMotionNotifyEvent (Gdk.EventMotion motion)
@@ -359,14 +357,21 @@
internal bool HandleMotionNotify (Gdk.ModifierType state, double x)
{
hover_value = renderer.RatingFromPosition (event_alloc, x);
- if ((state & Gdk.ModifierType.Button1Mask) != 0) {
+ /*if ((state & Gdk.ModifierType.Button1Mask) != 0) {
Value = hover_value;
- }
+ }*/
QueueDraw ();
return true;
}
+ internal bool HandleLeaveNotify (Gdk.EventCrossing crossing)
+ {
+ ClearHover ();
+ QueueDraw ();
+ return true;
+ }
+
#endregion
}
Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Widgets/RatingMenuItem.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Widgets/RatingMenuItem.cs (original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Widgets/RatingMenuItem.cs Mon Jun 2 22:14:25 2008
@@ -35,7 +35,6 @@
public class RatingMenuItem : ComplexMenuItem
{
private RatingEntry entry;
- private bool pressing;
private bool can_activate = true;
private Box box;
@@ -74,33 +73,20 @@
return x;
}
- protected override bool OnButtonPressEvent (Gdk.EventButton evnt)
- {
- pressing = true;
- entry.SetValueFromPosition (TransformX (evnt.X));
- return true;
- }
-
protected override bool OnButtonReleaseEvent (Gdk.EventButton evnt)
{
- pressing = false;
+ entry.SetValueFromPosition (TransformX (evnt.X));
return true;
}
protected override bool OnMotionNotifyEvent (Gdk.EventMotion evnt)
{
- if (!pressing) {
- return entry.HandleMotionNotify (evnt.State, TransformX (evnt.X));
- }
-
- entry.SetValueFromPosition (TransformX (evnt.X));
- return true;
+ return entry.HandleMotionNotify (evnt.State, TransformX (evnt.X));
}
-
+
protected override bool OnLeaveNotifyEvent (Gdk.EventCrossing evnt)
{
- pressing = false;
- return true;
+ return entry.HandleLeaveNotify (evnt);
}
protected override bool OnScrollEvent (Gdk.EventScroll evnt)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]