# HG changeset patch # User ib # Date 1364172332 0 # Node ID db72a3183d41c6951d38c57a5e85f68519e4e5d2 # Parent df731f25759e1b9b010f51b9cd8ef2ad2c746399 Preselect current playlist directory from last playlist entry. Currently, it's preselected from the first (i.e. most recent) history file entry - which appears quite unrelated. Get the last playlist entry by using new listMgr command PLAYLIST_ITEM_GET_LAST. Fall back to the history file entry if there's no playlist entry. Based on a patch by Hans-Dieter Kosch, hdkosch kabelbw de. diff -r df731f25759e -r db72a3183d41 gui/dialog/playlist.c --- a/gui/dialog/playlist.c Mon Mar 25 00:44:28 2013 +0000 +++ b/gui/dialog/playlist.c Mon Mar 25 00:45:32 2013 +0000 @@ -499,6 +499,7 @@ gchar * root = "/"; gchar * dummy = "dummy"; DirNodeType * DirNode; + plItem * last; accel_group=gtk_accel_group_new(); @@ -545,7 +546,10 @@ gtk_ctree_expand( GTK_CTREE( CTDirTree ),parent ); gtk_widget_show( CTDirTree ); - if ( fsHistory[0] ) old_path = strdup( cfg_old_filename_from_utf8( fsHistory[0] ) ); + last=listMgr( PLAYLIST_ITEM_GET_LAST,0 ); + + if ( last && last->path ) old_path = strdup( last->path ); + else if ( fsHistory[0] ) old_path = strdup( cfg_old_filename_from_utf8( fsHistory[0] ) ); gtk_clist_set_column_widget( GTK_CLIST( CTDirTree ),0, AddLabel( MSGTR_PLAYLIST_DirectoryTree,NULL ) );