changeset 33530:7ced3616af42

Revise some messages. Revise message levels, message types and texts, move some messages at a more appropriate place and remove an unused message.
author ib
date Tue, 14 Jun 2011 23:05:02 +0000
parents 276eef06fb3d
children 84ce059fae34
files gui/cfg.c gui/interface.c gui/mplayer/play.c gui/mplayer/widgets.c help/help_mp-bg.h help/help_mp-cs.h help/help_mp-de.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-pl.h help/help_mp-ru.h help/help_mp-tr.h help/help_mp-uk.h help/help_mp-zh_CN.h help/help_mp-zh_TW.h
diffstat 18 files changed, 34 insertions(+), 49 deletions(-) [+]
line wrap: on
line diff
--- a/gui/cfg.c	Tue Jun 14 18:55:04 2011 +0000
+++ b/gui/cfg.c	Tue Jun 14 23:05:02 2011 +0000
@@ -264,7 +264,7 @@
 
     cfg = get_path("gui.conf");
 
-    mp_msg(MSGT_GPLAYER, MSGL_V, "[cfg] reading config file: %s\n", cfg);
+    mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[cfg] file: %s\n", cfg);
 
     gui_conf = m_config_new();
 
@@ -276,7 +276,7 @@
     m_config_register_options(gui_conf, gui_opts);
 
     if (!disable_gui_conf && (m_config_parse_config_file(gui_conf, cfg) < 0)) {
-        mp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_ConfigFileError);
+        gmp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_ConfigFileError);
 // guiExit(1);
     }
 
--- a/gui/interface.c	Tue Jun 14 18:55:04 2011 +0000
+++ b/gui/interface.c	Tue Jun 14 23:05:02 2011 +0000
@@ -161,6 +161,8 @@
 {
     int i;
 
+    mp_msg(MSGT_GPLAYER, MSGL_V, "GUI init.\n");
+
     memset(&guiIntfStruct, 0, sizeof(guiIntfStruct));
     guiIntfStruct.Balance    = 50.0f;
     guiIntfStruct.StreamType = -1;
@@ -200,8 +202,8 @@
     skinDirInHome  = get_path("skins");
     skinMPlayerDir = MPLAYER_DATADIR "/skins";
 
-    mp_msg(MSGT_GPLAYER, MSGL_V, "SKIN dir 1: '%s'\n", skinDirInHome);
-    mp_msg(MSGT_GPLAYER, MSGL_V, "SKIN dir 2: '%s'\n", skinMPlayerDir);
+    mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[interface] skin directory #1: %s\n", skinDirInHome);
+    mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[interface] skin directory #2: %s\n", skinMPlayerDir);
 
     if (!skinName)
         skinName = strdup("default");
@@ -269,11 +271,9 @@
     wsSetShape(&appMPlayer.mainWindow, appMPlayer.main.Mask.Image);
     wsXDNDMakeAwareness(&appMPlayer.mainWindow);
 
-#ifdef DEBUG
-    mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[main] depth on screen: %d\n", wsDepthOnScreen);
-    mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[main] parent: 0x%x\n", (int)appMPlayer.mainWindow.WindowID);
-    mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[main] sub: 0x%x\n", (int)appMPlayer.subWindow.WindowID);
-#endif
+    mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[interface] screen depth: %d\n", wsDepthOnScreen);
+    mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[interface] mainWindow ID: 0x%x\n", (int)appMPlayer.mainWindow.WindowID);
+    mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[interface] subWindow ID: 0x%x\n", (int)appMPlayer.subWindow.WindowID);
 
     appMPlayer.mainWindow.ReDraw       = (void *)mplMainDraw;
     appMPlayer.mainWindow.MouseHandler = mplMainMouseHandle;
@@ -384,8 +384,6 @@
     if (initialized) {
         mplMainRender = 0;
 
-        mp_msg(MSGT_GPLAYER, MSGL_V, "[GUI] done.\n");
-
         if (gui_save_pos) {
             gui_main_pos_x = appMPlayer.mainWindow.X;
             gui_main_pos_y = appMPlayer.mainWindow.Y;
@@ -410,6 +408,8 @@
         m_config_free(gui_conf);
         gui_conf = NULL;
     }
+
+    mp_msg(MSGT_GPLAYER, MSGL_V, "GUI done.\n");
 }
 
 void guiExit(enum exit_reason how)
@@ -450,7 +450,7 @@
         vo_font = read_font_desc(font_name, font_factor, 0);
 
         if (!vo_font)
-            mp_msg(MSGT_CPLAYER, MSGL_ERR, MSGTR_CantLoadFont, font_name);
+            gmp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_CantLoadFont, font_name);
     } else {
         font_name = gstrdup(get_path("font/font.desc"));
         vo_font   = read_font_desc(font_name, font_factor, 0);
@@ -505,7 +505,7 @@
         subdata = sub_read_file(name, guiIntfStruct.FPS);
 
         if (!subdata)
-            mp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_CantLoadSub, name);
+            gmp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_CantLoadSub, name);
 
         sub_name    = (malloc(2 * sizeof(char *))); // when mplayer will be restarted
         sub_name[0] = strdup(name);                 // sub_name[0] will be read
