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
1=== modified file 'terminatorlib/window.py'
2--- terminatorlib/window.py 2016-12-08 02:27:10 +0000
3+++ terminatorlib/window.py 2017-01-16 13:38:26 +0000
4@@ -270,8 +270,11 @@
5 """Handle a window close request"""
6 maker = Factory()
7 if maker.isinstance(self.get_child(), 'Terminal'):
8- dbg('Window::on_delete_event: Only one child, closing is fine')
9- return(False)
10+ if self.get_property('term_zoomed') == True:
11+ return(self.confirm_close(window, _('window')))
12+ else:
13+ dbg('Window::on_delete_event: Only one child, closing is fine')
14+ return(False)
15 elif maker.isinstance(self.get_child(), 'Container'):
16 return(self.confirm_close(window, _('window')))
17 else:

Subscribers

People subscribed via source and target branches

to status/vote changes: