<!--
-->
<document>
+ <section name="language">
+ <!-- Language settings (resource manager)-->
+ <parameter name="language" value="en"/>
+ <parameter name="locale" value="true"/>
+ </section>
<section name="Viewer" >
<!-- Viewer preferences -->
<parameter name="background" value="bt=2;fn=;tm=0;ts=false;c1=#cddbff;c2=#698fff;gt=1;gr=" />
#include <Config_PropManager.h>
#include <Config_SelectionFilterMessage.h>
+#include <SUIT_ResourceMgr.h>
+
#include <QApplication>
#include <QFileDialog>
#include <QMessageBox>
#include <QMenu>
#include <QToolButton>
#include <QAction>
+#include <QDesktopWidget>
#ifdef _DEBUG
#include <QDebug>
{
myMainWindow = mySalomeConnector ? 0 : new AppElements_MainWindow();
+ if (myMainWindow) {
+ SUIT_ResourceMgr* aResMgr = ModuleBase_Preferences::resourceMgr();
+ bool aCloc = aResMgr->booleanValue("language", "locale", true);
+ if (aCloc)
+ QLocale::setDefault( QLocale::c() );
+ else
+ QLocale::setDefault( QLocale::system() );
+ }
+
myDisplayer = new XGUI_Displayer(this);
mySelector = new XGUI_SelectionMgr(this);
myOperationMgr = new XGUI_OperationMgr(this);
myActionsMgr = new XGUI_ActionsMgr(this);
- myErrorDlg = new XGUI_ErrorDialog(myMainWindow);
+ myErrorDlg = new XGUI_ErrorDialog(QApplication::desktop());
myContextMenuMgr = new XGUI_ContextMenuMgr(this);
connect(myContextMenuMgr, SIGNAL(actionTriggered(const QString&, bool)), this,
SLOT(onContextMenuCommand(const QString&, bool)));
SLOT(onOperationCommitted(ModuleBase_Operation*)));
connect(myOperationMgr, SIGNAL(operationAborted(ModuleBase_Operation*)),
SLOT(onOperationAborted(ModuleBase_Operation*)));
- connect(myMainWindow, SIGNAL(exitKeySequence()), SLOT(onExit()));
+ if (myMainWindow)
+ connect(myMainWindow, SIGNAL(exitKeySequence()), SLOT(onExit()));
connect(this, SIGNAL(errorOccurred(const QString&)), myErrorDlg, SLOT(addError(const QString&)));
}