[vlc-commits] commit: ncurses: remove broken code to switch between flat/tree view ( Rafaël Carré )
git at videolan.org
git at videolan.org
Fri Oct 29 18:05:47 CEST 2010
vlc | branch: master | Rafaël Carré <rafael.carre at gmail.com> | Fri Oct 29 18:03:51 2010 +0200| [1036154b0e17e541259cfa39a74b362f3ea438ec] | committer: Rafaël Carré
ncurses: remove broken code to switch between flat/tree view
flat/tree view seems to be controlled by playlist-tree option these days
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1036154b0e17e541259cfa39a74b362f3ea438ec
---
modules/gui/ncurses.c | 21 ++-------------------
1 files changed, 2 insertions(+), 19 deletions(-)
diff --git a/modules/gui/ncurses.c b/modules/gui/ncurses.c
index cf558db..cd85170 100644
--- a/modules/gui/ncurses.c
+++ b/modules/gui/ncurses.c
@@ -209,7 +209,6 @@ struct intf_sys_t
bool b_show_hidden_files;
/* Playlist context */
- bool category_view;
struct pl_item_t **pp_plist;
int i_plist_entries;
bool b_need_update;
@@ -374,14 +373,6 @@ static void PlaylistDestroy(intf_sys_t *p_sys)
p_sys->pp_plist = NULL;
}
-static inline playlist_item_t *PlaylistGetRoot(intf_thread_t *p_intf)
-{
- playlist_t *p_playlist = pl_Get(p_intf);
- return p_intf->p_sys->category_view ?
- p_playlist->p_root_category :
- p_playlist->p_root_onelevel;
-}
-
static bool PlaylistAddChild(intf_sys_t *p_sys, playlist_item_t *p_child,
const char *c, const char d)
{
@@ -450,7 +441,7 @@ static void PlaylistRebuild(intf_thread_t *p_intf)
PL_LOCK;
PlaylistDestroy(p_sys);
- PlaylistAddNode(p_sys, PlaylistGetRoot(p_intf), "");
+ PlaylistAddNode(p_sys, p_playlist->p_root_onelevel, "");
PL_UNLOCK;
}
@@ -1363,18 +1354,12 @@ static bool HandlePlaylistKey(intf_thread_t *p_intf, int key)
/* Playlist sort */
case 'o':
case 'O':
- playlist_RecursiveNodeSort(p_playlist, PlaylistGetRoot(p_intf),
+ playlist_RecursiveNodeSort(p_playlist, p_playlist->p_root_onelevel,
SORT_TITLE_NODES_FIRST,
(key == 'o')? ORDER_NORMAL : ORDER_REVERSE);
p_sys->b_need_update = true;
return true;
- /* Playlist view */
- case 'v':
- p_sys->category_view = !p_sys->category_view;
- p_sys->b_need_update = true;
- return true;
-
case 'g':
FindIndex(p_sys, p_playlist);
return true;
@@ -1854,8 +1839,6 @@ static int Open(vlc_object_t *p_this)
p_sys->b_plidx_follow = true;
p_sys->b_color = var_CreateGetBool(p_intf, "color");
- p_sys->category_view = true; //FIXME: switching back & forth is broken
-
p_sys->psz_current_dir = var_CreateGetString(p_intf, "browse-dir");
if (!p_sys->psz_current_dir || !*p_sys->psz_current_dir)
{
More information about the vlc-commits
mailing list