changeset 33874:e1bec41397bb

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.
author ib
date Wed, 10 Aug 2011 14:48:49 +0000
parents 983ffb8be5bd
children e23e8c872ae5
files 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/help_mp-en.h help/help_mp-es.h help/help_mp-fr.h help/help_mp-hu.h help/help_mp-it.h help/help_mp-ja.h help/help_mp-ko.h help/help_mp-mk.h help/help_mp-nl.h help/help_mp-pl.h help/help_mp-pt_BR.h help/help_mp-ro.h help/help_mp-ru.h help/help_mp-sk.h help/help_mp-sv.h help/help_mp-tr.h help/help_mp-uk.h help/help_mp-zh_CN.h help/help_mp-zh_TW.h
diffstat 29 files changed, 10 insertions(+), 36 deletions(-) [+]
line wrap: on
line diff
--- a/gui/interface.c	Tue Aug 09 21:32:09 2011 +0000
+++ b/gui/interface.c	Wed Aug 10 14:48:49 2011 +0000
@@ -446,7 +446,7 @@
         {
             char tmp[512];
 
-            sprintf(tmp, "vcd://%d", guiInfo.Track + 1);
+            sprintf(tmp, "vcd://%d", guiInfo.Track);
             setdup(&guiInfo.Filename, tmp);
         }
         break;
--- a/gui/ui/actions.c	Tue Aug 09 21:32:09 2011 +0000
+++ b/gui/ui/actions.c	Wed Aug 10 14:48:49 2011 +0000
@@ -333,8 +333,8 @@
 
 #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 @@
     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;
