From: vsr Date: Tue, 5 May 2015 11:58:14 +0000 (+0300) Subject: 0023090: [CEA 1510] Error at Salome launch with Japanese language X-Git-Tag: V7_6_0rc1~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=558b04a837b2a8d1b90a0e7120a3898626b286b5;p=modules%2Fgui.git 0023090: [CEA 1510] Error at Salome launch with Japanese language --- diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index 056df3241..296efc161 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -377,7 +377,7 @@ void SalomeApp_Application::createActions() { PyLockWrapper lck; // acquire GIL PyObjWrapper pluginsmanager = PyImport_ImportModule((char*)"salome_pluginsmanager"); - PyObjWrapper res = PyObject_CallMethod( pluginsmanager, (char*)"initialize", (char*)"isss",0,"salome",tr("MEN_DESK_PLUGINS_TOOLS").toStdString().c_str(),tr("MEN_DESK_PLUGINS").toStdString().c_str()); + PyObjWrapper res = PyObject_CallMethod( pluginsmanager, (char*)"initialize", (char*)"isss",0,"salome",tr("MEN_DESK_TOOLS").toUtf8().data(),tr("MEN_DESK_PLUGINS").toUtf8().data()); if ( !res ) PyErr_Print(); } diff --git a/src/SalomeApp/salome_pluginsmanager.py b/src/SalomeApp/salome_pluginsmanager.py index 944757301..10bf174fd 100644 --- a/src/SalomeApp/salome_pluginsmanager.py +++ b/src/SalomeApp/salome_pluginsmanager.py @@ -125,13 +125,13 @@ class Context: def find_menu(smenu): lmenus=smenu.split("|") - main=lmenus.pop(0).strip() + main=lmenus.takeFirst().trimmed() menu=sgPyQt.getPopupMenu(main) return findMenu(lmenus,menu) def findMenu(lmenu,menu): if not lmenu:return menu - m=lmenu.pop(0).strip() + m=lmenu.takeFirst().trimmed() for a in menu.actions(): if a.menu(): if a.text() == m: @@ -149,8 +149,8 @@ logger=Logger("PluginsManager") #,color=GREEN) class PluginsManager: def __init__(self,module,name,basemenuname,menuname): self.name=name - self.basemenuname=basemenuname - self.menuname=menuname + self.basemenuname=QtCore.QString.fromUtf8(basemenuname) + self.menuname=QtCore.QString.fromUtf8(menuname) self.module=module self.registry={} self.handlers={}