reworded "all but active" -> "inactive", renamed closeAllButActiveSubWindows -> closeInactiveSubWindows
This commit is contained in:
@ -18,14 +18,14 @@ class MDIArea(QMdiArea):
|
||||
|
||||
def _add_menu(self, bar):
|
||||
self.menu = menu = BarMenu(bar, "&Windows")
|
||||
menu.addAction("Cascade", self.on_cascade)
|
||||
menu.addAction("Tile", self.on_tile)
|
||||
menu.addAction("Cascade", self.on_cascade)
|
||||
menu.addAction("Tile", self.on_tile)
|
||||
menu.addSeparator()
|
||||
v1 = menu.addCheckbox("Single window", triggered=self.enable_single_window_mode)
|
||||
v2 = menu.addCheckbox("Tabbed", triggered=self.enable_tabbed_view)
|
||||
menu.addSeparator()
|
||||
menu.addAction("Close all", self.closeAllSubWindows)
|
||||
menu.addAction("Close all but active", self.closeAllButActiveSubWindows)
|
||||
menu.addAction("Close inactive", self.closeInactiveSubWindows)
|
||||
|
||||
#TODO: move to MenuBase
|
||||
ag = QActionGroup(menu.qmenu)
|
||||
@ -43,7 +43,7 @@ class MDIArea(QMdiArea):
|
||||
|
||||
def enable_single_window_mode(self):
|
||||
self.enable_subwindow_view()
|
||||
self.closeAllButActiveSubWindows()
|
||||
self.closeInactiveSubWindows()
|
||||
active = self.activeSubWindow()
|
||||
if active:
|
||||
active.showMaximized()
|
||||
@ -105,7 +105,7 @@ class MDIArea(QMdiArea):
|
||||
return sub
|
||||
|
||||
|
||||
def closeAllButActiveSubWindows(self):
|
||||
def closeInactiveSubWindows(self):
|
||||
active = self.activeSubWindow()
|
||||
for sub in self.subWindowList():
|
||||
if sub != active:
|
||||
|
Reference in New Issue
Block a user