]> git.sesse.net Git - vlc/blobdiff - modules/gui/ncurses.c
* skins2/parser/skin_parser.cpp: Fixed a crash, and removed checks for unused attributes
[vlc] / modules / gui / ncurses.c
index 35f82e43dde996a8e6368e6dd3f0c222a6eb8ad8..e0566b0e2235fe8f2ab90a5829daa7d6e419c321 100644 (file)
@@ -27,6 +27,7 @@
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
+#define _GNU_SOURCE
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
 #include <errno.h>                                                 /* ENOMEM */
@@ -235,7 +236,7 @@ static int Open( vlc_object_t *p_this )
 
     /* Set quiet mode */
     val.i_int = -1;
-    var_Set( p_intf->p_vlc, "verbose", val );
+    var_Set( p_intf->p_libvlc, "verbose", val );
 
     /* Set defaul playlist view */
     p_sys->i_current_view = VIEW_CATEGORY;
@@ -262,7 +263,7 @@ static int Open( vlc_object_t *p_this )
     }
     else
     {
-        p_sys->psz_current_dir = strdup( p_intf->p_vlc->psz_homedir );
+        p_sys->psz_current_dir = strdup( p_intf->p_libvlc->psz_homedir );
     }
 
     p_sys->i_dir_entries = 0;
@@ -336,7 +337,7 @@ static void Run( intf_thread_t *p_intf )
      */
     t_last_refresh = ( time( 0 ) - 1);
 
-    while( !p_intf->b_die )
+    while( !intf_ShouldDie( p_intf ) )
     {
         msleep( INTF_IDLE_SLEEP );
 
@@ -522,7 +523,7 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
                 p_sys->i_box_plidx = 0;
                 break;
             case KEY_END:
-                p_sys->i_box_plidx = p_sys->p_playlist->i_size - 1;
+                p_sys->i_box_plidx = p_sys->p_playlist->items.i_size - 1;
                 break;
             case KEY_UP:
                 p_sys->i_box_plidx--;
@@ -565,13 +566,13 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
                 if( p_sys->pp_plist[p_sys->i_box_plidx]->p_item->i_children
                         == -1 )
                 {
-                    playlist_Control( p_sys->p_playlist, PLAYLIST_ITEMPLAY,
+                    playlist_Control( p_sys->p_playlist, PLAYLIST_VIEWPLAY,
+                        NULL,
                         p_sys->pp_plist[p_sys->i_box_plidx]->p_item );
                 }
                 else
                 {
                     playlist_Control( p_sys->p_playlist, PLAYLIST_VIEWPLAY,
-                        p_sys->i_current_view,
                         p_sys->pp_plist[p_sys->i_box_plidx]->p_item,
                         NULL );
                 }
@@ -834,7 +835,7 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
         case 'q':
         case 'Q':
         case 0x1b:  /* Esc */
-            p_intf->p_vlc->b_die = VLC_TRUE;
+            p_intf->p_libvlc->b_die = VLC_TRUE;
             return 0;
 
         /* Box switching */
@@ -1213,6 +1214,14 @@ static void Redraw( intf_thread_t *p_intf, time_t *t_last_refresh )
         {
             mvnprintw( y++, 0, COLS, " State    : Playing" );
         }
+        else if( val.i_int == OPENING_S )
+        {
+            mvnprintw( y++, 0, COLS, " State    : Openning/Connecting" );
+        }
+        else if( val.i_int == BUFFERING_S )
+        {
+            mvnprintw( y++, 0, COLS, " State    : Buffering" );
+        }
         else if( val.i_int == PAUSE_S )
         {
             mvnprintw( y++, 0, COLS, " State    : Paused" );