summaryrefslogtreecommitdiff
path: root/plugins/gtkui/ddbtabstrip.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-08-09 22:20:10 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-08-09 22:20:10 +0200
commit8f99885fd1b51c27bd2fb84332b2087f96792d2c (patch)
treef15281a47bf6dc600f90a54b61f17e9d833f7b44 /plugins/gtkui/ddbtabstrip.c
parent3a50ce20a56e47f6c1b4d12fb85fec6f2eeac924 (diff)
add new playlist on emptyspace double-click
Diffstat (limited to 'plugins/gtkui/ddbtabstrip.c')
-rw-r--r--plugins/gtkui/ddbtabstrip.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/plugins/gtkui/ddbtabstrip.c b/plugins/gtkui/ddbtabstrip.c
index 82b11003..cc2d010d 100644
--- a/plugins/gtkui/ddbtabstrip.c
+++ b/plugins/gtkui/ddbtabstrip.c
@@ -678,6 +678,19 @@ on_tabstrip_button_press_event (GtkWidget *widget,
deadbeef->plt_set_curr (tab_clicked);
deadbeef->conf_set_int ("playlist.current", tab_clicked);
}
+ else {
+ if (event->type == GDK_2BUTTON_PRESS) {
+ // new tab
+ int playlist = gtkui_add_new_playlist ();
+ if (playlist != -1) {
+ deadbeef->plt_set_curr (playlist);
+ deadbeef->conf_set_int ("playlist.current", playlist);
+ tabstrip_render (ts);
+ }
+ return FALSE;
+ }
+ return FALSE;
+ }
int x = -ts->hscrollpos + tabs_left_margin;
int idx;