@@ -547,7 +547,7 @@
         vf_settings[1].name    = NULL;
     }
 
-    mp_msg(MSGT_GPLAYER, MSGL_STATUS, MSGTR_AddingVideoFilter, str);
+    mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_AddingVideoFilter, str);
 }
 
 int guiGetEvent(int type, void *arg)
@@ -682,7 +682,7 @@
 
     case guiIEvent:
 
-        mp_msg(MSGT_GPLAYER, MSGL_V, "cmd: %d\n", (int)arg);
+        mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[interface] guiIEvent: %d\n", (int)arg);
 
         switch ((int)arg) {
         case MP_CMD_QUIT:
@@ -1385,8 +1385,7 @@
     else
         pathname[strlen(pathname) - strlen(filename)] = 0;
 
-    // NOTE TO MYSELF: FIXME: Change to MSGL_DBG2?
-    mp_msg(MSGT_PLAYTREE, MSGL_V, "Adding filename %s && pathname %s\n", filename, pathname);
+    mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[interface] playtree, add: %s/%s\n", pathname, filename);
 
     item = calloc(1, sizeof(plItem));
 
--- a/gui/mplayer/play.c	Tue Jun 14 18:55:04 2011 +0000
+++ b/gui/mplayer/play.c	Tue Jun 14 23:05:02 2011 +0000
@@ -217,8 +217,8 @@
         mplMenuDrawBuffer = calloc(1, appMPlayer.menu.Bitmap.ImageSize);
 
         if (!mplMenuDrawBuffer) {
-            mp_msg(MSGT_GPLAYER, MSGL_STATUS, MSGTR_NEMDB);
-            return;
+            gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_NEMDB);
+            guiExit(EXIT_ERROR);
         }
 
         wsResizeWindow(&appMPlayer.menuWindow, appMPlayer.menu.width, appMPlayer.menu.height);
@@ -261,8 +261,8 @@
     mplDrawBuffer = calloc(1, appMPlayer.main.Bitmap.ImageSize);
 
     if (!mplDrawBuffer) {
-        mp_msg(MSGT_GPLAYER, MSGL_STATUS, MSGTR_NEMDB);
-        return;
+        gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_NEMDB);
+        guiExit(EXIT_ERROR);
     }
 
     wsDestroyWindow(&appMPlayer.mainWindow);
--- a/gui/mplayer/widgets.c	Tue Jun 14 18:55:04 2011 +0000
+++ b/gui/mplayer/widgets.c	Tue Jun 14 23:05:02 2011 +0000
@@ -78,7 +78,7 @@
  GdkPixmap *gdkIcon;
  GdkBitmap *gdkIconMask;
 
- mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[widget] GTK init\n" );
+ mp_msg( MSGT_GPLAYER,MSGL_V,"GTK init.\n" );
 
  arg[argc++] = GMPlayer;
 
