changeset 3030:c442f8407dcb

Show playlist popup information reliably (Debian bug #460802)
author John Lindgren <john.lindgren@tds.net>
date Fri, 10 Apr 2009 01:46:08 -0400
parents 9c0673583d73
children 9cba6d37570e
files src/skins/ui_skinned_playlist.c
diffstat 1 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/skins/ui_skinned_playlist.c	Fri Apr 10 01:34:22 2009 -0400
+++ b/src/skins/ui_skinned_playlist.c	Fri Apr 10 01:46:08 2009 -0400
@@ -957,13 +957,15 @@
         priv->drag_pos = nr;
     } else if (config.show_filepopup_for_tuple) {
         gint pos = ui_skinned_playlist_get_position(widget, event->x, event->y);
-        gint cur_pos = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "popup_position"));
-        if (pos != cur_pos) {
-            g_object_set_data(G_OBJECT(widget), "popup_position", GINT_TO_POINTER(pos));
-            ui_skinned_playlist_popup_hide(widget);
-            ui_skinned_playlist_popup_timer_stop(widget);
-            if (pos != -1)
-                ui_skinned_playlist_popup_timer_start(widget);
+        if (pos == -1) {
+           ui_skinned_playlist_popup_hide (widget);
+           ui_skinned_playlist_popup_timer_stop (widget);
+        } else if (! g_object_get_data ((GObject *) widget, "popup_active") ||
+         pos != (int) g_object_get_data ((GObject *) widget, "popup_position")) {
+           ui_skinned_playlist_popup_hide (widget);
+           ui_skinned_playlist_popup_timer_stop (widget);
+           g_object_set_data ((GObject *) widget, "popup_position", (void *) pos);
+           ui_skinned_playlist_popup_timer_start (widget);
         }
     }