summaryrefslogtreecommitdiff
path: root/plugins/gtkui/ddbtabstrip.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-03-15 19:51:49 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-03-15 19:51:49 +0100
commitd110bd22b9d46cd3924d679b52e619d519aa26b8 (patch)
treebd63a88cddc1b63579449cc3bb8777a9aefbfd05 /plugins/gtkui/ddbtabstrip.c
parentad7efed45e816099ea2d4db7fa25f1d5eff8eb57 (diff)
fixed playlist scroll positions after dragging tabs
Diffstat (limited to 'plugins/gtkui/ddbtabstrip.c')
-rw-r--r--plugins/gtkui/ddbtabstrip.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/gtkui/ddbtabstrip.c b/plugins/gtkui/ddbtabstrip.c
index 8004d0af..fb7a9319 100644
--- a/plugins/gtkui/ddbtabstrip.c
+++ b/plugins/gtkui/ddbtabstrip.c
@@ -504,7 +504,17 @@ on_tabstrip_motion_notify_event (GtkWidget *widget,
x += width - tab_overlap_size;
}
if (inspos >= 0 && inspos != ts->dragging) {
+ char str1[100];
+ char str2[100];
+ int pos1;
+ int pos2;
+ snprintf (str1, sizeof (str1), "playlist.scroll.%d", ts->dragging);
+ pos1 = deadbeef->conf_get_int (str1, 0);
+ snprintf (str2, sizeof (str2), "playlist.scroll.%d", inspos);
+ pos2 = deadbeef->conf_get_int (str2, 0);
deadbeef->plt_move (ts->dragging, inspos);
+ deadbeef->conf_set_int (str1, pos2);
+ deadbeef->conf_set_int (str2, pos1);
ts->dragging = inspos;
}
tabstrip_render (ts);