changeset 1676:cf006d682cbe trunk

[svn] 4-way scroll support in the main window (volume & seek) by Jonathan Schleifer <js@h3c.de>.
author chainsaw
date Wed, 13 Sep 2006 08:06:57 -0700
parents cc5952675fca
children fdfd048eb9f3
files ChangeLog audacious/mainwin.c
diffstat 2 files changed, 31 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Sep 13 06:38:40 2006 -0700
+++ b/ChangeLog	Wed Sep 13 08:06:57 2006 -0700
@@ -1,3 +1,14 @@
+2006-09-13 13:38:40 +0000  Tony Vroon <chainsaw@gentoo.org>
+  revision [2287]
+  Fixes for NetBSD by Jonathan Schleifer <js@h3c.de>
+
+  Changes:        Modified:
+  +2 -0           trunk/Plugins/Container/xspf/xspf.c  
+  +6 -2           trunk/Plugins/Input/cdaudio/cdaudio.c  
+  +2 -0           trunk/Plugins/Input/cdaudio/cdaudio.h  
+  +2 -1           trunk/configure.ac  
+
+
 2006-09-13 12:22:45 +0000  Tony Vroon <chainsaw@gentoo.org>
   revision [2285]
   Remove unused bmp_player.xpm; as requested by Mikachu on #audacious.
--- a/audacious/mainwin.c	Wed Sep 13 06:38:40 2006 -0700
+++ b/audacious/mainwin.c	Wed Sep 13 08:06:57 2006 -0700
@@ -1103,17 +1103,29 @@
 }
 
 void
-mainwin_scrolled(GtkWidget * widget,
-                 GdkEventScroll * event,
-                 gpointer callback_data)
+mainwin_scrolled(GtkWidget *widget, GdkEventScroll *event,
+    gpointer callback_data)
 {
-    gint d = cfg.mouse_change;
-    if (event->direction == GDK_SCROLL_DOWN)
-        d *= -1;
-    mainwin_set_volume_diff(d);
+	switch (event->direction) {
+	case GDK_SCROLL_UP:
+		mainwin_set_volume_diff(cfg.mouse_change);
+		break;
+	case GDK_SCROLL_DOWN:
+		mainwin_set_volume_diff(-cfg.mouse_change);
+		break;
+	case GDK_SCROLL_LEFT:
+		if (playlist_get_current_length() != -1)
+			bmp_playback_seek(CLAMP(bmp_playback_get_time() - 1000,
+			    0, playlist_get_current_length()) / 1000);
+		break;
+	case GDK_SCROLL_RIGHT:
+		if (playlist_get_current_length() != -1)
+			bmp_playback_seek(CLAMP(bmp_playback_get_time() + 1000,
+			    0, playlist_get_current_length()) / 1000);
+		break;
+	}
 }
 
-
 static gboolean
 mainwin_mouse_button_press(GtkWidget * widget,
                            GdkEventButton * event,