After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 792139 - Toggle Enable shortcuts -> fading of shortcut keys delayed
Toggle Enable shortcuts -> fading of shortcut keys delayed
Status: RESOLVED FIXED
Product: gnome-terminal
Classification: Core
Component: Profiles
git master
Other Linux
: Normal minor
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-01-02 21:57 UTC by Egmont Koblinger
Modified: 2018-01-02 23:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Yup (863 bytes, patch)
2018-01-02 22:39 UTC, Egmont Koblinger
committed Details | Review

Description Egmont Koblinger 2018-01-02 21:57:56 UTC
Preferences -> Shortcuts -> toggle Enable shortcuts

Move the mouse slowly over the table underneath. Notice that the shortcut keys get (un)grayed out one by one, as you mouseover.

Expected: All of them should toggle immediately.

Happens both with Adwaita and Ambiance.

---

terminal_accels_fill_treeview() sets up the column's renderer func to be accel_set_func, with userdata being disable_shortcuts_button (the widget).

accel_set_func() sets the boolean writable based on this togglebutton's state, and sets sensitive/editable (the color is sure derived from the former) to this boolean.

There should be some means to ask treeview(cell?renderer?whatever) to redraw if its desired rendering changed due to some external circumstance (somewhat analogously to gtk_list_box_invalidate_sort() for example). I just cannot find it. Maybe reinstall the same cell_data_func?
Comment 1 Egmont Koblinger 2018-01-02 22:02:05 UTC
gtk_widget_queue_draw() ?
Comment 2 Christian Persch 2018-01-02 22:12:07 UTC
Yes, queuing a draw on the tree view when the pref changes should fix this.
Comment 3 Egmont Koblinger 2018-01-02 22:39:29 UTC
Created attachment 366224 [details] [review]
Yup

Not sure whether I'd need to disconnect the signal, and lazy to study it. :) There are a lot of signal_connect's in the file, and only a few of them are disconnected.
Comment 4 Christian Persch 2018-01-02 22:54:09 UTC
Comment on attachment 366224 [details] [review]
Yup

That's fine, since the button's and the treeview's lifespan is the same.
Comment 5 Egmont Koblinger 2018-01-02 23:11:52 UTC
Submitted.