{
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();
}
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:
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={}