Mercurial > audlegacy
comparison src/audacious/ui_playlist.c @ 4199:5aab99923422
pressing space when the playlist is focused takes us to the current playing
song, fixes #129
author | Cristi Magherusan <majeru@atheme.org> |
---|---|
date | Sat, 19 Jan 2008 18:32:46 +0200 |
parents | ce8f5c9c0869 |
children | 40a991213507 |
comparison
equal
deleted
inserted
replaced
4198:de1265dab142 | 4199:5aab99923422 |
---|---|
1143 { | 1143 { |
1144 Playlist *playlist = playlist_get_active(); | 1144 Playlist *playlist = playlist_get_active(); |
1145 | 1145 |
1146 guint keyval; | 1146 guint keyval; |
1147 gboolean refresh = FALSE; | 1147 gboolean refresh = FALSE; |
1148 guint cur_pos; | |
1148 | 1149 |
1149 if (cfg.playlist_shaded) | 1150 if (cfg.playlist_shaded) |
1150 return FALSE; | 1151 return FALSE; |
1151 | 1152 |
1152 switch (keyval = event->keyval) { | 1153 switch (keyval = event->keyval) { |
1233 gtk_window_present(GTK_WINDOW(mainwin)); | 1234 gtk_window_present(GTK_WINDOW(mainwin)); |
1234 else if (cfg.equalizer_visible) | 1235 else if (cfg.equalizer_visible) |
1235 gtk_window_present(GTK_WINDOW(equalizerwin)); | 1236 gtk_window_present(GTK_WINDOW(equalizerwin)); |
1236 } | 1237 } |
1237 break; | 1238 break; |
1239 case GDK_space: | |
1240 cur_pos=playlist_get_position(playlist); | |
1241 UI_SKINNED_PLAYLIST(playlistwin_list)->first = | |
1242 cur_pos - (UI_SKINNED_PLAYLIST(playlistwin_list)->num_visible >> 1); | |
1243 refresh = TRUE; | |
1244 break; | |
1238 default: | 1245 default: |
1239 return FALSE; | 1246 return FALSE; |
1240 } | 1247 } |
1241 | 1248 |
1242 if (refresh) { | 1249 if (refresh) { |