]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
0023090: [CEA 1510] Error at Salome launch with Japanese language
authorvsr <vsr@opencascade.com>
Tue, 5 May 2015 11:58:14 +0000 (14:58 +0300)
committervsr <vsr@opencascade.com>
Tue, 5 May 2015 11:58:14 +0000 (14:58 +0300)
src/SalomeApp/SalomeApp_Application.cxx
src/SalomeApp/salome_pluginsmanager.py

index 056df3241fc5bac44d8779239f6017aceae1b0ad..296efc161f2fc6b617064afa0764fb8ce8f46575 100644 (file)
@@ -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();
   }
index 944757301f69d8ce0c47f2e8df9c6f25c107be4c..10bf174fd58f2c1516df8702721c7e0e32c10d4c 100644 (file)
@@ -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={}