[MPlayer-cvslog] r33962 - in trunk: gui/interface.c gui/ui/actions.c gui/ui/gtk/menu.c gui/ui/main.c gui/ui/render.c help/help_mp-bg.h help/help_mp-cs.h help/help_mp-de.h help/help_mp-dk.h help/help_mp-el.h help/he...

ib subversion at mplayerhq.hu
Wed Aug 10 16:48:50 CEST 2011


Author: ib
Date: Wed Aug 10 16:48:49 2011
New Revision: 33962

Log:
Don't let VCD track number and guiInfo.Track differ.

Internally use guiInfo.Track for the track without offset now and
externally speak of "titles" to the user. The titles are given minus
the VCD metadata track. (The dynamic label variable $t isn't affected.)

This also fixes some strange behavior when using the prev/next buttons
when no VCD could be loaded.

Rename MSGTR_VCDTrack MSGTR_Title to reflect the change.

Modified:
   trunk/gui/interface.c
   trunk/gui/ui/actions.c
   trunk/gui/ui/gtk/menu.c
   trunk/gui/ui/main.c
   trunk/gui/ui/render.c

Changes in other areas also in this revision:
Modified:
   trunk/help/help_mp-bg.h
   trunk/help/help_mp-cs.h
   trunk/help/help_mp-de.h
   trunk/help/help_mp-dk.h
   trunk/help/help_mp-el.h
   trunk/help/help_mp-en.h
   trunk/help/help_mp-es.h
   trunk/help/help_mp-fr.h
   trunk/help/help_mp-hu.h
   trunk/help/help_mp-it.h
   trunk/help/help_mp-ja.h
   trunk/help/help_mp-ko.h
   trunk/help/help_mp-mk.h
   trunk/help/help_mp-nl.h
   trunk/help/help_mp-pl.h
   trunk/help/help_mp-pt_BR.h
   trunk/help/help_mp-ro.h
   trunk/help/help_mp-ru.h
   trunk/help/help_mp-sk.h
   trunk/help/help_mp-sv.h
   trunk/help/help_mp-tr.h
   trunk/help/help_mp-uk.h
   trunk/help/help_mp-zh_CN.h
   trunk/help/help_mp-zh_TW.h

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Tue Aug  9 23:32:09 2011	(r33961)
+++ trunk/gui/interface.c	Wed Aug 10 16:48:49 2011	(r33962)
@@ -446,7 +446,7 @@ int gui(int what, void *data)
         {
             char tmp[512];
 
-            sprintf(tmp, "vcd://%d", guiInfo.Track + 1);
+            sprintf(tmp, "vcd://%d", guiInfo.Track);
             setdup(&guiInfo.Filename, tmp);
         }
         break;

Modified: trunk/gui/ui/actions.c
==============================================================================
--- trunk/gui/ui/actions.c	Tue Aug  9 23:32:09 2011	(r33961)
+++ trunk/gui/ui/actions.c	Wed Aug 10 16:48:49 2011	(r33962)
@@ -333,8 +333,8 @@ void uiPrev(void)
 
 #ifdef CONFIG_VCD
     case STREAMTYPE_VCD:
-        if (--guiInfo.Track == 0) {
-            guiInfo.Track = 1;
+        if (--guiInfo.Track == 1) {
+            guiInfo.Track = 2;
             stop = 1;
         }
         break;
@@ -389,12 +389,8 @@ void uiNext(void)
     case STREAMTYPE_VCD:
 
         if (++guiInfo.Track >= guiInfo.VCDTracks) {
-            guiInfo.Track = guiInfo.VCDTracks;
-
-            if (guiInfo.VCDTracks > 1)
-                guiInfo.Track--;
-
-            stop = 1;
+            stop = (guiInfo.Track > guiInfo.VCDTracks);
+            guiInfo.Track = FFMAX(2, guiInfo.VCDTracks);
         }
 
         break;

Modified: trunk/gui/ui/gtk/menu.c
==============================================================================
--- trunk/gui/ui/gtk/menu.c	Tue Aug  9 23:32:09 2011	(r33961)
+++ trunk/gui/ui/gtk/menu.c	Wed Aug 10 16:48:49 2011	(r33962)
@@ -462,7 +462,7 @@ GtkWidget * create_PopUpMenu( void )
        {
         snprintf( tmp,32,MSGTR_MENU_Title,i );
     //AddMenuItem( VCDTitleMenu,tmp,( i << 16 ) + evSetVCDTrack );
-        AddMenuItem(window1, (const char*)empty_xpm, VCDTitleMenu,tmp,( i << 16 ) + evSetVCDTrack );
+        AddMenuItem(window1, (const char*)empty_xpm, VCDTitleMenu,tmp,( ( i + 1 ) << 16 ) + evSetVCDTrack );
        }
      }
      else

Modified: trunk/gui/ui/main.c
==============================================================================
--- trunk/gui/ui/main.c	Tue Aug  9 23:32:09 2011	(r33961)
+++ trunk/gui/ui/main.c	Wed Aug 10 16:48:49 2011	(r33962)
@@ -204,7 +204,7 @@ play:
 	       if ( guiInfo.Playing != GUI_PAUSE )
 	        {
 		 if ( !guiInfo.Track )
-                   guiInfo.Track=1;
+                   guiInfo.Track=2;
                  guiInfo.DiskChanged=1;
 		}
 	       break;

Modified: trunk/gui/ui/render.c
==============================================================================
--- trunk/gui/ui/render.c	Tue Aug  9 23:32:09 2011	(r33961)
+++ trunk/gui/ui/render.c	Wed Aug 10 16:48:49 2011	(r33962)
@@ -83,7 +83,7 @@ static void TranslateFilename(int c, cha
 
 #ifdef CONFIG_VCD
     case STREAMTYPE_VCD:
-        snprintf(tmp, tmplen, MSGTR_VCDTrack, guiInfo.Track);
+        snprintf(tmp, tmplen, MSGTR_Title, guiInfo.Track - 1);
         break;
 #endif
 


More information about the MPlayer-cvslog mailing list