changeset 36977:dc70bee70223

Arrange variables to be translated alphabetically.
author ib
date Wed, 26 Mar 2014 16:42:15 +0000
parents cb1abce33f20
children 3f306145b3da
files gui/ui/render.c
diffstat 1 files changed, 105 insertions(+), 105 deletions(-) [+]
line wrap: on
line diff
--- a/gui/ui/render.c	Wed Mar 26 16:21:52 2014 +0000
+++ b/gui/ui/render.c	Wed Mar 26 16:42:15 2014 +0000
@@ -52,30 +52,6 @@
             }
         } else {
             switch (text[++i]) {
-            case 't':
-                snprintf(trans, sizeof(trans), "%02d", guiInfo.Track);
-                av_strlcat(translation, trans, sizeof(translation));
-                break;
-
-            case 'o':
-                TranslateFilename(0, trans, sizeof(trans));
-                av_strlcat(translation, trans, sizeof(translation));
-                break;
-
-            case 'f':
-                TranslateFilename(1, trans, sizeof(trans));
-                av_strlcat(translation, trans, sizeof(translation));
-                break;
-
-            case 'F':
-                TranslateFilename(2, trans, sizeof(trans));
-                av_strlcat(translation, trans, sizeof(translation));
-                break;
-
-            case '6':
-                t = guiInfo.RunningTime;
-                goto calclengthhhmmss;
-
             case '1':
                 t = guiInfo.ElapsedTime;
 calclengthhhmmss:
@@ -83,10 +59,6 @@
                 av_strlcat(translation, trans, sizeof(translation));
                 break;
 
-            case '7':
-                t = guiInfo.RunningTime;
-                goto calclengthmmmmss;
-
             case '2':
                 t = guiInfo.ElapsedTime;
 calclengthmmmmss:
@@ -109,88 +81,19 @@
                 av_strlcat(translation, trans, sizeof(translation));
                 break;
 
+            case '6':
+                t = guiInfo.RunningTime;
+                goto calclengthhhmmss;
+
+            case '7':
+                t = guiInfo.RunningTime;
+                goto calclengthmmmmss;
+
             case '8':
                 snprintf(trans, sizeof(trans), "%01d:%02d:%02d", guiInfo.ElapsedTime / 3600, (guiInfo.ElapsedTime / 60) % 60, guiInfo.ElapsedTime % 60);
                 av_strlcat(translation, trans, sizeof(translation));
                 break;
 
-            case 'v':
-                snprintf(trans, sizeof(trans), "%3.2f%%", guiInfo.Volume);
-                av_strlcat(translation, trans, sizeof(translation));
-                break;
-
-            case 'V':
-                snprintf(trans, sizeof(trans), "%3.1f", guiInfo.Volume);
-                av_strlcat(translation, trans, sizeof(translation));
-                break;
-
-            case 'U':
-                snprintf(trans, sizeof(trans), "%3.0f", guiInfo.Volume);
-                av_strlcat(translation, trans, sizeof(translation));
-                break;
-
-            case 'b':
-                snprintf(trans, sizeof(trans), "%3.2f%%", guiInfo.Balance);
-                av_strlcat(translation, trans, sizeof(translation));
-                break;
-
-            case 'B':
-                snprintf(trans, sizeof(trans), "%3.1f", guiInfo.Balance);
-                av_strlcat(translation, trans, sizeof(translation));
-                break;
-
-            case 'D':
-                snprintf(trans, sizeof(trans), "%3.0f", guiInfo.Balance);
-                av_strlcat(translation, trans, sizeof(translation));
-                break;
-
-            case 'x':
-                snprintf(trans, sizeof(trans), "%d", guiInfo.VideoWidth);
-                av_strlcat(translation, trans, sizeof(translation));
-                break;
-
-            case 'y':
-                snprintf(trans, sizeof(trans), "%d", guiInfo.VideoHeight);
-                av_strlcat(translation, trans, sizeof(translation));
-                break;
-
-            case 'C':
-                snprintf(trans, sizeof(trans), "%s", guiInfo.CodecName ? guiInfo.CodecName : "");
-                av_strlcat(translation, trans, sizeof(translation));
-                break;
-
-            case 's':
-                if (guiInfo.Playing == GUI_STOP)
-                    av_strlcat(translation, "s", sizeof(translation));
-                break;
-
-            case 'l': // legacy
-            case 'p':
-                if (guiInfo.Playing == GUI_PLAY)
-                    av_strlcat(translation, "p", sizeof(translation));
-                break;
-
-            case 'e':
-                if (guiInfo.Playing == GUI_PAUSE)
-                    av_strlcat(translation, "e", sizeof(translation));
-                break;
-
-            case 'P':
-                switch (guiInfo.Playing) {
-                case GUI_STOP:
-                    av_strlcat(translation, "s", sizeof(translation));
-                    break;
-
-                case GUI_PLAY:
-                    av_strlcat(translation, "p", sizeof(translation));
-                    break;
-
-                case GUI_PAUSE:
-                    av_strlcat(translation, "e", sizeof(translation));
-                    break;
-                }
-                break;
-
             case 'a':
                 switch (guiInfo.AudioChannels) {
                 case 0:
@@ -211,6 +114,78 @@
                 }
                 break;
 
+            case 'b':
+                snprintf(trans, sizeof(trans), "%3.2f%%", guiInfo.Balance);
+                av_strlcat(translation, trans, sizeof(translation));
+                break;
+
+            case 'B':
+                snprintf(trans, sizeof(trans), "%3.1f", guiInfo.Balance);
+                av_strlcat(translation, trans, sizeof(translation));
+                break;
+
+            case 'C':
+                snprintf(trans, sizeof(trans), "%s", guiInfo.CodecName ? guiInfo.CodecName : "");
+                av_strlcat(translation, trans, sizeof(translation));
+                break;
+
+            case 'D':
+                snprintf(trans, sizeof(trans), "%3.0f", guiInfo.Balance);
+                av_strlcat(translation, trans, sizeof(translation));
+                break;
+
+            case 'e':
+                if (guiInfo.Playing == GUI_PAUSE)
+                    av_strlcat(translation, "e", sizeof(translation));
+                break;
+
+            case 'f':
+                TranslateFilename(1, trans, sizeof(trans));
+                av_strlcat(translation, trans, sizeof(translation));
+                break;
+
+            case 'F':
+                TranslateFilename(2, trans, sizeof(trans));
+                av_strlcat(translation, trans, sizeof(translation));
+                break;
+
+            case 'o':
+                TranslateFilename(0, trans, sizeof(trans));
+                av_strlcat(translation, trans, sizeof(translation));
+                break;
+
+            case 'l': // legacy
+            case 'p':
+                if (guiInfo.Playing == GUI_PLAY)
+                    av_strlcat(translation, "p", sizeof(translation));
+                break;
+
+            case 'P':
+                switch (guiInfo.Playing) {
+                case GUI_STOP:
+                    av_strlcat(translation, "s", sizeof(translation));
+                    break;
+
+                case GUI_PLAY:
+                    av_strlcat(translation, "p", sizeof(translation));
+                    break;
+
+                case GUI_PAUSE:
+                    av_strlcat(translation, "e", sizeof(translation));
+                    break;
+                }
+                break;
+
+            case 's':
+                if (guiInfo.Playing == GUI_STOP)
+                    av_strlcat(translation, "s", sizeof(translation));
+                break;
+
+            case 't':
+                snprintf(trans, sizeof(trans), "%02d", guiInfo.Track);
+                av_strlcat(translation, trans, sizeof(translation));
+                break;
+
             case 'T':
                 switch (guiInfo.StreamType) {
                 case STREAMTYPE_FILE:
@@ -244,6 +219,31 @@
                 }
                 break;
 
+            case 'U':
+                snprintf(trans, sizeof(trans), "%3.0f", guiInfo.Volume);
+                av_strlcat(translation, trans, sizeof(translation));
+                break;
+
+            case 'v':
+                snprintf(trans, sizeof(trans), "%3.2f%%", guiInfo.Volume);
+                av_strlcat(translation, trans, sizeof(translation));
+                break;
+
+            case 'V':
+                snprintf(trans, sizeof(trans), "%3.1f", guiInfo.Volume);
+                av_strlcat(translation, trans, sizeof(translation));
+                break;
+
+            case 'x':
+                snprintf(trans, sizeof(trans), "%d", guiInfo.VideoWidth);
+                av_strlcat(translation, trans, sizeof(translation));
+                break;
+
+            case 'y':
+                snprintf(trans, sizeof(trans), "%d", guiInfo.VideoHeight);
+                av_strlcat(translation, trans, sizeof(translation));
+                break;
+
             case '$':
                 av_strlcat(translation, "$", sizeof(translation));
                 break;