<source>WRN_NO_APPROPRIATE_SELECTION</source>
<translation>No appropriate objects selected</translation>
</message>
+ <message>
+ <source>VISU_PLUGINS_OTHER</source>
+ <translation>VISU plugins</translation>
+ </message>
</context>
<context>
<name>VisuGUI</name>
<source>WRN_NO_APPROPRIATE_SELECTION</source>
<translation>Les objets appropriés ne sont pas choisis</translation>
</message>
+ <message>
+ <source>VISU_PLUGINS_OTHER</source>
+ <translation>Extensions VISU</translation>
+ </message>
</context>
<context>
<name>VisuGUI</name>
// File : VisuGUI.cxx
// Author :
// Module : VISU
-//
+
+#include <Standard_math.hxx> // E.A. must be included before Python.h to fix compilation on windows
+#include "Python.h"
+
#include "VisuGUI.h"
// STL Includes
setMenuShown( true );
setToolShown( true );
+ // import Python module that manages VISU plugins (need to be here because SalomePyQt API uses active module)
+ PyGILState_STATE gstate = PyGILState_Ensure();
+ PyObject* pluginsmanager=PyImport_ImportModule((char*)"salome_pluginsmanager");
+ if(pluginsmanager==NULL)
+ PyErr_Print();
+ else
+ {
+ PyObject* result=PyObject_CallMethod( pluginsmanager, (char*)"initialize", (char*)"isss",1,"visu",tr("MEN_VISUALIZATION").toStdString().c_str(),tr("VISU_PLUGINS_OTHER").toStdString().c_str());
+ if(result==NULL)
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+ PyGILState_Release(gstate);
+ // end of GEOM plugins loading
+
// Reset actions accelerator keys
QList<QKeySequence> shortcuts;
shortcuts.append( QKeySequence(Qt::CTRL + Qt::Key_I) );