]> git.sesse.net Git - vlc/blobdiff - modules/gui/ncurses/ncurses.c
compilation fix
[vlc] / modules / gui / ncurses / ncurses.c
index 089777fa61d626ce46a5e89b1dedeaade129e3ef..ef3f0de4f55f52a596c00d8c9be7a20c02f73d3c 100644 (file)
@@ -2,7 +2,7 @@
  * ncurses.c : NCurses plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001-2004 VideoLAN
- * $Id: ncurses.c,v 1.10 2004/01/11 00:01:35 fenrir Exp $
+ * $Id$
  *
  * Authors: Sam Hocevar <sam@zoy.org>
  *          Laurent Aimar <fenrir@via.ecp.fr>
@@ -393,12 +393,12 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
                 ManageSlider ( p_intf );
                 return 1;
             case KEY_UP:
-                p_sys->f_slider += 20.0;
+                p_sys->f_slider += 5.0;
                 if( p_sys->f_slider >= 99.0 ) p_sys->f_slider = 99.0;
                 ManageSlider ( p_intf );
                 return 1;
             case KEY_DOWN:
-                p_sys->f_slider -= 20.0;
+                p_sys->f_slider -= 5.0;
                 if( p_sys->f_slider < 0.0 ) p_sys->f_slider = 0.0;
                 ManageSlider ( p_intf );
                 return 1;
@@ -448,13 +448,13 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
 
         /* Navigation */
         case KEY_RIGHT:
-            p_sys->f_slider += 5.0;
+            p_sys->f_slider += 1.0;
             if( p_sys->f_slider > 99.9 ) p_sys->f_slider = 99.9;
             ManageSlider ( p_intf );
             return 1;
 
         case KEY_LEFT:
-            p_sys->f_slider -= 5.0;
+            p_sys->f_slider -= 1.0;
             if( p_sys->f_slider < 0.0 ) p_sys->f_slider = 0.0;
             ManageSlider ( p_intf );
             return 1;
@@ -497,7 +497,7 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
                 val.b_bool = VLC_TRUE;
                 var_Set( p_sys->p_input, "prev-title", val );
             }
-            break;
+            return 1;
 
         case ']':
             if( p_sys->p_input )
@@ -505,7 +505,7 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
                 val.b_bool = VLC_TRUE;
                 var_Set( p_sys->p_input, "next-title", val );
             }
-            break;
+            return 1;
 
         case '<':
             if( p_sys->p_input )
@@ -513,7 +513,7 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
                 val.b_bool = VLC_TRUE;
                 var_Set( p_sys->p_input, "prev-chapter", val );
             }
-            break;
+            return 1;
 
         case '>':
             if( p_sys->p_input )
@@ -521,7 +521,7 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
                 val.b_bool = VLC_TRUE;
                 var_Set( p_sys->p_input, "next-chapter", val );
             }
-            break;
+            return 1;
 
         case 'p':
             if( p_intf->p_sys->p_playlist )
@@ -764,8 +764,8 @@ static void Redraw ( intf_thread_t *p_intf, time_t *t_last_refresh )
         MainBoxWrite( p_intf, l++, 1, "     n, p        Next/Previous item" );
         MainBoxWrite( p_intf, l++, 1, "     [, ]        Next/Previous title" );
         MainBoxWrite( p_intf, l++, 1, "     <, >        Next/Previous title" );
-        MainBoxWrite( p_intf, l++, 1, "     <right>     Seek +5%%" );
-        MainBoxWrite( p_intf, l++, 1, "     <left>      Seek -5%%" );
+        MainBoxWrite( p_intf, l++, 1, "     <right>     Seek +1%%" );
+        MainBoxWrite( p_intf, l++, 1, "     <left>      Seek -1%%" );
         MainBoxWrite( p_intf, l++, 1, "" );
 
         MainBoxWrite( p_intf, l++, 1, "[Playlist]" );
@@ -782,7 +782,7 @@ static void Redraw ( intf_thread_t *p_intf, time_t *t_last_refresh )
         MainBoxWrite( p_intf, l++, 1, "" );
 
         MainBoxWrite( p_intf, l++, 1, "[Player]" );
-        MainBoxWrite( p_intf, l++, 1, "  <up>,<down>    Seek +/-20%%" );
+        MainBoxWrite( p_intf, l++, 1, "  <up>,<down>    Seek +/-5%%" );
         MainBoxWrite( p_intf, l++, 1, "" );
 
         MainBoxWrite( p_intf, l++, 1, "[Miscellaneous]" );
@@ -807,29 +807,26 @@ static void Redraw ( intf_thread_t *p_intf, time_t *t_last_refresh )
     {
         /* Info box */
         int l = 0;
-        DrawBox( p_sys->w, y++, 0, h, COLS, " Informations " );
+        DrawBox( p_sys->w, y++, 0, h, COLS, " Information " );
 
         if( p_input )
         {
-            input_info_category_t * p_category;
-            input_info_t * p_info;
+            int i,j;
 
             vlc_mutex_lock( &p_input->stream.stream_lock );
-            p_category = p_input->stream.p_info;
-            while ( p_category )
+            for ( i = 0; i < p_input->p_item->i_categories; i++ )
             {
+                info_category_t *p_category = p_input->p_item->pp_categories[i];
                 if( y >= y_end ) break;
                 MainBoxWrite( p_intf, l++, 1, "  [%s]", p_category->psz_name );
-                p_info = p_category->p_info;
-                while ( p_info )
+                for ( j = 0; j < p_category->i_infos; j++ )
                 {
+                    info_t *p_info = p_category->pp_infos[j];
                     if( y >= y_end ) break;
                     MainBoxWrite( p_intf, l++, 1, "      %s: %s", p_info->psz_name, p_info->psz_value );
-                    p_info = p_info->p_next;
                 }
-                p_category = p_category->p_next;
             }
-            vlc_mutex_unlock( &p_input->stream.stream_lock );
+            vlc_mutex_unlock( &p_input->p_item->lock );
         }
         else
         {
@@ -933,20 +930,21 @@ static void Redraw ( intf_thread_t *p_intf, time_t *t_last_refresh )
             {
                 attrset( A_REVERSE );
             }
-            if( !strcmp( p_playlist->pp_items[i_item]->psz_name, p_playlist->pp_items[i_item]->psz_uri ) )
+            if( !strcmp( p_playlist->pp_items[i_item]->input.psz_name,
+                         p_playlist->pp_items[i_item]->input.psz_uri ) )
             {
                 mvnprintw( y++, 1, COLS - 2, "%c %d - '%s'",
                            c,
                            i_item,
-                           p_playlist->pp_items[i_item]->psz_uri );
+                           p_playlist->pp_items[i_item]->input.psz_uri );
             }
             else
             {
                 mvnprintw( y++, 1, COLS - 2, "%c %d - '%s' (%s)",
                           c,
                           i_item,
-                          p_playlist->pp_items[i_item]->psz_uri,
-                          p_playlist->pp_items[i_item]->psz_name );
+                          p_playlist->pp_items[i_item]->input.psz_uri,
+                          p_playlist->pp_items[i_item]->input.psz_name );
             }
             if( b_selected )
             {
@@ -996,7 +994,7 @@ static void Eject ( intf_thread_t *p_intf )
         return;
     }
 
-    psz_name = p_playlist->pp_items[ p_playlist->i_index ]->psz_name;
+    psz_name = p_playlist->pp_items[ p_playlist->i_index ]->input.psz_name;
 
     if( psz_name )
     {