summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-07-31 20:54:33 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-07-31 20:54:33 +0200
commit2f1e23a9bd61ce9294af0835b607b265b82515c0 (patch)
tree869ecc039c5f863bb4340dfed699672b101bd6d5
parent06eba444e09b3929ff18f1e3fe80cb7e9c9dc7a1 (diff)
added select all hotkey
-rw-r--r--features.txt2
-rw-r--r--gtkplaylist.c10
2 files changed, 10 insertions, 2 deletions
diff --git a/features.txt b/features.txt
index 0a135a9c..dda1bef7 100644
--- a/features.txt
+++ b/features.txt
@@ -4,4 +4,4 @@
[-] eat minimum memory (dont hold all metainfo in memory, etc)
[+] seamless playback (no pauses between tracks)
* still needs some more work in some codecs
-playlist must be superfast
+[+] playlist must be superfast
diff --git a/gtkplaylist.c b/gtkplaylist.c
index f86f1d96..86f6c758 100644
--- a/gtkplaylist.c
+++ b/gtkplaylist.c
@@ -693,7 +693,15 @@ gtkps_keypress (int keyval, int state) {
GtkWidget *range = lookup_widget (mainwin, "playscroll");
int prev = playlist_row;
int newscroll = scrollpos;
- if (keyval == GDK_Down && playlist_row < ps_getcount () - 1) {
+ if ((keyval == GDK_A || keyval == GDK_a) && (state & GDK_CONTROL_MASK)) {
+ // select all
+ for (playItem_t *it = playlist_head; it; it = it->next) {
+ it->selected = 1;
+ }
+ draw_playlist (widget, 0, 0, widget->allocation.width, widget->allocation.height);
+ gdk_draw_drawable (widget->window, widget->style->black_gc, backbuf, 0, 0, 0, 0, widget->allocation.width, widget->allocation.height);
+ }
+ else if (keyval == GDK_Down && playlist_row < ps_getcount () - 1) {
playlist_row++;
if (playlist_row > scrollpos + widget->allocation.height / rowheight - 1) {
newscroll = playlist_row - widget->allocation.height / rowheight + 1;