summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/taboapp/main.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/core/apps/taboapp/main.cpp b/core/apps/taboapp/main.cpp
index 497e29f..5f7f86c 100644
--- a/core/apps/taboapp/main.cpp
+++ b/core/apps/taboapp/main.cpp
@@ -11,7 +11,6 @@
11int main( int argc, char **argv ) 11int main( int argc, char **argv )
12{ 12{
13 QPEApplication a( argc, argv ); 13 QPEApplication a( argc, argv );
14 int ret = 0;
15 14
16 OTabWidget *tabwidget = new OTabWidget(0, "tab widget"); 15 OTabWidget *tabwidget = new OTabWidget(0, "tab widget");
17 16
@@ -30,10 +29,23 @@ int main( int argc, char **argv )
30 qDebug( "accepted: %s", QString( path + "/" + *it ).latin1() ); 29 qDebug( "accepted: %s", QString( path + "/" + *it ).latin1() );
31 30
32 QList<QWidget> list = iface->widgets(); 31 QList<QWidget> list = iface->widgets();
33
34 QWidget *widget; 32 QWidget *widget;
35 for ( widget = list.first(); widget != 0; widget = list.next() ) 33 for ( widget = list.first(); widget != 0; widget = list.next() )
36 tabwidget->addTab(widget, QString(*it), QString(*it)); 34 tabwidget->addTab(widget, QString(*it), QString(*it));
35
36 QString lang = getenv( "LANG" );
37 if (lang.isNull())
38 lang = "en";
39 QTranslator *trans = new QTranslator(qApp);
40 QString type = (*it).left( (*it).find(".") );
41 if (type.left(3) == "lib")
42 type = type.mid(3);
43 type = type.right( type.find("lib") );
44 QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm";
45 if ( trans->load( tfn ))
46 qApp->installTranslator( trans );
47 else
48 delete trans;
37 } 49 }
38 } 50 }
39 51