--- a/gui/ui/gtk/menu.c	Tue Aug 09 21:32:09 2011 +0000
+++ b/gui/ui/gtk/menu.c	Wed Aug 10 14:48:49 2011 +0000
@@ -462,7 +462,7 @@
        {
         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
--- a/gui/ui/main.c	Tue Aug 09 21:32:09 2011 +0000
+++ b/gui/ui/main.c	Wed Aug 10 14:48:49 2011 +0000
@@ -204,7 +204,7 @@
 	       if ( guiInfo.Playing != GUI_PAUSE )
 	        {
 		 if ( !guiInfo.Track )
-                   guiInfo.Track=1;
+                   guiInfo.Track=2;
                  guiInfo.DiskChanged=1;
 		}
 	       break;
--- a/gui/ui/render.c	Tue Aug 09 21:32:09 2011 +0000
+++ b/gui/ui/render.c	Wed Aug 10 14:48:49 2011 +0000
@@ -83,7 +83,7 @@
 
 #ifdef CONFIG_VCD
     case STREAMTYPE_VCD:
-        snprintf(tmp, tmplen, MSGTR_VCDTrack, guiInfo.Track);
+        snprintf(tmp, tmplen, MSGTR_Title, guiInfo.Track - 1);
         break;
 #endif
 
--- a/help/help_mp-bg.h	Tue Aug 09 21:32:09 2011 +0000
+++ b/help/help_mp-bg.h	Wed Aug 10 14:48:49 2011 +0000
@@ -553,7 +553,6 @@
 #define MSGTR_Preferences "Предпочитания"
 #define MSGTR_AudioPreferences "Конфигуриране на аудио драйвера"
 #define MSGTR_NoMediaOpened "Няма отворени елементи."
-#define MSGTR_VCDTrack "VCD писта %d"
 #define MSGTR_NoChapter "Няма раздели"
 #define MSGTR_Chapter "Раздел %d"
 #define MSGTR_NoFileLoaded "Не е зареден файл."
--- a/help/help_mp-cs.h	Tue Aug 09 21:32:09 2011 +0000
+++ b/help/help_mp-cs.h	Wed Aug 10 14:48:49 2011 +0000
@@ -526,7 +526,6 @@
 #define MSGTR_Preferences "Nastavení" // Předvolby?
 #define MSGTR_AudioPreferences "Konfigurace ovladače zvuku"
 #define MSGTR_NoMediaOpened "Nic není otevřeno."
-#define MSGTR_VCDTrack "VCD stopa %d"
 #define MSGTR_NoChapter "Žádná kapitola" //bez kapitoly?
 #define MSGTR_Chapter "Kapitola %d"
 #define MSGTR_NoFileLoaded "Není načten žádný soubor."
--- a/help/help_mp-de.h	Tue Aug 09 21:32:09 2011 +0000
+++ b/help/help_mp-de.h	Wed Aug 10 14:48:49 2011 +0000
@@ -736,7 +736,7 @@
 #define MSGTR_Preferences "Einstellungen"
 #define MSGTR_AudioPreferences "Audio-Treiberkonfiguration"
 #define MSGTR_NoMediaOpened "Keine Medien geöffnet."
-#define MSGTR_VCDTrack "VCD-Titel %d"
+#define MSGTR_Title "Titel %d"
 #define MSGTR_NoChapter "kein Kapitel"
 #define MSGTR_Chapter "Kapitel %d"
 #define MSGTR_NoFileLoaded "Keine Datei geladen."
--- a/help/help_mp-dk.h	Tue Aug 09 21:32:09 2011 +0000
+++ b/help/help_mp-dk.h	Wed Aug 10 14:48:49 2011 +0000
@@ -330,7 +330,6 @@
 #define MSGTR_Network "Netværksstreaming..."
 #define MSGTR_Preferences "Indstillinger"
 #define MSGTR_NoMediaOpened "Medie ikke åbnet"
-#define MSGTR_VCDTrack "VCD nummer %d"
 #define MSGTR_NoChapter "Ingen kapitel"
 #define MSGTR_Chapter "kapitel %d"
 #define MSGTR_NoFileLoaded "Ingen fil indlæst"
--- a/help/help_mp-el.h	Tue Aug 09 21:32:09 2011 +0000
+++ b/help/help_mp-el.h	Wed Aug 10 14:48:49 2011 +0000
@@ -337,7 +337,6 @@
 #define MSGTR_Network "Streaming δικτύου."
 #define MSGTR_Preferences "Ιδιότητες"
 #define MSGTR_NoMediaOpened "Δεν φορτώθηκαν αρχεία"
-#define MSGTR_VCDTrack "VCD track %d"
 #define MSGTR_NoChapter "Μη χρήση κεφαλαίου"
 #define MSGTR_Chapter "Κεφάλαιο %d"
 #define MSGTR_NoFileLoaded "δεν φορτώθηκε αρχείο"
--- a/help/help_mp-en.h	Tue Aug 09 21:32:09 2011 +0000
+++ b/help/help_mp-en.h	Wed Aug 10 14:48:49 2011 +0000
@@ -542,7 +542,7 @@
 #define MSGTR_Preferences "Preferences"
 #define MSGTR_AudioPreferences "Audio driver configuration"
 #define MSGTR_NoMediaOpened "No media opened."
-#define MSGTR_VCDTrack "VCD track %d"
+#define MSGTR_Title "Title %d"
 #define MSGTR_NoChapter "No chapter"
 #define MSGTR_Chapter "Chapter %d"
 #define MSGTR_NoFileLoaded "No file loaded."
--- a/help/help_mp-es.h	Tue Aug 09 21:32:09 2011 +0000
+++ b/help/help_mp-es.h	Wed Aug 10 14:48:49 2011 +0000
@@ -545,7 +545,6 @@
 #define MSGTR_Preferences "Preferencias"
 #define MSGTR_AudioPreferences "Configuración de controlador de Audio"
 #define MSGTR_NoMediaOpened "no se abrió audio/video"
-#define MSGTR_VCDTrack "pista VCD %d"
 #define MSGTR_NoChapter "sin capítulo"
 #define MSGTR_Chapter "capítulo %d"
 #define MSGTR_NoFileLoaded "no se ha cargado ningún archivo"
--- a/help/help_mp-fr.h	Tue Aug 09 21:32:09 2011 +0000
+++ b/help/help_mp-fr.h	Wed Aug 10 14:48:49 2011 +0000
@@ -694,7 +694,6 @@
 #define MSGTR_Preferences "Préférences"
 #define MSGTR_AudioPreferences "Configuration de pilote Audio"
 #define MSGTR_NoMediaOpened "Aucun média ouvert"
-#define MSGTR_VCDTrack "Piste du VCD %d"
 #define MSGTR_NoChapter "Aucun chapitre"
 #define MSGTR_Chapter "Chapitre %d"
 #define MSGTR_NoFileLoaded "Aucun fichier chargé"
--- a/help/help_mp-hu.h	Tue Aug 09 21:32:09 2011 +0000
+++ b/help/help_mp-hu.h	Wed Aug 10 14:48:49 2011 +0000
@@ -539,7 +539,6 @@
 #define MSGTR_Preferences "Beállítások"
 #define MSGTR_AudioPreferences "Audio vezérlő beállítása"
 #define MSGTR_NoMediaOpened "nincs megnyitva semmi"
-#define MSGTR_VCDTrack "%d. VCD track"
 #define MSGTR_NoChapter "nincs megnyitott fejezet"
 #define MSGTR_Chapter "%d. fejezet"
 #define MSGTR_NoFileLoaded "nincs fájl betöltve"
--- a/help/help_mp-it.h	Tue Aug 09 21:32:09 2011 +0000
+++ b/help/help_mp-it.h	Wed Aug 10 14:48:49 2011 +0000
@@ -537,7 +537,6 @@
 #define MSGTR_Preferences "Preferenze"
 #define MSGTR_AudioPreferences "Configurazione driver audio"
 #define MSGTR_NoMediaOpened "nessun media aperto"
-#define MSGTR_VCDTrack "Traccia VCD %d"
 #define MSGTR_NoChapter "nessun capitolo"
 #define MSGTR_Chapter "capitolo %d"
 #define MSGTR_NoFileLoaded "nessun file caricato"
--- a/help/help_mp-ja.h	Tue Aug 09 21:32:09 2011 +0000
+++ b/help/help_mp-ja.h	Wed Aug 10 14:48:49 2011 +0000
@@ -269,7 +269,6 @@
 #define MSGTR_SkinBrowser "スキンブラウザ"
 #define MSGTR_Preferences "設定"
 #define MSGTR_NoMediaOpened "メディアが開かれていません."
-#define MSGTR_VCDTrack "VCD トラック %d"
 #define MSGTR_NoChapter "キャプターがありません"
 #define MSGTR_Chapter "キャプター %d"
 #define MSGTR_NoFileLoaded "ファイルが読み込まれていません."
--- a/help/help_mp-ko.h	Tue Aug 09 21:32:09 2011 +0000
+++ b/help/help_mp-ko.h	Wed Aug 10 14:48:49 2011 +0000
@@ -333,7 +333,6 @@
 #define MSGTR_Network "네트워크 스트리밍..."
 #define MSGTR_Preferences "선택사항"
 #define MSGTR_NoMediaOpened "미디어 없음"
-#define MSGTR_VCDTrack "VCD 트랙 %d"
 #define MSGTR_NoChapter "챕터 없음"
 #define MSGTR_Chapter "챕터 %d"
 #define MSGTR_NoFileLoaded "파일 없음"
--- a/help/help_mp-mk.h	Tue Aug 09 21:32:09 2011 +0000
+++ b/help/help_mp-mk.h	Wed Aug 10 14:48:49 2011 +0000
@@ -330,7 +330,6 @@
 #define MSGTR_Network "Мрежен проток ..."
 #define MSGTR_Preferences "Подесувања"
 #define MSGTR_NoMediaOpened "Не е отворен медиум."
-#define MSGTR_VCDTrack "VCD трака %d"
 #define MSGTR_NoChapter "Нема поглавје"
 #define MSGTR_Chapter "Поглавје %d"
 #define MSGTR_NoFileLoaded "Не е вчитана датотека."
--- a/help/help_mp-nl.h	Tue Aug 09 21:32:09 2011 +0000
+++ b/help/help_mp-nl.h	Wed Aug 10 14:48:49 2011 +0000
@@ -538,7 +538,6 @@
 #define MSGTR_Preferences "Voorkeuren"
 #define MSGTR_AudioPreferences "Audio configuratie"
 #define MSGTR_NoMediaOpened "geen mediabestand geopend"
-#define MSGTR_VCDTrack "VCD track %d"
 #define MSGTR_NoChapter "geen hoofdstuk"
 #define MSGTR_Chapter "hoofdstuk %d"
 #define MSGTR_NoFileLoaded "geen bestand geladen"
--- a/help/help_mp-pl.h	Tue Aug 09 21:32:09 2011 +0000
+++ b/help/help_mp-pl.h	Wed Aug 10 14:48:49 2011 +0000
@@ -660,7 +660,6 @@
 #define MSGTR_Preferences "Opcje"
 #define MSGTR_AudioPreferences "Konfiguracja sterownika audio"
 #define MSGTR_NoMediaOpened "Nie otwarto żadnego nośnika."
-#define MSGTR_VCDTrack "Ścieżka VCD %d"
 #define MSGTR_NoChapter "Brak rozdziału"
 #define MSGTR_Chapter "Rozdział %d"
 #define MSGTR_NoFileLoaded "Nie wczytano pliku."
--- a/help/help_mp-pt_BR.h	Tue Aug 09 21:32:09 2011 +0000
+++ b/help/help_mp-pt_BR.h	Wed Aug 10 14:48:49 2011 +0000
@@ -335,7 +335,6 @@
 #define MSGTR_Network "Rede..."
 #define MSGTR_Preferences "Preferências"
 #define MSGTR_NoMediaOpened "Nenhuma mídia aberta."
-#define MSGTR_VCDTrack "Trilha do VCD %d"
 #define MSGTR_NoChapter "Nenhum capítulo"
 #define MSGTR_Chapter "Capítulo %d"
 #define MSGTR_NoFileLoaded "Nenhum arquivo carregado"
--- a/help/help_mp-ro.h	Tue Aug 09 21:32:09 2011 +0000
+++ b/help/help_mp-ro.h	Wed Aug 10 14:48:49 2011 +0000
@@ -294,7 +294,6 @@
 #define MSGTR_Network "Streaming în reþea..."
 #define MSGTR_Preferences "Preferinþe"
 #define MSGTR_NoMediaOpened "Nu e deschis nici un fiºier."
-#define MSGTR_VCDTrack "Pista VCD %d"
 #define MSGTR_NoChapter "Nici un capitol"
 #define MSGTR_Chapter "Capitol %d"
 #define MSGTR_NoFileLoaded "Nici un fiºier încãrcat."
--- a/help/help_mp-ru.h	Tue Aug 09 21:32:09 2011 +0000
+++ b/help/help_mp-ru.h	Wed Aug 10 14:48:49 2011 +0000
@@ -528,7 +528,6 @@
 #define MSGTR_Preferences "Настройки"
 #define MSGTR_AudioPreferences "Конфигурация аудио драйвера"
 #define MSGTR_NoMediaOpened "Носитель не открыт."
-#define MSGTR_VCDTrack "дорожка VCD %d"
 #define MSGTR_NoChapter "Нет раздела"
 #define MSGTR_Chapter "Раздел %d"
 #define MSGTR_NoFileLoaded "Файл не загружен."
--- a/help/help_mp-sk.h	Tue Aug 09 21:32:09 2011 +0000
+++ b/help/help_mp-sk.h	Wed Aug 10 14:48:49 2011 +0000
@@ -644,7 +644,6 @@
 #define MSGTR_Preferences "Preferencie"
 #define MSGTR_AudioPreferences "Konfiguracia ovladača zvuku"
 #define MSGTR_NoMediaOpened "Nič nie je otvorené"
-#define MSGTR_VCDTrack "VCD stopa %d"
 #define MSGTR_NoChapter "Žiadna kapitola"
 #define MSGTR_Chapter "Kapitola %d"
 #define MSGTR_NoFileLoaded "Nenahraný žiaden súbor"
--- a/help/help_mp-sv.h	Tue Aug 09 21:32:09 2011 +0000
+++ b/help/help_mp-sv.h	Wed Aug 10 14:48:49 2011 +0000
@@ -553,7 +553,6 @@
 #define MSGTR_Preferences "Inställningar"
 #define MSGTR_AudioPreferences "Audiodirvrutinskonfiguration"
 #define MSGTR_NoMediaOpened "Inget media öppnad"
-#define MSGTR_VCDTrack "VCD-spår %d"
 #define MSGTR_NoChapter "Inget kapitel"
 #define MSGTR_Chapter "Kapitel %d"
 #define MSGTR_NoFileLoaded "Ingen fil laddad"
--- a/help/help_mp-tr.h	Tue Aug 09 21:32:09 2011 +0000
+++ b/help/help_mp-tr.h	Wed Aug 10 14:48:49 2011 +0000
@@ -705,7 +705,6 @@
 #define MSGTR_Preferences "Tercihler"
 #define MSGTR_AudioPreferences "Ses sürücüsü ayarları"
 #define MSGTR_NoMediaOpened "Medya yok"
-#define MSGTR_VCDTrack "VCD parça %d"
 #define MSGTR_NoChapter "Bölüm yok"
 #define MSGTR_Chapter "Bölüm %d"
 #define MSGTR_NoFileLoaded "Dosya yüklenemedi"
--- a/help/help_mp-uk.h	Tue Aug 09 21:32:09 2011 +0000
+++ b/help/help_mp-uk.h	Wed Aug 10 14:48:49 2011 +0000
@@ -522,7 +522,6 @@
 #define MSGTR_Preferences "Шалаштування"
 #define MSGTR_AudioPreferences "Налаштування аудіо драйверу"
 #define MSGTR_NoMediaOpened "Носій не відкритий."
-#define MSGTR_VCDTrack "VCD доріжка %d"
 #define MSGTR_NoChapter "Без розділу"
 #define MSGTR_Chapter "Розділ %d"
 #define MSGTR_NoFileLoaded "Файл не завантжено."
--- a/help/help_mp-zh_CN.h	Tue Aug 09 21:32:09 2011 +0000
+++ b/help/help_mp-zh_CN.h	Wed Aug 10 14:48:49 2011 +0000
@@ -542,7 +542,6 @@
 #define MSGTR_Preferences "首选项"
 #define MSGTR_AudioPreferences "音频驱动配置"
 #define MSGTR_NoMediaOpened "未打开媒体内容"
-#define MSGTR_VCDTrack "VCD 数据轨道 %d"
 #define MSGTR_NoChapter "无章节"
 #define MSGTR_Chapter "章节 %d"
 #define MSGTR_NoFileLoaded "未载入文件"
--- a/help/help_mp-zh_TW.h	Tue Aug 09 21:32:09 2011 +0000
+++ b/help/help_mp-zh_TW.h	Wed Aug 10 14:48:49 2011 +0000
@@ -678,7 +678,6 @@
 #define MSGTR_Preferences "首選項"
 #define MSGTR_AudioPreferences "音頻驅動配置"
 #define MSGTR_NoMediaOpened "没有打開媒體"
-#define MSGTR_VCDTrack "VCD 軌迹 %d"
 #define MSGTR_NoChapter "没有章節"
 #define MSGTR_Chapter "章節 %d"
 #define MSGTR_NoFileLoaded "没有載入文件"