234 addActions(windowMenu, |
234 addActions(windowMenu, |
235 [None, self.nextChildAct, self.prevChildAct, |
235 [None, self.nextChildAct, self.prevChildAct, |
236 self.tileAct, self.cascadeAct, |
236 self.tileAct, self.cascadeAct, |
237 self.restoreAllAct, self.iconizeAllAct, |
237 self.restoreAllAct, self.iconizeAllAct, |
238 None]) |
238 None]) |
|
239 for act in [self.restoreAllAct, self.iconizeAllAct]: |
|
240 act.setEnabled(len(self.editors) != 0) |
|
241 for act in [self.nextChildAct, self.prevChildAct, self.tileAct, |
|
242 self.cascadeAct]: |
|
243 act.setEnabled(len(self.editors) > 1) |
|
244 |
239 act = windowMenu.addMenu(self.windowsMenu) |
245 act = windowMenu.addMenu(self.windowsMenu) |
240 if len(self.editors) == 0: |
246 if len(self.editors) == 0: |
241 act.setEnabled(False) |
247 act.setEnabled(False) |
242 |
248 |
243 def _initWindowActions(self): |
249 def _initWindowActions(self): |
382 not self.__removingView and \ |
388 not self.__removingView and \ |
383 isinstance(watched, QScintilla.Editor.Editor): |
389 isinstance(watched, QScintilla.Editor.Editor): |
384 watched.close() |
390 watched.close() |
385 return True |
391 return True |
386 |
392 |
387 return False |
393 return QMdiArea.eventFilter(self, watched, event) |
388 |
394 |
389 def __restoreAllWindows(self): |
395 def __restoreAllWindows(self): |
390 """ |
396 """ |
391 Private slot to restore all windows. |
397 Private slot to restore all windows. |
392 """ |
398 """ |