summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmirl <schmirl>2006-11-24 11:45:36 +0000
committerschmirl <schmirl>2006-11-24 11:45:36 +0000
commit7c300e2a12d11a046b8a0d86c4c0f2e37a2950b1 (patch)
tree6e9e0b362f517a02d377367fb4641312bd4d48e6
parent11f4a0c6e1dc6d47c2867b0e29dd66588e45b232 (diff)
downloadvdr-plugin-streamdev-7c300e2a12d11a046b8a0d86c4c0f2e37a2950b1.tar.gz
vdr-plugin-streamdev-7c300e2a12d11a046b8a0d86c4c0f2e37a2950b1.tar.bz2
Cache translation in cPluginStreamdevServer::Active() as this method
may be called very often. Though tr() is not producing too much overhead it is not neglectible either. If the actual translation is missing, the resulting syslog messages will become annoying. Note that the current OSD language is not monitored. Changes won't be reflected until the next restart. Thanks to Urig for the patch (#197).
-rw-r--r--streamdev-server.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/streamdev-server.c b/streamdev-server.c
index 823e272..2d81652 100644
--- a/streamdev-server.c
+++ b/streamdev-server.c
@@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
- * $Id: streamdev-server.c,v 1.3 2006/07/05 20:36:58 thomas Exp $
+ * $Id: streamdev-server.c,v 1.4 2006/11/24 11:45:36 schmirl Exp $
*/
#include "streamdev-server.h"
@@ -59,7 +59,9 @@ cString cPluginStreamdevServer::Active(void)
{
if (cStreamdevServer::Active())
{
- return tr("Streaming active");
+ static const char *Message = NULL;
+ if (!Message) Message = tr("Streaming active");
+ return Message;
}
return NULL;
}