summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/gtkui/gtkui.c4
-rw-r--r--plugins/gtkui/mainplaylist.c2
-rw-r--r--plugins/gtkui/plcommon.c3
3 files changed, 6 insertions, 3 deletions
diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c
index 2deae9c1..437361af 100644
--- a/plugins/gtkui/gtkui.c
+++ b/plugins/gtkui/gtkui.c
@@ -617,6 +617,9 @@ gtkui_on_configchanged (void *data) {
// embolden current track
gtkui_embolden_current_track = deadbeef->conf_get_int ("gtkui.embolden_current_track", 0);
+ // pin groups
+ gtkui_groups_pinned = deadbeef->conf_get_int ("playlist.pin.groups", 0);
+
// tray icon
gtkui_update_status_icon (NULL);
@@ -836,7 +839,6 @@ gtkui_message (uint32_t id, uintptr_t ctx, uint32_t p1, uint32_t p2) {
break;
case DB_EV_CONFIGCHANGED:
g_idle_add (gtkui_on_configchanged, NULL);
- gtkui_groups_pinned = deadbeef->conf_get_int ("playlist.pin.groups",0);
break;
case DB_EV_OUTPUTCHANGED:
g_idle_add (outputchanged_cb, NULL);
diff --git a/plugins/gtkui/mainplaylist.c b/plugins/gtkui/mainplaylist.c
index 477d3550..cf656d4e 100644
--- a/plugins/gtkui/mainplaylist.c
+++ b/plugins/gtkui/mainplaylist.c
@@ -373,6 +373,8 @@ main_playlist_init (GtkWidget *widget) {
strncpy (group_by_str, deadbeef->conf_get_str_fast ("playlist.group_by", ""), sizeof (group_by_str));
deadbeef->conf_unlock ();
group_by_str[sizeof (group_by_str)-1] = 0;
+
+ gtkui_groups_pinned = deadbeef->conf_get_int ("playlist.pin.groups", 0);
}
void
diff --git a/plugins/gtkui/plcommon.c b/plugins/gtkui/plcommon.c
index 1f7b65d2..9e3e3cdc 100644
--- a/plugins/gtkui/plcommon.c
+++ b/plugins/gtkui/plcommon.c
@@ -769,9 +769,8 @@ void
on_pin_groups_active (GtkMenuItem *menuitem,
gpointer user_data)
{
- gboolean act = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (menuitem));
int old_val = deadbeef->conf_get_int ("playlist.pin.groups", 0);
- deadbeef->conf_set_int ("playlist.pin.groups", 1-old_val);
+ deadbeef->conf_set_int ("playlist.pin.groups", old_val ? 0 : 1);
deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0);
gtk_check_menu_item_toggled(GTK_CHECK_MENU_ITEM(menuitem));
ddb_playlist_t *plt = deadbeef->plt_get_curr ();