summaryrefslogtreecommitdiff
path: root/plugins/gtkui
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-08-09 22:29:59 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-08-09 22:29:59 +0200
commite4b30f8f2bb944e05a44ca90237c4787a50118bf (patch)
tree8a009a07e381af5377c653a1cff0c3d61a6e43c0 /plugins/gtkui
parenteb1a7ba7241ecb2cb2b2d0c99b5981efd109aeea (diff)
switch between playlists with keys 1-9 with and without alt(mod1) modifier
Diffstat (limited to 'plugins/gtkui')
-rw-r--r--plugins/gtkui/callbacks.c7
-rw-r--r--plugins/gtkui/ddbtabstrip.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/plugins/gtkui/callbacks.c b/plugins/gtkui/callbacks.c
index 800b7489..1f1c817b 100644
--- a/plugins/gtkui/callbacks.c
+++ b/plugins/gtkui/callbacks.c
@@ -298,6 +298,13 @@ on_mainwin_key_press_event (GtkWidget *widget,
// button for that one is not in toolbar anymore, so handle it manually
deadbeef->sendmessage (M_PLAYRANDOM, 0, 0, 0);
}
+ else if ((event->state == GDK_MOD1_MASK || event->state == 0) && event->keyval >= GDK_1 && event->keyval <= GDK_9) {
+ int pl = event->keyval - GDK_1;
+ if (pl >= 0 && pl < deadbeef->plt_get_count ()) {
+ deadbeef->plt_set_curr (pl);
+ deadbeef->conf_set_int ("playlist.current", pl);
+ }
+ }
else {
ddb_listview_handle_keypress (DDB_LISTVIEW (lookup_widget (mainwin, "playlist")), event->keyval, event->state);
}
diff --git a/plugins/gtkui/ddbtabstrip.c b/plugins/gtkui/ddbtabstrip.c
index cc2d010d..20fdc186 100644
--- a/plugins/gtkui/ddbtabstrip.c
+++ b/plugins/gtkui/ddbtabstrip.c
@@ -685,7 +685,7 @@ on_tabstrip_button_press_event (GtkWidget *widget,
if (playlist != -1) {
deadbeef->plt_set_curr (playlist);
deadbeef->conf_set_int ("playlist.current", playlist);
- tabstrip_render (ts);
+ //tabstrip_render (ts);
}
return FALSE;
}