changeset 3358:7f6787eac9aa trunk

right click on textboxes without connected handler should bring up audacious menu
author Tomasz Mon <desowin@gmail.com>
date Thu, 16 Aug 2007 19:20:11 +0200
parents 8e9f1b1a2d84
children 678ea77b6b1f
files src/audacious/ui_playlist.c src/audacious/ui_skinned_textbox.c
diffstat 2 files changed, 4 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/ui_playlist.c	Thu Aug 16 15:13:18 2007 +0200
+++ b/src/audacious/ui_playlist.c	Thu Aug 16 19:20:11 2007 +0200
@@ -1085,15 +1085,7 @@
             dock_move_release(GTK_WINDOW(playlistwin));
         return TRUE;
     }
-    else if (event->button == 3 &&
-               (event->y >= cfg.playlist_height - 29 &&
-                event->y < cfg.playlist_height - 11 &&
-                ((event->x >= 12 && event->x < 37) ||
-                 (event->x >= 41 && event->x < 66) ||
-                 (event->x >= 70 && event->x < 95) ||
-                 (event->x >= 99 && event->x < 124) ||
-                 (event->x >= playlistwin_get_width() - 46 &&
-                  event->x < playlistwin_get_width() - 23)))) {
+    else if (event->button == 3) {
         /*
          * Pop up the main menu a few pixels down to avoid
          * anything to be selected initially.
--- a/src/audacious/ui_skinned_textbox.c	Thu Aug 16 15:13:18 2007 +0200
+++ b/src/audacious/ui_skinned_textbox.c	Thu Aug 16 19:20:11 2007 +0200
@@ -353,7 +353,9 @@
 
     if (event->type == GDK_BUTTON_PRESS) {
         textbox = UI_SKINNED_TEXTBOX(widget);
-        if (event->button == 1) {
+        if (event->button == 3 && !g_signal_has_handler_pending(widget, textbox_signals[RIGHT_CLICKED], 0, TRUE))
+            return FALSE;
+        else if (event->button == 1) {
             if (priv->scroll_allowed) {
                 if ((priv->pixmap_width > textbox->width) && priv->is_scrollable) {
                     priv->is_dragging = TRUE;