! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Gtk-CRITICAL and permanently unavailable user-customizable-action shortcuts
Status:
RESOLVED: FIXED

Comments

Description Reuben Green editbugs 2019-09-17 17:13:29 CEST
Created attachment 9033 
Patch to fix these bugs

While looking at thunar bug #15119, I uncovered two new bugs in the user customizable action (uca) plugin, affecting both the master and xfce-4.14 branches. I have included both bugs in this one report, together with a patch to fix them.

The first bug can be reproduced as follows. Run thunar from a terminal and create a new uca (it does not matter what parameters you enter, you can just put 'blah' in the text boxes and not enter a shortcut or any other details). When you click OK, the terminal will show a Gtk-CRITICAL error. For me, the error is

(thunar:17196): Gtk-CRITICAL **: 15:59:40.857: gtk_accel_map_lookup_entry: assertion '_gtk_accel_path_is_valid (accel_path)' failed

This is caused by a missing check for a NULL value (the NULL value itself is not a bug, as it represents the absence of a previous shortcut), and the first commit in the attached patch fixes this bug.

The second bug can be reproduced as follows. Create a new uca (again, the parameters entered do not matter) and assign it a keyboard shortcut. Then delete this uca from the list in the dialog, and try to create another uca with the same shortcut. You will get a dialog telling you that this shortcut is in use. This problem then persists even if you exit thunar between creating and deleting the initial uca, and attempting to create the second uca. The shortcut thus becomes permanently unusable, and one has to manually edit the accels.scm config file to fix this. The second commit in the attached patch fixes this bug.
Comment 1 Git Bot editbugs 2019-09-18 03:23:54 CEST
Reuben Green referenced this bugreport in commit 0cfd8d96fd4c1846b42927a71ada062cae25ac23

Prevent Gtk-CRITICAL when adding or modifying a user customizable action.

https://git.xfce.org/xfce/thunar/commit?id=0cfd8d96fd4c1846b42927a71ada062cae25ac23
Comment 2 Git Bot editbugs 2019-09-18 03:23:56 CEST
Reuben Green referenced this bugreport in commit 15243ec398f1d877eb15e83d8305a1b0347f7a48

Clear user customizable action shortcut when the action is deleted

https://git.xfce.org/xfce/thunar/commit?id=15243ec398f1d877eb15e83d8305a1b0347f7a48
Comment 3 Git Bot editbugs 2019-09-18 03:25:25 CEST
Reuben Green referenced this bugreport in commit c1292ad570a8765c0f589083d75baa018d7eeed3

Prevent Gtk-CRITICAL when adding or modifying a user customizable action.

https://git.xfce.org/xfce/thunar/commit?id=c1292ad570a8765c0f589083d75baa018d7eeed3
Comment 4 Git Bot editbugs 2019-09-18 03:25:28 CEST
Reuben Green referenced this bugreport in commit ebb3936eb2d7375a26f9d1e863975e153d72c9a4

Clear user customizable action shortcut when the action is deleted

https://git.xfce.org/xfce/thunar/commit?id=ebb3936eb2d7375a26f9d1e863975e153d72c9a4
Comment 5 Andre Miranda editbugs 2019-09-18 03:26:48 CEST
Thanks for the patches!
Comment 6 alexxcons editbugs 2019-09-20 10:47:25 CEST
Thanks for looking into bug #15119  ! If it takes longer, best assign it to yourself, so that nobody else starts to work at it.

Possibly related: I am currently working on Bug #14410 .. so far I did not look into the shortcut aspect of the menu items. If you have some preferences for the new context menu widget related to (UCA) shortcuts, please let me know !

I still have to do alot before it is ready to use (The WIP patch so far only replaces the location-button context menu).
However you already can estimate the design of the new context-menu widget.
 A link to the WIP branch, and what I plan to do next can be found in the last comment of the bug:
https://bugzilla.xfce.org/show_bug.cgi?id=14410#c3

Bug #15970

Reported by:
Reuben Green
Reported on: 2019-09-17
Last modified on: 2019-09-20

People

Assignee:
Xfce Bug Triage
CC List:
2 users

Version

Attachments

Patch to fix these bugs (3.07 KB, patch)
2019-09-17 17:13 CEST , Reuben Green
no flags

Additional information