[audacious-plugins/f17] Put back the hack for GTK+ < 3.5 to make trackpos slider work with

Michael Schwendt mschwendt at fedoraproject.org
Mon Jul 9 14:24:44 UTC 2012


commit 9c860f876dd4ef016b4f20e1a707dec64f1d0b96
Author: Michael Schwendt <mschwendt at fedoraproject.org>
Date:   Mon Jul 9 16:24:41 2012 +0200

    Put back the hack for GTK+ < 3.5 to make trackpos slider work with
    
      left button. The patch would need to be removed if gtk3 were upgraded
      from 3.4.x to 3.5 or later.

 audacious-plugins-3.2.4-ui_slider-button.patch |   25 ++++++++++++++++++++++++
 audacious-plugins.spec                         |   11 +++++++++-
 2 files changed, 35 insertions(+), 1 deletions(-)
---
diff --git a/audacious-plugins-3.2.4-ui_slider-button.patch b/audacious-plugins-3.2.4-ui_slider-button.patch
new file mode 100644
index 0000000..a95ff44
--- /dev/null
+++ b/audacious-plugins-3.2.4-ui_slider-button.patch
@@ -0,0 +1,25 @@
+diff -Nurb --strip-trailing-cr audacious-plugins-3.2.4-orig/src/gtkui/ui_gtk.c audacious-plugins-3.2.4/src/gtkui/ui_gtk.c
+--- audacious-plugins-3.2.4-orig/src/gtkui/ui_gtk.c	2012-06-30 02:05:33.000000000 +0200
++++ audacious-plugins-3.2.4/src/gtkui/ui_gtk.c	2012-07-09 16:07:13.589083335 +0200
+@@ -297,11 +297,21 @@
+ static gboolean ui_slider_button_press_cb(GtkWidget * widget, GdkEventButton * event, gpointer user_data)
+ {
+     slider_is_moving = TRUE;
++
++    /* HACK: clicking with the left mouse button moves the slider
++       to the location of the click. */
++    if (event->button == 1)
++        event->button = 2;
++
+     return FALSE;
+ }
+ 
+ static gboolean ui_slider_button_release_cb(GtkWidget * widget, GdkEventButton * event, gpointer user_data)
+ {
++    /* HACK: see ui_slider_button_press_cb */
++    if (event->button == 1)
++        event->button = 2;
++
+     slider_is_moving = FALSE;
+     return FALSE;
+ }
diff --git a/audacious-plugins.spec b/audacious-plugins.spec
index c8cfa7b..039d590 100644
--- a/audacious-plugins.spec
+++ b/audacious-plugins.spec
@@ -11,7 +11,7 @@
 
 Name: audacious-plugins
 Version: 3.2.4
-Release: 1%{?dist}
+Release: 2%{?dist}
 Summary: Plugins for the Audacious audio player
 Group: Applications/Multimedia
 URL: http://audacious-media-player.org/
@@ -31,6 +31,9 @@ Patch0: audacious-plugins-3.0-alpha1-xmms-skindir.patch
 Patch1: audacious-plugins-3.0-alpha1-enable-gnomeshortcuts.patch
 # Fedora customization: add default system-wide module_path
 Patch2: audacious-plugins-3.1-beta1-ladspa.patch
+# put back the hack from <= 3.2.3 for GTK+ < 3.5
+# will need to be removed if gtk3 gets upgraded from 3.4.x to >= 3.5
+Patch3: audacious-plugins-3.2.4-ui_slider-button.patch
 
 BuildRequires: audacious-devel >= %{aud_ver}
 BuildRequires: gettext-devel
@@ -136,6 +139,7 @@ providers may build it with libsidplay 2 instead.
 %patch0 -p1 -b .xmms-skindir
 %patch1 -p1 -b .enable-gnomeshortcuts
 %patch2 -p1 -b .ladspa
+%patch3 -p1 -b .slider-button
 
 for i in src/ladspa/plugin.c
 do
@@ -248,6 +252,11 @@ update-desktop-database &> /dev/null || :
 
 
 %changelog
+* Mon Jul  9 2012 Michael Schwendt <mschwendt at fedoraproject.org> - 3.2.4-2
+- Put back the hack for GTK+ < 3.5 to make trackpos slider work with
+  left button. The patch would need to be removed if gtk3 were upgraded
+  from 3.4.x to 3.5 or later.
+
 * Sat Jun 30 2012 Michael Schwendt <mschwendt at fedoraproject.org> - 3.2.4-1
 - Update to 3.2.4 (bug-fixes).
 


More information about the scm-commits mailing list