Plugins/ViewManagerPlugins/MdiArea/MdiArea.py

branch
5_0_x
changeset 528
0a48fc67c451
parent 110
c9a969db1469
child 792
a13346916170
equal deleted inserted replaced
522:da309f4795ce 528:0a48fc67c451
200 addActions(windowMenu, 200 addActions(windowMenu,
201 [None, self.nextChildAct, self.prevChildAct, 201 [None, self.nextChildAct, self.prevChildAct,
202 self.tileAct, self.cascadeAct, 202 self.tileAct, self.cascadeAct,
203 self.restoreAllAct, self.iconizeAllAct, 203 self.restoreAllAct, self.iconizeAllAct,
204 None]) 204 None])
205 for act in [self.restoreAllAct, self.iconizeAllAct]:
206 act.setEnabled(len(self.editors) != 0)
207 for act in [self.nextChildAct, self.prevChildAct, self.tileAct,
208 self.cascadeAct]:
209 act.setEnabled(len(self.editors) > 1)
210
205 act = windowMenu.addMenu(self.windowsMenu) 211 act = windowMenu.addMenu(self.windowsMenu)
206 if len(self.editors) == 0: 212 if len(self.editors) == 0:
207 act.setEnabled(False) 213 act.setEnabled(False)
208 214
209 def _initWindowActions(self): 215 def _initWindowActions(self):
349 not self.__removingView and \ 355 not self.__removingView and \
350 isinstance(watched, QScintilla.Editor.Editor): 356 isinstance(watched, QScintilla.Editor.Editor):
351 watched.close() 357 watched.close()
352 return True 358 return True
353 359
354 return False 360 return QMdiArea.eventFilter(self, watched, event)
355 361
356 def __restoreAllWindows(self): 362 def __restoreAllWindows(self):
357 """ 363 """
358 Private slot to restore all windows. 364 Private slot to restore all windows.
359 """ 365 """

eric ide

mercurial