summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-03-15 19:58:12 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-03-15 19:58:12 +0100
commitab875885195c5adae7eace82611659c1ef026d0c (patch)
treea1f6c71f82fb813b13f91b6f96e67f967e0dd188 /plugins
parentd110bd22b9d46cd3924d679b52e619d519aa26b8 (diff)
remember selected tab
Diffstat (limited to 'plugins')
-rw-r--r--plugins/gtkui/ddbtabstrip.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/gtkui/ddbtabstrip.c b/plugins/gtkui/ddbtabstrip.c
index fb7a9319..6e538df6 100644
--- a/plugins/gtkui/ddbtabstrip.c
+++ b/plugins/gtkui/ddbtabstrip.c
@@ -408,6 +408,7 @@ on_tabstrip_button_press_event (GtkWidget *widget,
{
if (tab_clicked != -1) {
deadbeef->plt_set_curr (tab_clicked);
+ deadbeef->conf_set_int ("playlist.current", tab_clicked);
}
int x = -ts->hscrollpos + tabs_left_margin;
@@ -516,6 +517,7 @@ on_tabstrip_motion_notify_event (GtkWidget *widget,
deadbeef->conf_set_int (str1, pos2);
deadbeef->conf_set_int (str2, pos1);
ts->dragging = inspos;
+ deadbeef->conf_set_int ("playlist.current", ts->dragging);
}
tabstrip_render (ts);
tabstrip_expose (ts, 0, 0, widget->allocation.width, widget->allocation.height);
@@ -575,7 +577,9 @@ on_add_new_playlist1_activate (GtkMenuItem *menuitem,
}
}
if (i == cnt) {
- deadbeef->plt_add (cnt, name);
+ int playlist = deadbeef->plt_add (cnt, name);
+ deadbeef->plt_set_curr (playlist);
+ deadbeef->conf_set_int ("playlist.current", playlist);
DdbTabStrip *ts = DDB_TABSTRIP (lookup_widget (mainwin, "tabstrip"));
tabstrip_render (ts);
tabstrip_expose (ts, 0, 0, GTK_WIDGET (ts)->allocation.width, GTK_WIDGET (ts)->allocation.height);