mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 20:55:17 -05:00
Rockbox Utility: listen to translation change events.
When changing the language don't require a restart anymore. Instead listen to the appropriate changeEvent and retranslate the UI. Designer generated UI files already provide such a function. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30633 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d25341a032
commit
2e3de70401
21 changed files with 151 additions and 12 deletions
|
|
@ -71,7 +71,13 @@ int main( int argc, char ** argv ) {
|
|||
if(QObject::tr("LTR") == "RTL")
|
||||
app.setLayoutDirection(Qt::RightToLeft);
|
||||
|
||||
// keep a list of installed translators. Needed to be able uninstalling them
|
||||
// later again (in case of translation changes)
|
||||
QList<QTranslator*> translators;
|
||||
translators.append(&translator);
|
||||
translators.append(&qttrans);
|
||||
RbUtilQt window(0);
|
||||
RbUtilQt::translators = translators;
|
||||
window.show();
|
||||
|
||||
// app.connect( &app, SIGNAL(lastWindowClosed()), &app, SLOT(quit()) );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue