Merge lp:~shiraeeshi/terminator/terminator into lp:terminator/gtk3

Proposed by minoru
Status: Merged
Merged at revision: 1710
Proposed branch: lp:~shiraeeshi/terminator/terminator
Merge into: lp:terminator/gtk3
Diff against target: 17 lines (+5/-2)
1 file modified
terminatorlib/window.py (+5/-2)
To merge this branch: bzr merge lp:~shiraeeshi/terminator/terminator
Reviewer Review Type Date Requested Status
Stephen Boddy Approve
Review via email: mp+314848@code.launchpad.net

Description of the change

This branch adds a check for containing a zoomed terminal before closing a window. If terminal is zoomed, it means that there are hidden terminals, so Terminator should ask a user for confirmation before closing a window.

To post a comment you must log in.
Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Thanks for the patch!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'terminatorlib/window.py'
--- terminatorlib/window.py 2016-12-08 02:27:10 +0000
+++ terminatorlib/window.py 2017-01-16 13:38:26 +0000
@@ -270,8 +270,11 @@
270 """Handle a window close request"""270 """Handle a window close request"""
271 maker = Factory()271 maker = Factory()
272 if maker.isinstance(self.get_child(), 'Terminal'):272 if maker.isinstance(self.get_child(), 'Terminal'):
273 dbg('Window::on_delete_event: Only one child, closing is fine')273 if self.get_property('term_zoomed') == True:
274 return(False)274 return(self.confirm_close(window, _('window')))
275 else:
276 dbg('Window::on_delete_event: Only one child, closing is fine')
277 return(False)
275 elif maker.isinstance(self.get_child(), 'Container'):278 elif maker.isinstance(self.get_child(), 'Container'):
276 return(self.confirm_close(window, _('window')))279 return(self.confirm_close(window, _('window')))
277 else:280 else:

Subscribers

People subscribed via source and target branches

to status/vote changes: