GNOME Bugzilla – Bug 613523
Added autocorrection exceptions are not immediately shown
Last modified: 2010-03-25 12:21:35 UTC
I can't disable correction of two capital letters. Corresponding checkbox is unchecked every time, but correction works. If I check this checkbox, the next time it's unchecked again, but nothing changes. I've added exception (Exception didn't appear in window first time, but after next open it appeared), nothing changes
Are you running gconf?
No. I've configured Goffice --without-gconf and Gnumeric --without-gnome
Are your other preferences saved and used?
We should kill --without-gnome. It's pointless nowadays.
Some preferences (Files, Fonts, Undo) work, some (Autocorrection, Copy) don't
With respect to autocorrection there seems to be quite a bit of dead code in autocorrect.c plus some possible duplication. Nevertheless everything seems to work fine with gconf. When you say that some preferences such as "copy" don't work, is it correct that you mean that "Prefer CLIPBOARD over PRIMARY" doesn't stick? It may be simpler to figure out that problem before looking at the added problems with autocorrect (and since the latter works for gconf, fixing the former may make the latter work too.)
I can replicate this with a goffice build with --without-gconf. .gnumericrc only has a [StringLists] section.
On first glance it seems that therer is an inconsistency with default values: The "Prefer CLIPBOARD over PRIMARY" initially shows at not selected. When selecting it since go_conf_load_bool already returns 1 (the default value) it does not change any settings. Clicking on the checked box on the other hand does not even make it that far since go_conf_get_bool in bool_pref_widget_to_conf returns 0, so there seems to have been no change.
What should I do? Do I need to install gnome dev dependencies and configure with it, or Gnumeric is planned to work with my current flags after bugfix?
I consider what you are seeing a bug. I don't know at this time how invasive a fix will be so we might not be able to fix in the current stable series. We know that it works with gconf. When I have a proposed patch I will attach it to this report. But there are not promises that this will happen with in a week or two. It is more likely that I will not get to it until mid April.
Thanks, I can wait :)
Created attachment 156927 [details] [review] first patch This patch fixes the boolean (true/false) preferences under --without-gconf. Note that with this patch you still need to stop and restart gnumeric after changing the autocorrect setting for gnumeric to pick up the changed value.
Review of attachment 156927 [details] [review]: this patch needs work since with gconf the sense of the setting is reverted between simultaneous instances with open preference windows.
Created attachment 156931 [details] [review] improved patch The problem with the last patch was that the notifications of a preference change may arrive at the preference dialog before it is changed in the main configuration settings. So we do have to obtain the info directly from goffice. This patch now works with and without gconf.
Note that enabling/disabling of autocorrection does work if goffice is compiled with gconf since the autocorrect engine also establishes notification. But that is really unnecessary duplication of code. The autocorrect engine should just access the main preference configuration.
I have committed another patch that allows you to switch autocorrection on and off without restarting gnumeric. While adding exceptions works, the newly added items are not shown in the preference dialog until the dialog is reopened.
Now exception list works only after restart
Konstantin: I believe your "Now" of comment 17 refers to the situation before my last patch, that was committed directly.
I've made git pull just before writing that comment. Autocorrection can be switched without restart, exception list can be changed, but changes are applied after restart
Strange. I can add items to the exception list and they are effective immediately.
I am not sure what I think I saw earlier. I can now replicate your observation of comment #17. (This is a consequence of goffice not providing notification on changes with --without-gconf.)
I can hack up intra-process notification quite easily.
I think we should fix goffice to provide the requested notifications even --without-gconf. At least when the changes originate within our process itself that should be very easy.
IMHO, there's unneeded entity here. In your case, dialog sends properties to gconf and application reads them, but it'll be much more reasonable to send data directly and then use some storage mechanism (gconf or .rc) to save them
Created attachment 157009 [details] [review] Patch for notification Needs testing
No,it still requires restart. And list isn't updated on the fly
Konstantin, regarding your comment #24: there are several related issues here since ideally the dialog also updates when a different gnumeric process changes the preferences. That's the reason for having these notifications. The dialog has to receive notification on change and it is simpler just to have one mechanism rather than two. Morten: I'll test tonight. Both: In any case, there are some obvious (to me) changes that should be made to the preference dialog that will address the reload necessity.
Adding or deleting exceptions should not require restart anymore.
Review of attachment 157009 [details] [review]: This patch looks good to me. It does show uncover some strange behaviour but that seems to be not the fault of this patch, for example bug #613869.
It works!
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.