]> git.sesse.net Git - vlc/blobdiff - modules/gui/ncurses.c
Revert "Qt: fix missing translations"
[vlc] / modules / gui / ncurses.c
index f40f81d5a6ec044e612310983764f0650c481e48..2c58fab7c0aeeb9933347d13560c6ea67fff6281 100644 (file)
@@ -1115,20 +1115,15 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
         /* Common control */
         case 'f':
         {
+            bool fs = var_ToggleBool( p_playlist, "fullscreen" );
             if( p_intf->p_sys->p_input )
             {
-                vout_thread_t *p_vout;
-                p_vout = vlc_object_find( p_intf->p_sys->p_input,
-                                          VLC_OBJECT_VOUT, FIND_CHILD );
+                vout_thread_t *p_vout = input_GetVout( p_intf->p_sys->p_input );
                 if( p_vout )
                 {
-                    var_ToggleBool( p_vout, "fullscreen" );
+                    var_SetBool( p_vout, "fullscreen", fs );
                     vlc_object_release( p_vout );
                 }
-                else
-                {
-                    var_ToggleBool( p_playlist, "fullscreen" );
-                }
             }
             i_ret = 0;
             break;
@@ -1525,10 +1520,10 @@ static void Redraw( intf_thread_t *p_intf, time_t *t_last_refresh )
 
             /* Position */
             var_Get( p_input, "time", &val );
-            msecstotimestr( buf1, val.i_time / 1000 );
+            secstotimestr( buf1, val.i_time / CLOCK_FREQ );
 
             var_Get( p_input, "length", &val );
-            msecstotimestr( buf2, val.i_time / 1000 );
+            secstotimestr( buf2, val.i_time / CLOCK_FREQ );
 
             mvnprintw( y++, 0, COLS, _(" Position : %s/%s (%.2f%%)"), buf1, buf2, p_sys->f_slider );
 
@@ -1977,13 +1972,13 @@ static void Redraw( intf_thread_t *p_intf, time_t *t_last_refresh )
             MainBoxWrite( p_intf, l, 1, _("+-[Incoming]"));
             SHOW_ACS( 1, ACS_ULCORNER );  SHOW_ACS( 2, ACS_HLINE ); l++;
             if( p_sys->b_color ) wcolor_set( p_sys->w, C_DEFAULT, NULL );
-            MainBoxWrite( p_intf, l, 1, _("| input bytes read : %8.0f kB"),
-                    (float)(p_item->p_stats->i_read_bytes)/1000 );
+            MainBoxWrite( p_intf, l, 1, _("| input bytes read : %8.0f KiB"),
+                    (float)(p_item->p_stats->i_read_bytes)/1024 );
             SHOW_ACS( 1, ACS_VLINE ); l++;
             MainBoxWrite( p_intf, l, 1, _("| input bitrate    :   %6.0f kb/s"),
                     (float)(p_item->p_stats->f_input_bitrate)*8000 );
-            MainBoxWrite( p_intf, l, 1, _("| demux bytes read : %8.0f kB"),
-                    (float)(p_item->p_stats->i_demux_read_bytes)/1000 );
+            MainBoxWrite( p_intf, l, 1, _("| demux bytes read : %8.0f KiB"),
+                    (float)(p_item->p_stats->i_demux_read_bytes)/1024 );
             SHOW_ACS( 1, ACS_VLINE ); l++;
             MainBoxWrite( p_intf, l, 1, _("| demux bitrate    :   %6.0f kb/s"),
                     (float)(p_item->p_stats->f_demux_bitrate)*8000 );
@@ -2036,8 +2031,8 @@ static void Redraw( intf_thread_t *p_intf, time_t *t_last_refresh )
             if( p_sys->b_color ) wcolor_set( p_sys->w, C_DEFAULT, NULL );
             MainBoxWrite( p_intf, l, 1, _("| packets sent     :    %5i"), p_item->p_stats->i_sent_packets );
             SHOW_ACS( 1, ACS_VLINE ); l++;
-            MainBoxWrite( p_intf, l, 1, _("| bytes sent       : %8.0f kB"),
-                    (float)(p_item->p_stats->i_sent_bytes)/1000 );
+            MainBoxWrite( p_intf, l, 1, _("| bytes sent       : %8.0f KiB"),
+                    (float)(p_item->p_stats->i_sent_bytes)/1024 );
             SHOW_ACS( 1, ACS_VLINE ); l++;
             MainBoxWrite( p_intf, l, 1, _("\\ sending bitrate  :   %6.0f kb/s"),
                     (float)(p_item->p_stats->f_send_bitrate*8)*1000 );
@@ -2171,7 +2166,7 @@ static void Redraw( intf_thread_t *p_intf, time_t *t_last_refresh )
         DrawEmptyLine( p_sys->w, 7, 1, COLS-2 );
         if( p_sys->psz_search_chain )
         {
-            if( strlen( p_sys->psz_search_chain ) == 0 &&
+            if( *p_sys->psz_search_chain == '\0' &&
                 p_sys->psz_old_search != NULL )
             {
                 /* Searching next entry */