#include <QtGui/QApplication>
#include <QTranslator>
#include "urpomainwindow.h"
-#include <QLocale>
+#include <QString>
+#include <cstdlib>
/*! @mainpage Urpo - Unix Remote Printing Operation
QApplication a(argc, argv);
QTranslator appTranslator;
- appTranslator.load("urpo_" + QLocale::system().name(),":/");
+ // using LANG enviroment variable instead of QLocale because of Qt on Maemo problem
+ // bug #6136
+ QString language = std::getenv("LANG");
+ appTranslator.load("urpo_" + language.toLower() ,":/");
a.installTranslator(&appTranslator);
UrpoMainWindow w;
#include <QUrl>
#include <QLocale>
#include <QFile>
+
+#include <cstdlib>
+
#include "settingsdialog.h"
#define VERSION "0.9" /*! Program version */
: QMainWindow(parent)
{
setWindowTitle(QString("URPO ") + VERSION );
+ setWindowIcon( QIcon(":/urpo.png"));
// Load connection settings
settings_ = new UrpoConnectionSettings("Urpo","Urpo");
void UrpoMainWindow::initHelp()
{
+
+
// Init help
helpBrowser_ = new QTextBrowser();
helpBrowser_->setWindowTitle(tr("Urpo Help"));
// Load help file
// Try to load locale version index_fi etc.
- QString language=QLocale::system().name().left(2);
- QString helpfilename = QString(":/help/index_") + language + QString(".html");
+
+ // using LANG enviroment variable instead of QLocale because of Qt on Maemo problem
+ // bug #6136
+ QString language = std::getenv("LANG");
+
+ QString helpfilename = QString(":/help/index_") + language.left(2).toLower() + QString(".html");
+
+ monitor_->debugMessage(helpfilename);
QFile helpfile( helpfilename );
if( helpfile.exists() )