--- a/help/help_mp-bg.h	Tue Jun 14 18:55:04 2011 +0000
+++ b/help/help_mp-bg.h	Tue Jun 14 23:05:02 2011 +0000
@@ -797,7 +797,6 @@
 
 // cfg.c
 
-#define MSGTR_ConfigFileReadError "[cfg] грешка при четене на конфигурационния файл ...\n"
 #define MSGTR_UnableToSaveOption "Не може да се запамети опцията '%s'.\n"
 
 // interface.c
--- a/help/help_mp-cs.h	Tue Jun 14 18:55:04 2011 +0000
+++ b/help/help_mp-cs.h	Tue Jun 14 23:05:02 2011 +0000
@@ -771,7 +771,6 @@
 #define MSGTR_MSGBOX_LABEL_Warning "Varování!"
 
 // cfg.c
-#define MSGTR_ConfigFileReadError "[cfg] chyba při čtení konfiguračního souboru...\n"
 #define MSGTR_UnableToSaveOption "[cfg] Nelze uložit volbu '%s'.\n"
 
 // interface.c
--- a/help/help_mp-de.h	Tue Jun 14 18:55:04 2011 +0000
+++ b/help/help_mp-de.h	Tue Jun 14 23:05:02 2011 +0000
@@ -69,8 +69,8 @@
 #define MSGTR_GetpathProblem "get_path(\"config\") fehlgeschlagen.\n"
 #define MSGTR_CreatingCfgFile "Erstelle Konfigurationsdatei: %s\n"
 #define MSGTR_BuiltinCodecsConf "Benutze eingebaute Standardwerte für codecs.conf.\n"
-#define MSGTR_CantLoadFont "Kann Bitmap-Schriftdatei nicht laden: %s\n"
-#define MSGTR_CantLoadSub "Kann Untertitel nicht laden: %s\n"
+#define MSGTR_CantLoadFont "Bitmap-Schriftdatei '%s' kann nicht geladen werden.\n"
+#define MSGTR_CantLoadSub "Untertitel '%s' können nicht geladen werden.\n"
 #define MSGTR_DumpSelectedStreamMissing "dump: FATAL: Ausgewählter Stream fehlt!\n"
 #define MSGTR_CantOpenDumpfile "Kann dump-Datei nicht öffnen!\n"
 #define MSGTR_CoreDumped "Core dumped ;)\n"
@@ -1004,13 +1004,12 @@
 #define MSGTR_MSGBOX_LABEL_Warning "Warnung!"
 
 // cfg.c
-#define MSGTR_ConfigFileReadError "[cfg] Fehler beim Lesen der Konfigurationsdatei ...\n"
-#define MSGTR_UnableToSaveOption "[cfg] Kann die Option '%s' nicht speichern.\n"
+#define MSGTR_UnableToSaveOption "Die Option '%s' kann nicht gespeichert werden.\n"
 
 // interface.c
-#define MSGTR_DeletingSubtitles "[GUI] Lösche Untertitel.\n"
-#define MSGTR_LoadingSubtitles "[GUI] Lade Untertitel: %s\n"
-#define MSGTR_AddingVideoFilter "[GUI] Füge Videofilter %s hinzu.\n"
+#define MSGTR_DeletingSubtitles "Untertitel werden gelöscht.\n"
+#define MSGTR_LoadingSubtitles "Untertitel '%s' werden geladen.\n"
+#define MSGTR_AddingVideoFilter "Videofilter '%s' wird hinzugefügt.\n"
 
 // mw.c
 #define MSGTR_NotAFile "Dies scheint keine Datei zu sein: %s !\n"
--- a/help/help_mp-en.h	Tue Jun 14 18:55:04 2011 +0000
+++ b/help/help_mp-en.h	Tue Jun 14 23:05:02 2011 +0000
@@ -65,8 +65,8 @@
 #define MSGTR_GetpathProblem "get_path(\"config\") problem\n"
 #define MSGTR_CreatingCfgFile "Creating config file: %s\n"
 #define MSGTR_BuiltinCodecsConf "Using built-in default codecs.conf.\n"
-#define MSGTR_CantLoadFont "Cannot load bitmap font: %s\n"
-#define MSGTR_CantLoadSub "Cannot load subtitles: %s\n"
+#define MSGTR_CantLoadFont "Cannot load bitmap font '%s'.\n"
+#define MSGTR_CantLoadSub "Cannot load subtitles '%s'.\n"
 #define MSGTR_DumpSelectedStreamMissing "dump: FATAL: Selected stream missing!\n"
 #define MSGTR_CantOpenDumpfile "Cannot open dump file.\n"
 #define MSGTR_CoreDumped "Core dumped ;)\n"
@@ -408,7 +408,7 @@
 "Cannot set LAME options, check bitrate/samplerate, some very low bitrates\n"\
 "(<32) need lower samplerates (i.e. -srate 8000).\n"\
 "If everything else fails, try a preset."
-#define MSGTR_ConfigFileError "config file error"
+#define MSGTR_ConfigFileError "Config file error"
 #define MSGTR_ErrorParsingCommandLine "error parsing command line"
 #define MSGTR_VideoStreamRequired "Video stream is mandatory!\n"
 #define MSGTR_ForcingInputFPS "Input fps will be interpreted as %5.3f instead.\n"
@@ -795,13 +795,12 @@
 #define MSGTR_MSGBOX_LABEL_Warning "Warning!"
 
 // cfg.c
-#define MSGTR_ConfigFileReadError "[cfg] config file read error ...\n"
-#define MSGTR_UnableToSaveOption "[cfg] Unable to save the '%s' option.\n"
+#define MSGTR_UnableToSaveOption "Unable to save option '%s'.\n"
 
 // interface.c
-#define MSGTR_DeletingSubtitles "[GUI] Deleting subtitles.\n"
-#define MSGTR_LoadingSubtitles "[GUI] Loading subtitles: %s\n"
-#define MSGTR_AddingVideoFilter "[GUI] Adding video filter: %s\n"
+#define MSGTR_DeletingSubtitles "Deleting subtitles.\n"
+#define MSGTR_LoadingSubtitles "Loading subtitles '%s'.\n"
+#define MSGTR_AddingVideoFilter "Adding video filter '%s'.\n"
 
 // mw.c
 #define MSGTR_NotAFile "This does not seem to be a file: %s !\n"
--- a/help/help_mp-es.h	Tue Jun 14 18:55:04 2011 +0000
+++ b/help/help_mp-es.h	Tue Jun 14 23:05:02 2011 +0000
@@ -787,7 +787,6 @@
 #define MSGTR_MSGBOX_LABEL_Warning "Advertencia"
 
 // cfg.c
-#define MSGTR_ConfigFileReadError "[cfg] error al leer archivo de configuración ...\n"
 #define MSGTR_UnableToSaveOption "[cfg] No se puede guardar la opción '%s'.\n"
 
 // interface.c
--- a/help/help_mp-fr.h	Tue Jun 14 18:55:04 2011 +0000
+++ b/help/help_mp-fr.h	Tue Jun 14 23:05:02 2011 +0000
@@ -951,7 +951,6 @@
 
 // cfg.c
 
-#define MSGTR_ConfigFileReadError "[cfg] Erreur lecture fichier config ...\n"
 #define MSGTR_UnableToSaveOption "[cfg] Impossible de sauvegarder l'option '%s'.\n"
 
 // interface.c
--- a/help/help_mp-hu.h	Tue Jun 14 18:55:04 2011 +0000
+++ b/help/help_mp-hu.h	Tue Jun 14 23:05:02 2011 +0000
@@ -784,7 +784,6 @@
 #define MSGTR_MSGBOX_LABEL_Warning "Figyelmeztetés!"
 
 // cfg.c
-#define MSGTR_ConfigFileReadError "[cfg] hiba a konfigurációs fájl olvasásakor ...\n"
 #define MSGTR_UnableToSaveOption "[cfg] A(z) '%s' opciót nem sikerült elmenteni.\n"
 
 // interface.c
