Set language in thread

feature/AudioLoginLogoff
Geoffrey Merck 6 years ago
parent ea9b0e9167
commit 170d0eed9d

@ -96,10 +96,14 @@ bool CSGSXLApp::createThread()
std::string CallSign, address; std::string CallSign, address;
config.getGateway(CallSign, address); config.getGateway(CallSign, address);
CallSign.resize(7, ' '); CallSign.resize(7, ' ');
CallSign.push_back('G'); CallSign.push_back('G');
bool audioEnabled;
TEXT_LANG audioLang;
config.getAudio(audioEnabled, audioLang);
m_thread->setLanguage(audioEnabled, audioLang);
printf("Gateway callsign set to %s, local address set to %s\n", CallSign.c_str(), address.c_str()); printf("Gateway callsign set to %s, local address set to %s\n", CallSign.c_str(), address.c_str());
CIRCDDB_Array clients; CIRCDDB_Array clients;

@ -44,6 +44,7 @@ m_countDExtra(countDExtra),
m_countDCS(countDCS), m_countDCS(countDCS),
m_killed(false), m_killed(false),
m_stopped(true), m_stopped(true),
m_audioEnabled(false),
m_callsign(), m_callsign(),
m_address(), m_address(),
m_g2Handler(NULL), m_g2Handler(NULL),
@ -178,6 +179,7 @@ void CSGSXLThread::run()
m_remote->close(); m_remote->close();
delete m_remote; delete m_remote;
} }
} }
void CSGSXLThread::kill() void CSGSXLThread::kill()
@ -210,6 +212,12 @@ void CSGSXLThread::setIRC(CIRCDDB* irc)
m_irc = irc; m_irc = irc;
} }
void CSGSXLThread::setLanguage(bool audioEnabled, TEXT_LANG lang)
{
m_audioEnabled = audioEnabled;
CAudioUnit::setLanguage(lang);
}
void CSGSXLThread::setRemote(bool enabled, const std::string& password, unsigned int port) void CSGSXLThread::setRemote(bool enabled, const std::string& password, unsigned int port)
{ {
if (enabled) { if (enabled) {

@ -44,6 +44,8 @@ public:
virtual void setRemote(bool enabled, const std::string& password, unsigned int port); virtual void setRemote(bool enabled, const std::string& password, unsigned int port);
virtual void setIRC(CIRCDDB* irc); virtual void setIRC(CIRCDDB* irc);
virtual void setLanguage(bool audioEnabled, TEXT_LANG lang);
virtual void run(); virtual void run();
virtual void kill(); virtual void kill();
@ -52,6 +54,7 @@ private:
unsigned int m_countDCS; unsigned int m_countDCS;
bool m_killed; bool m_killed;
bool m_stopped; bool m_stopped;
bool m_audioEnabled;
std::string m_callsign; std::string m_callsign;
std::string m_address; std::string m_address;

Loading…
Cancel
Save

Powered by TurnKey Linux.