Beispiel #1
0
            try:
                import ui.systemtray as systray
            except ImportError:
                log.error("Unable to load Qt3 support. Is it installed?")
                sys.exit(1)                  
        
        else: # qt4
            try:
                import ui4.systemtray as systray
            except ImportError:
                log.error("Unable to load Qt4 support. Is it installed?")
                mod.unlockInstance()
                sys.exit(1)        

        try:
            systray.run(r1)
        finally:
            mod.unlockInstance()

    else:
        # child (dbus & device i/o [qt4] or dbus [qt3])
        os.close(r1)
        
        if ui_toolkit == 'qt4':
            r2, w2 = os.pipe()
            r3, w3 = os.pipe()
            
            log.debug("Creating pipe: hpssd (%d) ==> hpdio (%d)" % (w2, r2))
            log.debug("Creating pipe: hpdio (%d) ==> hpssd (%d)" % (w3, r3))
            
            child_pid2 = os.fork()
Beispiel #2
0
            try:
                import ui.systemtray as systray
            except ImportError:
                log.error("Unable to load Qt3 support. Is it installed?")
                sys.exit(1)

        else:  # qt4
            try:
                import ui4.systemtray as systray
            except ImportError:
                log.error("Unable to load Qt4 support. Is it installed?")
                mod.unlockInstance()
                sys.exit(1)

        try:
            systray.run(r1)
        finally:
            mod.unlockInstance()

    else:
        # child (dbus & device i/o [qt4] or dbus [qt3])
        os.close(r1)

        if ui_toolkit == 'qt4':
            r2, w2 = os.pipe()
            r3, w3 = os.pipe()

            log.debug("Creating pipe: hpssd (%d) ==> hpdio (%d)" % (w2, r2))
            log.debug("Creating pipe: hpdio (%d) ==> hpssd (%d)" % (w3, r3))

            child_pid2 = os.fork()