From 558b04a837b2a8d1b90a0e7120a3898626b286b5 Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 5 May 2015 14:58:14 +0300 Subject: [PATCH] 0023090: [CEA 1510] Error at Salome launch with Japanese language --- src/SalomeApp/SalomeApp_Application.cxx | 2 +- src/SalomeApp/salome_pluginsmanager.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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={} -- 2.39.2