Fixed the way LOCAL:// connector detects X11 poisoned plugins to avoid launching tray-icon enabled runtime (-x1)
authoretisserant
Fri, 16 Jan 2009 16:52:23 +0100
changeset 298 732e30ac8bf3
parent 297 8fca8b555808
child 299 d7f8ffe18017
Fixed the way LOCAL:// connector detects X11 poisoned plugins to avoid launching tray-icon enabled runtime (-x1)
connectors/__init__.py
plugger.py
--- a/connectors/__init__.py	Fri Jan 16 16:50:54 2009 +0100
+++ b/connectors/__init__.py	Fri Jan 16 16:52:23 2009 +0100
@@ -40,8 +40,10 @@
         return getattr(connectormodule, factoryname)(uri, pluginsroot)
     elif servicetype == "LOCAL":
         #handle incompatibility with tray icon and svgui...
-        no_poisoned_plugin = pluginsroot.GetChildByType("svgui") is None
-        runtime_port = pluginsroot.AppFrame.StartLocalRuntime(taskbaricon = no_poisoned_plugin)
+        poisoned_plugin = False
+        for PlugIn in pluginsroot.IterChilds():
+            poisoned_plugin |= PlugIn.PlugType == "svgui"
+        runtime_port = pluginsroot.AppFrame.StartLocalRuntime(taskbaricon = not poisoned_plugin)
         import PYRO
         return PYRO.PYRO_connector_factory(
                        "PYRO://127.0.0.1:"+str(runtime_port), 
--- a/plugger.py	Fri Jan 16 16:50:54 2009 +0100
+++ b/plugger.py	Fri Jan 16 16:52:23 2009 +0100
@@ -313,12 +313,6 @@
         else:
             return self
 
-    def GetChildByType(self, TypeName):
-        if TypeName:
-            return self._GetChildBySomething("PlugType", TypeName)
-        else:
-            return self
-
     def GetChildByIECLocation(self, Location):
         if Location:
             return self._GetChildBySomething("IEC_Channel", Location)