banshee r2964 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Gui.Widgets
- From: abock svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r2964 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Gui.Widgets
- Date: Thu, 10 Jan 2008 22:44:55 +0000 (GMT)
Author: abock
Date: Thu Jan 10 22:44:55 2008
New Revision: 2964
URL: http://svn.gnome.org/viewvc/banshee?rev=2964&view=rev
Log:
2008-01-10 Aaron Bockover <abockover novell com>
* src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs:
Show/Hide the cover art popup only when the cursor enters the actual
cover art thumbnail, not the entire widget
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs
Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs (original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs Thu Jan 10 22:44:55 2008
@@ -139,42 +139,20 @@
protected override bool OnEnterNotifyEvent (Gdk.EventCrossing evnt)
{
- in_thumbnail_region = true;
-
- if (popup_timeout_id > 0) {
- return false;
- }
-
- popup_timeout_id = GLib.Timeout.Add (500, delegate {
- if (in_thumbnail_region) {
- UpdatePopup ();
- }
-
- popup_timeout_id = 0;
- return false;
- });
-
- return true;
+ in_thumbnail_region = evnt.X <= Allocation.Height;
+ return ShowHideCoverArt ();
}
protected override bool OnLeaveNotifyEvent (Gdk.EventCrossing evnt)
{
in_thumbnail_region = false;
-
- if (popup_timeout_id > 0) {
- GLib.Source.Remove (popup_timeout_id);
- popup_timeout_id = 0;
- }
-
- GLib.Timeout.Add (100, delegate {
- if (!in_popup) {
- HidePopup ();
- }
-
- return false;
- });
-
- return true;
+ return ShowHideCoverArt ();
+ }
+
+ protected override bool OnMotionNotifyEvent (Gdk.EventMotion evnt)
+ {
+ in_thumbnail_region = evnt.X <= Allocation.Height;
+ return ShowHideCoverArt ();
}
private void OnPopupEnterNotifyEvent (object o, EnterNotifyEventArgs args)
@@ -187,6 +165,39 @@
in_popup = false;
HidePopup ();
}
+
+ private bool ShowHideCoverArt ()
+ {
+ if (!in_thumbnail_region) {
+ if (popup_timeout_id > 0) {
+ GLib.Source.Remove (popup_timeout_id);
+ popup_timeout_id = 0;
+ }
+
+ GLib.Timeout.Add (100, delegate {
+ if (!in_popup) {
+ HidePopup ();
+ }
+
+ return false;
+ });
+ } else {
+ if (popup_timeout_id > 0) {
+ return false;
+ }
+
+ popup_timeout_id = GLib.Timeout.Add (500, delegate {
+ if (in_thumbnail_region) {
+ UpdatePopup ();
+ }
+
+ popup_timeout_id = 0;
+ return false;
+ });
+ }
+
+ return true;
+ }
#endregion
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]