diff options
author | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-10-27 20:09:11 +0100 |
---|---|---|
committer | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-10-27 20:09:11 +0100 |
commit | 5ff62d21030740914a1c6a5f158c191321cf7778 (patch) | |
tree | 0a64a13f9db4eabc2c7dc8c41fac831f58e0a0a9 | |
parent | a306a117c799c158cb4f25f14fb047931c8584da (diff) |
gtkui: don't reinit playlist vscroll on selection changes; fixed empty space in laylist after removing tracks at the end
-rw-r--r-- | plugins/gtkui/ddblistview.c | 4 | ||||
-rw-r--r-- | plugins/gtkui/mainplaylist.c | 1 | ||||
-rw-r--r-- | plugins/gtkui/widgets.c | 4 |
3 files changed, 4 insertions, 5 deletions
diff --git a/plugins/gtkui/ddblistview.c b/plugins/gtkui/ddblistview.c index e590152b..7631c16a 100644 --- a/plugins/gtkui/ddblistview.c +++ b/plugins/gtkui/ddblistview.c @@ -1182,8 +1182,8 @@ ddb_listview_list_setup_vscroll (DdbListview *ps) { } else { gtk_widget_show (scroll); - if (ps->scrollpos >= vheight) { - ps->scrollpos = vheight-1; + if (ps->scrollpos >= vheight - a.height) { + ps->scrollpos = vheight - a.height; } } int h = a.height; diff --git a/plugins/gtkui/mainplaylist.c b/plugins/gtkui/mainplaylist.c index ec70c227..99eebd63 100644 --- a/plugins/gtkui/mainplaylist.c +++ b/plugins/gtkui/mainplaylist.c @@ -208,7 +208,6 @@ main_delete_selected (void) { void main_select (DdbListviewIter it, int sel) { deadbeef->pl_set_selected ((DB_playItem_t *)it, sel); - deadbeef->sendmessage (DB_EV_SELCHANGED, 0, deadbeef->plt_get_curr_idx (), PL_MAIN); } int diff --git a/plugins/gtkui/widgets.c b/plugins/gtkui/widgets.c index acf9a4e2..88c0f8f7 100644 --- a/plugins/gtkui/widgets.c +++ b/plugins/gtkui/widgets.c @@ -1782,7 +1782,7 @@ w_tabbed_playlist_message (ddb_gtkui_widget_t *w, uint32_t id, uintptr_t ctx, ui g_idle_add (trackfocus_cb, w); break; case DB_EV_SELCHANGED: - if (ctx != (uintptr_t)tp->list) { + if (ctx != (uintptr_t)tp->list || p2 == PL_SEARCH) { g_idle_add (refresh_cb, tp->list); } break; @@ -1835,7 +1835,7 @@ w_playlist_message (ddb_gtkui_widget_t *w, uint32_t id, uintptr_t ctx, uint32_t g_idle_add (trackfocus_cb, w); break; case DB_EV_SELCHANGED: - if (ctx != (uintptr_t)p->list) { + if (ctx != (uintptr_t)p->list || p2 == PL_SEARCH) { g_idle_add (refresh_cb, p->list); } break; |