Port to GTK3 and new VTE

Bug #1847932 reported by Peter J. Mello
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
asbru-cm
Fix Released
High
Unassigned

Bug Description

From egmontkob on GitHub:
Ásbrú should be ported to GTK3. You guys all know it well, e.g. https://github.com/asbru-cm/asbru-cm/projects/1, the feature-gtk3 branch, etc...

It's mostly not about GTK or GNOME 2/3 per se (although that too, e.g. the continuously increasing maintenance burden like in #114), but probably most importantly about VTE. GTK2 can only use VTE version 0.28 which has been unmaintained for 8+ years, and is nowadays the cause of serious terminal emulation troubles like #49, #143. There have been hundreds of other bugfixes, including a security/privacy issue of scrollback written to disk unencrypted, many crash fixes, tons of emulation fixes, huge speed improvement, and so on, and also many many cool new features added to GTK3-based VTE which is currently at version 0.58.

Old VTE will probably be removed by distributions in the near future: Debian, Ubuntu, Fedora.

Here's my work on porting Ásbrú to GTK3. IMO it's in pretty good state, and is quite usable (unlike the feature-gtk3 branch). I haven't checked all the features of Ásbrú (I'm not even familiar with them), but the main UI, preferences, defining a connection etc. seem to work fine, including launching a local terminal using new VTE.

The feature-gtk3 branch comments out lots of things that I didn't need to comment out, and is behind master, so I decided to base my work on master. The attached patches apply on current master (158c2ab). That being said, certain things I've taken from the feature-gtk3 branch (to make it easier to compare the two, pick fixes from one to the other).

0001-search-n-replace-Gtk2-Gtk3.patch.txt – This is just an automatic search'n'replace from "Gtk2" to "Gtk3" and "GTK2" to "GTK".

0002-asbru.glade-from-feature-gtk3.patch.txt – This one adds the new glade file, copied from the feature-gtk3 branch.

0003-asbru.glade-updates-d3b14a5089.158c2abdc7.patch.txt – This patch updates the glade file, by backporting the changes that happened in master since the fork.

0004-My-stuff.patch.txt – On top of the previous patches that "prepare" for GTK3, this is the real porting.

0005-Drag-n-drop.patch.txt – Fix DND and a few related bits.

0006-Drag-n-drop-tooltip-border.patch.txt – Add a black border to DND tooltip.

0007-TreeView-fix-getting-node_uuid.patch.txt – Fix finding an item's children in TreeView.

0008-Silly-typo.patch.txt – Typo fix (and also the reason why I hate script languages as opposed to compiled ones :)).

Known issues, bugs, missing bits:

Need to migrate from libunique to GApplication or GtkApplication, from send_message() to probably GApplication's "command-line" signal and friends.

Remembering the history of terminal commands doesn't work (I've commented it out). VTE's get_text_range() gives this error: "gperl-i11n-invoke-c.c:582:_allocate_out_mem: assertion failed: (interface_info)". Looks like a nasty issue with VTE's annotation or the introspection framework. Might need help from introspection and Perl binding experts.

Port drag and drop. Update: It's ported now, but see a comment below.

Port tray icon support (haven't tested).

Make sure that X11 compatibility layer is used even when on Wayland, rather than being a native Wayland app, so that embedding an external window based on XID still works; or at least make sure it degrades gracefully on Wayland.

Update the documentation, user facing messages, deb/rpm definitions etc.

Testing, testing, testing. Walking through all the features. As soon as something doesn't work, or an error is printed, track it down and fix it.

Update for new stuff in VTE:

Transparency needs to be done differently. set_color_background() needs to get a color with an alpha channel, plus the widget needs to be app_paintable. Maybe something more is needed too, I'm not sure. See VTE-based apps that support transparency for reference, e.g. Tilix, Xfce4-terminal, Guake, and a Fedora/Ubuntu patch for GNOME Terminal. Or just remove this feature.

set_emulation() is no longer available, VTE can no longer try to emulate various behaviors as per their terminfo definitions, the emulation behavior is hardwired. Remove the corresponding config option and UI field.

set_visible_bell() is no longer available. You might remove this option, or implement showing some custom UI element (e.g. a bell symbol) on the bell signal.

set_bold_is_bright() is new in VTE 0.52, and defaults to being disabled since 0.56. This latter one results in darker colors that not everyone likes, for compatibility it would be great to add a config option. (Discussions)

New VTE lets you display the right-click context menu only if the application running inside is not interested in mouse events, and pass it to the application otherwise. (PAC bug, VTE fix)

You might go through the API docs and decide what other new stuff to add. E.g. cursor blinking, text blinking, mouse pointer autohide...

I sincerely hope that my work gives a boost to porting to GTK3 and that it will happen in the foreseeable future.

(Disclaimer: I don't use Ásbrú myself and I'm not particularly interested in this project. What I'm interested in is terminal emulation in general, and retiring old VTE in favor of the new one ASAP.)

Changed in asbru-cm:
assignee: Ásbrú Connection Manager Project (asbru-cm) → nobody
importance: High → Unknown
status: Fix Released → Unknown
no longer affects: asbru-cm/6.0
Changed in asbru-cm:
importance: Unknown → High
Changed in asbru-cm:
importance: High → Undecided
status: Unknown → New
importance: Undecided → High
status: New → 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.