ViewManager/ViewManager.py

changeset 162
28f235c426c4
parent 158
6a561f87bc07
child 253
3ccdf551bde7
equal deleted inserted replaced
161:bb3cc98f4104 162:28f235c426c4
4990 @param share flag indicating the share status (boolean) 4990 @param share flag indicating the share status (boolean)
4991 """ 4991 """
4992 aw = self.activeWindow() 4992 aw = self.activeWindow()
4993 if aw is not None: 4993 if aw is not None:
4994 fn = aw.getFileName() 4994 fn = aw.getFileName()
4995 if e5App().getObject("Project").isProjectFile(fn): 4995 if fn and e5App().getObject("Project").isProjectFile(fn):
4996 aw.shareEditor(share) 4996 aw.shareEditor(share)
4997 4997
4998 def startSharedEdit(self): 4998 def startSharedEdit(self):
4999 """ 4999 """
5000 Public slot to start a shared edit session for the current editor. 5000 Public slot to start a shared edit session for the current editor.
5001 """ 5001 """
5002 aw = self.activeWindow() 5002 aw = self.activeWindow()
5003 if aw is not None: 5003 if aw is not None:
5004 fn = aw.getFileName() 5004 fn = aw.getFileName()
5005 if e5App().getObject("Project").isProjectFile(fn): 5005 if fn and e5App().getObject("Project").isProjectFile(fn):
5006 aw.startSharedEdit() 5006 aw.startSharedEdit()
5007 5007
5008 def sendSharedEdit(self): 5008 def sendSharedEdit(self):
5009 """ 5009 """
5010 Public slot to end a shared edit session for the current editor and 5010 Public slot to end a shared edit session for the current editor and
5011 send the changes. 5011 send the changes.
5012 """ 5012 """
5013 aw = self.activeWindow() 5013 aw = self.activeWindow()
5014 if aw is not None: 5014 if aw is not None:
5015 fn = aw.getFileName() 5015 fn = aw.getFileName()
5016 if e5App().getObject("Project").isProjectFile(fn): 5016 if fn and e5App().getObject("Project").isProjectFile(fn):
5017 aw.sendSharedEdit() 5017 aw.sendSharedEdit()
5018 5018
5019 def cancelSharedEdit(self): 5019 def cancelSharedEdit(self):
5020 """ 5020 """
5021 Public slot to cancel a shared edit session for the current editor. 5021 Public slot to cancel a shared edit session for the current editor.
5022 """ 5022 """
5023 aw = self.activeWindow() 5023 aw = self.activeWindow()
5024 if aw is not None: 5024 if aw is not None:
5025 fn = aw.getFileName() 5025 fn = aw.getFileName()
5026 if e5App().getObject("Project").isProjectFile(fn): 5026 if fn and e5App().getObject("Project").isProjectFile(fn):
5027 aw.cancelSharedEdit() 5027 aw.cancelSharedEdit()

eric ide

mercurial