Make "Zoom/Maximize terminal" inactive with one pane only

Bug #1518081 reported by Egmont Koblinger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Terminator
Fix Released
Wishlist
Unassigned

Bug Description

If there's only one pane, the right click -> "Zoom terminal" or "Maximize terminal" options don't do anything (and they don't even change to "Restore all terminals").

I recommend to make them insensitive in this case.

Related branches

Changed in terminator:
importance: Undecided → Wishlist
Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

In the mean time... the "widget in children" check at the beginning of zoom() in terminatorlib/window.py is incorrect. It only evaluates to True if there's only a single terminal _and_ there are no multiple tabs open (otherwise get_children() returns a Notebook object). The second condition should be irrelevant here.

In turn, the 'zoom' signal handler is installed in paned.py and this code is only executed when you have multiple panes.

It's yet unclear to me if there's another path to call that zoom() method, and also how the 'zoom' signal handler gets removed when other panes are closed.

The condition should be changed to a more robust one, one that really checks whether the given terminal is the only one in the current tab. This is the same check that we'll need for the original request too.

Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :
Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

Fix attached.

I forgot to rewrite the comment "This widget is a direct child of ours". This is not true, since there might be a Notebook in between. I'll let you rephrase it :)

Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

Note: bug 1501106's reporter says "I prefer consistency for these kind of things, an IMO the terminal should still expand, hiding the tabs." That would require a completely different approach: the way the zoom handler is installed in paned.py would need to be installed even if it's a single terminal within the tab.

Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :
Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

As per comment #3 in lp:1501106, I'll commit the first half of v2 patch, but not the second as I have work already for the case of expanding a single terminal in a tab.

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

In rev 1689 for trunk if applicable.
In rev 1627 for gtk3 if applicable.

Changed in terminator:
status: New → Fix Committed
Changed in terminator:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.