changeset 3394:f5e5e9653287

merge
author Cristi Magherusan <majeru@atheme-project.org>
date Fri, 24 Aug 2007 19:41:48 +0300
parents 3fa4ee796bd1 (current diff) 30088b5ae4e4 (diff)
children df609e7e7bcf
files
diffstat 2 files changed, 15 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Wed Aug 22 13:09:03 2007 +0300
+++ b/configure.ac	Fri Aug 24 19:41:48 2007 +0300
@@ -101,8 +101,8 @@
 
 dnl Check for libmowgli.
 
-PKG_CHECK_MODULES(MOWGLI, [libmowgli >= 0.3],
-    [ADD_PC_REQUIRES([libmowgli >= 0.3])],
+PKG_CHECK_MODULES(MOWGLI, [libmowgli >= 0.4],
+    [ADD_PC_REQUIRES([libmowgli >= 0.4])],
     [AC_MSG_ERROR([Cannot find libmowgli: try http://www.atheme-project.org/projects/mowgli.shtml])]
 )
 
--- a/src/audacious/ui_playlist.c	Wed Aug 22 13:09:03 2007 +0300
+++ b/src/audacious/ui_playlist.c	Fri Aug 24 19:41:48 2007 +0300
@@ -1096,14 +1096,17 @@
     return TRUE;
 }
 
-static void
+static gboolean
 playlistwin_keypress_up_down_handler(UiSkinnedPlaylist * pl,
                                      gboolean up, guint state)
 {
     Playlist *playlist = playlist_get_active();
+    if ((!(pl->prev_selected || pl->first) && up) ||
+       ((pl->prev_selected >= playlist_get_length(playlist) - 1) && !up))
+         return FALSE;
 
     if ((state & GDK_MOD1_MASK) && (state & GDK_SHIFT_MASK))
-        return;
+        return FALSE;
     if (!(state & GDK_MOD1_MASK))
         playlist_select_all(playlist, FALSE);
 
@@ -1125,7 +1128,7 @@
         pl->first = MAX(pl->first, pl->prev_max -
                            pl->num_visible + 1);
         playlist_select_range(playlist, pl->prev_min, pl->prev_max, TRUE);
-        return;
+        return TRUE;
     }
     else if (state & GDK_MOD1_MASK) {
         if (up)
@@ -1136,7 +1139,7 @@
             pl->first = pl->prev_min;
         else if (pl->prev_max >= (pl->first + pl->num_visible))
             pl->first = pl->prev_max - pl->num_visible + 1;
-        return;
+        return TRUE;
     }
     else if (up)
         pl->prev_selected--;
@@ -1153,6 +1156,8 @@
 
     playlist_select_range(playlist, pl->prev_selected, pl->prev_selected, TRUE);
     pl->prev_min = -1;
+
+    return TRUE;
 }
 
 /* FIXME: Handle the keys through menu */
@@ -1173,11 +1178,10 @@
     case GDK_KP_Down:
     case GDK_Up:
     case GDK_Down:
-        playlistwin_keypress_up_down_handler(UI_SKINNED_PLAYLIST(playlistwin_list),
-                                             keyval == GDK_Up
-                                             || keyval == GDK_KP_Up,
-                                             event->state);
-        refresh = TRUE;
+        refresh = playlistwin_keypress_up_down_handler(UI_SKINNED_PLAYLIST(playlistwin_list),
+                                                       keyval == GDK_Up
+                                                       || keyval == GDK_KP_Up,
+                                                       event->state);
         break;
     case GDK_Page_Up:
         playlistwin_scroll(-UI_SKINNED_PLAYLIST(playlistwin_list)->num_visible);