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 723626 - Changes in ~/.config/gedit/accels are never picked up
Changes in ~/.config/gedit/accels are never picked up
Status: RESOLVED FIXED
Product: gedit
Classification: Applications
Component: general
3.8.x
Other Linux
: Normal normal
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2014-02-04 18:16 UTC by Karl Trygve Kalleberg
Modified: 2014-04-13 17:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to effectively load accelerators in gedit 3.8.x (1.29 KB, patch)
2014-04-08 16:58 UTC, nixahn
none Details | Review

Description Karl Trygve Kalleberg 2014-02-04 18:16:35 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.
Comment 1 Paolo Borelli 2014-02-14 20:07:32 UTC
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
Comment 2 nixahn 2014-04-07 19:09:45 UTC
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...
Comment 3 nixahn 2014-04-08 00:57:31 UTC
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?
Comment 4 nixahn 2014-04-08 16:58:00 UTC
Created attachment 273821 [details] [review]
patch to effectively load accelerators in gedit 3.8.x
Comment 5 nixahn 2014-04-08 17:00:53 UTC
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.
Comment 6 Paolo Borelli 2014-04-13 17:43:11 UTC
Thanks for the patch, I agree it makes sense to move the code there.

I applied to 3.12