GNOME Bugzilla – Bug 723626
Changes in ~/.config/gedit/accels are never picked up
Last modified: 2014-04-13 17:43:11 UTC
With gedit 3.8.3 on Ubuntu 13.10, it does not appear possible to change the default keyboard shortcuts by editing the ~/.config/gedit/accels file. This used to work with gedit 3.8.1 on Ubuntu 12.04. How to reproduce: 0) Install gedit 3.8.3 on Ubuntu 13.10 1) Close down all running gedit instances 2) Modify the ~/.config/gedit/accels file, e.g. uncomment the line ; (gtk_accel_path "<Actions>/GeditWindowActions/SearchGoToLine" "<Primary>i") and change it to <Primary>l 3) Start gedit 4) Hit Ctrl (Primary) L; nothing happens 5) Hit Ctrl (Primary) I; the goto line dialog shows up. 6) Close gedit 7) The ~/.config/gedit/accels has been overwritten with all-defaults again (all lines commented. I also tried to copy in my ~/.config/gedit/accels that worked with gedit 3.4.1. Same result. I've no idea whether this is an Ubuntu-specific bug. I did not find any bugs reported for 13.10 about this specific issue in their launchpad.
It is really weird that it broke between 3.8.1 and 3.8.3 since we for sure didn't make any major changes between those two minor versions. For newer version we switches to using the new GAction framework which offers many advantages but unfortunately at the moment does not support editable accels. According to Ryan this is on the roadmap, but details are still up in the air at the moment. I am leaving this open for now in case someone wants to track down the 3.8 regression
I can confirm this happening to me too under 3.8.3. I looked at the sources and there were changes in gedit_settings.c between 3.8.1 and 3.8.3 but I couldn't find the source of the problem. I have not tested 3.8.1, I found no deb package and a simple ./configure;make; didn't cut it. I am still doubt about whether this is gedit itself or some gtk3. In the code the function load_accels in gedit-app.c calls gtk_accel_map_load (filename) correctly and there have been no changes between 3.8.1 and 3.8.3; this function should populate the customized accels but it seems it is not doing anything. My 2 cents...
For me this is a Cinnamon/mint issue. The accels don't get recorded in any app. This seems to be a gtk3/dekstop environment issue. Somehow the gtk_accel_map_load function does not affect Cinnamon's underlying accels structure. Which desktop environment do you have Paolo?
Created attachment 273821 [details] [review] patch to effectively load accelerators in gedit 3.8.x
Comment on attachment 273821 [details] [review] patch to effectively load accelerators in gedit 3.8.x patch does 3 things: 1_ erases the wrong call to load_accels in the gedit_app_constructed routine which belongs to the GObject class. 2_ instead calls the load_accels() function in the gedit_app_startup routine that is called under the GApplication class and mirrors the save_accels() call under the gedit_app_shutdown routine. 3_ moved the load_accels() routine above the startup routine so that it is defiend by the time it is called.
Thanks for the patch, I agree it makes sense to move the code there. I applied to 3.12