X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fplaylist.c;h=aec310df5be2dd04d458dea669f16ba07270fb6d;hb=b044f027724741a08a34a28988c94cb0eb07dd5b;hp=0644f7f88357241133c23cd326e2148e01f17dcf;hpb=3b734bdf296b2d0888924661c6bffeeb62088996;p=melted_gui diff --git a/src/playlist.c b/src/playlist.c index 0644f7f..aec310d 100644 --- a/src/playlist.c +++ b/src/playlist.c @@ -257,10 +257,13 @@ void omnplay_playlist_save(omnplay_instance_t* app) void omnplay_playlist_draw(omnplay_instance_t* app) { int i; + int* sels; char tc1[12], tc2[12]; GtkListStore *list_store; GtkTreeIter iter; + sels = omnplay_selected_idxs_playlist(app); + list_store = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(app->playlist_grid))); gtk_list_store_clear(list_store); @@ -286,6 +289,19 @@ void omnplay_playlist_draw(omnplay_instance_t* app) app->playlist.ver_prev = app->playlist.ver_curr; + if(sels) + { + GtkTreePath *path; + + /* select */ + path = gtk_tree_path_new_from_indices(sels[1], -1); + gtk_tree_selection_select_path(gtk_tree_view_get_selection(GTK_TREE_VIEW(app->playlist_grid)), path); + gtk_tree_view_set_cursor(GTK_TREE_VIEW(app->playlist_grid), path, NULL, FALSE); + gtk_tree_path_free(path); + + free(sels); + }; + pthread_mutex_unlock(&app->playlist.lock); };