lxde / lxterminal

VTE terminal emulator written in GTK
GNU General Public License v2.0
161 stars 57 forks source link

Making tabs reorderable #50

Open SauronfromMordor opened 6 years ago

mtasaka commented 6 years ago

I tried this patch and it seems to be working. This is a nice feature and I will be glad if this patch is merged :-)

davesp commented 6 years ago

In "lxterminal 0.3.1", I can drag-and-drop tabs to re-order them. Would this change affect anything?

mtasaka commented 6 years ago

Well, I cannot reorder tabs on 0.3.1 (compiled with GTK2) without this patch. I guess the patch author actually cannot reorder, either.

davesp commented 6 years ago

My earlier test seems to have been faulty; after re-testing with the baseline, I can re-order tabs with shortcut keys but not with the mouse. With this patch, I can re-order tabs with the mouse.

medicalwei commented 6 years ago

After reordering, the terminal->terms doesn't properly reindexed (see terminal_move_tab_execute). I am wondering if we shouldn't make such array keep tracking the terminals but extend the underlying GtkBox to accommodate term structure.

mtasaka commented 6 years ago

After reordering, the terminal->terms doesn't properly reindexed

Just a thought: there is "page-reordered" signal, so perhaps we can do what is written in terminal_move_tab_execute when this signal is emitted (but some modification will be needed)

FinboySlick commented 4 years ago

After reordering, the terminal->terms doesn't properly reindexed (see terminal_move_tab_execute). I am wondering if we shouldn't make such array keep tracking the terminals but extend the underlying GtkBox to accommodate term structure.

I had actually started working on this a while back. If I recall, my approach was to get rid of our list of term objects and instead manage it through the gtk objects themselves (Which would re-order automatically). It was a lot of re-writing and testing though and sadly fell on the wayside. It is definitely something I planned to implement however.

itsdonnix commented 3 years ago

Fixes #73