Mercurial > audlegacy
diff src/audacious/ui_skinned_horizontal_slider.c @ 3600:aba660a4a15d trunk
Pop up playback menu if right clicked over playback-control widgets
author | Tomasz Mon <desowin@gmail.com> |
---|---|
date | Sun, 23 Sep 2007 15:36:35 +0200 |
parents | 7ed2be7e885e |
children | 9a8e54ffdd76 |
line wrap: on
line diff
--- a/src/audacious/ui_skinned_horizontal_slider.c Sat Sep 22 22:50:57 2007 +0300 +++ b/src/audacious/ui_skinned_horizontal_slider.c Sun Sep 23 15:36:35 2007 +0200 @@ -295,21 +295,25 @@ if (event->type == GDK_BUTTON_PRESS) { if (event->button == 1) { - gint x; + gint x; - x = event->x - (priv->knob_width / (priv->double_size ? 1 : 2)); - hs->pressed = TRUE; + x = event->x - (priv->knob_width / (priv->double_size ? 1 : 2)); + hs->pressed = TRUE; - priv->position = x/(1+priv->double_size); - if (priv->position < priv->min) - priv->position = priv->min; - if (priv->position > priv->max) - priv->position = priv->max; - if (priv->frame_cb) - priv->frame = priv->frame_cb(priv->position); + priv->position = x/(1+priv->double_size); + if (priv->position < priv->min) + priv->position = priv->min; + if (priv->position > priv->max) + priv->position = priv->max; + if (priv->frame_cb) + priv->frame = priv->frame_cb(priv->position); - g_signal_emit_by_name(widget, "motion", priv->position); - gtk_widget_queue_draw(widget); + g_signal_emit_by_name(widget, "motion", priv->position); + gtk_widget_queue_draw(widget); + } else if (event->button == 3) { + event->x = event->x + hs->x; + event->y = event->y + hs->y; + return FALSE; } } return TRUE;