LayoutManager plugin compatibility

Asked by Alexey

Hello. I am not very experienced in Python and I've found that in one of recent commits you've removed get_top_window def from utils module, and this breaks very handy layout manager plugin. Can you bring it back in future release? I've added this function locally in utils.py file and plugin looks to work okay now.
Thank you.

Question information

Language:
English Edit question
Status:
Solved
For:
Terminator Edit question
Assignee:
No assignee Edit question
Solved by:
Stephen Boddy
Solved:
Last query:
Last reply:
Revision history for this message
Best Stephen Boddy (stephen-j-boddy) said :
#1

OK, the function was removed back in 2011... not exactly recent.

I'm assuming that the layout manager plugin you are talking about is the one here:
https://github.com/camillo/LayoutManager
which does reference the get_top_window function. This as it says is old and has moved to:
https://github.com/camillo/TerminatorPlugins
which now recreates that function.

All the get_top_window function did was iterate up the widget tree till it found the window. This was replaced by the builtin gtk widget function get_toplevel which did exactly the same thing, but within the faster GTK C libraries.

In the layout manager plugin you just need to replace:
    window = get_top_window(terminal)
with:
    window = terminal.get_toplevel()
and then the redundant get_top_window function could be removed from there too.

Perhaps you could raise the request against the plugin in GitHub.

Revision history for this message
Alexey (sneakyfildy) said :
#2

Thank you very much! I will fork plugin and make correct version, thank you again!

Revision history for this message
Alexey (sneakyfildy) said :
#3

Thanks Stephen Boddy, that solved my question.