forked from openlp/openlp
More Fixes
This commit is contained in:
parent
92b1b82a58
commit
66c665d352
@ -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
|
||||||
return True
|
if file == u'(soffice)' or file == u'(openoffice.org)':
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
def createApp(self):
|
def createApp(self):
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user