--- a/help/help_mp-it.h	Tue Jun 14 18:55:04 2011 +0000
+++ b/help/help_mp-it.h	Tue Jun 14 23:05:02 2011 +0000
@@ -781,7 +781,6 @@
 #define MSGTR_MSGBOX_LABEL_Warning "Avvertimento!"
 
 // cfg.c
-#define MSGTR_ConfigFileReadError "[cfg] errore di lettura file di configurazione...\n"
 #define MSGTR_UnableToSaveOption "[cfg] non riesco a salvare l'opzione '%s'.\n"
 
 // interface.c
--- a/help/help_mp-pl.h	Tue Jun 14 18:55:04 2011 +0000
+++ b/help/help_mp-pl.h	Tue Jun 14 23:05:02 2011 +0000
@@ -922,7 +922,6 @@
 
 // cfg.c
 
-#define MSGTR_ConfigFileReadError "[cfg] błąd wczytywania pliku konfiguracyjnego ...\n"
 #define MSGTR_UnableToSaveOption "[cfg] Nie udało się zapisać opcji '%s'.\n"
 
 // interface.c
--- a/help/help_mp-ru.h	Tue Jun 14 18:55:04 2011 +0000
+++ b/help/help_mp-ru.h	Tue Jun 14 23:05:02 2011 +0000
@@ -773,7 +773,6 @@
 #define MSGTR_MSGBOX_LABEL_Warning "Предупреждение!"
 
 // cfg.c
-#define MSGTR_ConfigFileReadError "[cfg] ошибка чтения конфигурационного файла...\n"
 #define MSGTR_UnableToSaveOption "[cfg] Не могу сохранить опцию '%s'.\n"
 
 // interface.c
--- a/help/help_mp-tr.h	Tue Jun 14 18:55:04 2011 +0000
+++ b/help/help_mp-tr.h	Tue Jun 14 23:05:02 2011 +0000
@@ -965,7 +965,6 @@
 
 // cfg.c
 
-#define MSGTR_ConfigFileReadError "[cfg] ayar dosyası okuma hatası...\n"
 #define MSGTR_UnableToSaveOption "[cfg] '%s' seçeneği kaydedilemiyor.\n"
 
 // interface.c
--- a/help/help_mp-uk.h	Tue Jun 14 18:55:04 2011 +0000
+++ b/help/help_mp-uk.h	Tue Jun 14 23:05:02 2011 +0000
@@ -766,7 +766,6 @@
 #define MSGTR_MSGBOX_LABEL_Warning "Попередження!"
 
 // cfg.c
-#define MSGTR_ConfigFileReadError "[cfg] помилка читання файлу налаштунків ...\n"
 #define MSGTR_UnableToSaveOption "[cfg] Не можу зберегти '%s' опцію.\n"
 
 // interface.c
--- a/help/help_mp-zh_CN.h	Tue Jun 14 18:55:04 2011 +0000
+++ b/help/help_mp-zh_CN.h	Tue Jun 14 23:05:02 2011 +0000
@@ -795,7 +795,6 @@
 #define MSGTR_MSGBOX_LABEL_Warning "警告!"
 
 // cfg.c
-#define MSGTR_ConfigFileReadError "[cfg] 配置文件读取错误...\n"
 #define MSGTR_UnableToSaveOption "[cfg] 无法保存‘%s’选项。\n"
 
 // interface.c
--- a/help/help_mp-zh_TW.h	Tue Jun 14 18:55:04 2011 +0000
+++ b/help/help_mp-zh_TW.h	Tue Jun 14 23:05:02 2011 +0000
@@ -937,7 +937,6 @@
 
 // cfg.c
 
-#define MSGTR_ConfigFileReadError "[cfg] 配置文件讀取錯誤...\n"
 #define MSGTR_UnableToSaveOption "[cfg] 無法保存 '%s' 選項。\n"
 
 // interface.c