More Fixes

This commit is contained in:
Tim Bentley 2009-06-25 21:06:02 +01:00
parent 92b1b82a58
commit 66c665d352

View File

@ -57,15 +57,17 @@ class Openoffice(object):
self.createApp() self.createApp()
def startOpenoffice(self): def startOpenoffice(self):
cmd = u'openoffice.org -nologo -norestore -minimized ' + u'"' + u'-accept=socket,host=localhost,port=2002;urp;'+ u'"' cmd = u'openoffice.org -nologo, -norestore, -minimized, -impress,' + u'"' + u'-accept=socket,host=localhost,port=2002;urp;'+ u'"'
retval = subprocess.Popen(cmd, shell=True) retval = subprocess.Popen(cmd, shell=True)
self.oopid = retval.pid self.oopid = retval.pid
def checkOoPid(self): def checkOoPid(self):
procfile = open("/proc/%d/stat" %(self.oopid)) procfile = open("/proc/%d/stat" %(self.oopid))
if procfile.readline().split()[1] == u'(soffice)': file = procfile.readline().split()[1]
return False print file
if file == u'(soffice)' or file == u'(openoffice.org)':
return True return True
return False
def createApp(self): def createApp(self):
try: try: