Mercurial > mplayer.hg
comparison gui/wm/ws.c @ 35635:ac2a7944829c
Replace stderr output by mp_msg() error messages.
Additionally, enable translation of error text
and add doxygen comment.
author | ib |
---|---|
date | Thu, 10 Jan 2013 15:24:39 +0000 |
parents | b98a97813f10 |
children | 840e473ba4c0 |
comparison
equal
deleted
inserted
replaced
35634:b98a97813f10 | 35635:ac2a7944829c |
---|---|
189 | 189 |
190 // ---------------------------------------------------------------------------------------------- | 190 // ---------------------------------------------------------------------------------------------- |
191 // Init X Window System. | 191 // Init X Window System. |
192 // ---------------------------------------------------------------------------------------------- | 192 // ---------------------------------------------------------------------------------------------- |
193 | 193 |
194 /** | |
195 * @brief Inform about an X error that has occurred. | |
196 * | |
197 * @param display display | |
198 * @param event pointer to an X error event structure | |
199 * | |
200 * @return 0 | |
201 */ | |
194 static int wsErrorHandler(Display *display, XErrorEvent *event) | 202 static int wsErrorHandler(Display *display, XErrorEvent *event) |
195 { | 203 { |
196 char type[128]; | 204 char type[128]; |
197 | 205 |
198 XGetErrorText(display, event->error_code, type, sizeof(type)); | 206 XGetErrorText(display, event->error_code, type, sizeof(type)); |
199 | 207 |
200 fprintf(stderr, "[ws] Error in display.\n"); | 208 mp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_WS_XError); |
201 fprintf(stderr, "[ws] Error code: %d ( %s )\n", event->error_code, type); | 209 mp_msg(MSGT_GPLAYER, MSGL_ERR, "[ws] Error code: %d - %s\n", event->error_code, type); |
202 fprintf(stderr, "[ws] Request code: %d\n", event->request_code); | 210 mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[ws] Request code: %d (minor code: %d)\n", event->request_code, event->minor_code); |
203 fprintf(stderr, "[ws] Minor code: %d\n", event->minor_code); | 211 mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[ws] MPlayer module: %s\n", current_module ? current_module : "(none)"); |
204 fprintf(stderr, "[ws] Modules: %s\n", current_module ? current_module : "(NULL)"); | |
205 | 212 |
206 return 0; | 213 return 0; |
207 } | 214 } |
208 | 215 |
209 /** | 216 /** |