GNOME Bugzilla – Bug 322340
can_focus property is ignored when set on GtkTreeView
Last modified: 2011-02-25 05:20:57 UTC
Distribution/Version: Ubuntu breezy badger Setting the can-focus property on a GtkTreeView does not affect the output xml. Editing the xml file manually and adding the can-focus property works correctly.
It seems to work OK for me. Can you check the XML again?
I was slightly unclear in my initial report perhaps - This is a bug against the glade application and not libglade. I just confirmed with the simplest case possible: Open glade, create a new GTK+ project, create a new window, add a GtkTreeView and change its "Can Focus" common property to 'No'. After saving this project and examining the resultant xml, the can_focus property is missing. Adding it manually works correctly with libglade. This is with glade 2.12.0.
Yes, I can see the problem now. Glade currently only saves "can-focus" if it is TRUE. Though you should be careful about turning "can-focus" off, since it may make your application unusable by people who rely on the keyboard.
The problem is that different widgets have different default settings for can_focus, so it isn't trivial to fix. We could just always write out the can_focus setting, but it isn't needed 99.9% of the time so is a bit wasteful. I'd suggest you set can_focus to FALSE in your code instead. That is easy to do.
Just wonderful. I just spent several hours on finding the problem with my code and now I see that this bug was reported and then just ignored by the developer. Good job, guys. One question, though: What use is the glade GUI if it just ignores the properties I set and I have to fix these problems in my code afterwards? Right, the answer is: None But thats not quite right. First it's no use and second it steals my time in chasing ridiculous bugs.
(In reply to comment #5) > Just wonderful. I just spent several hours on finding the problem with my code > and now I see that this bug was reported and then just ignored by the > developer. > > Good job, guys. > > One question, though: > What use is the glade GUI if it just ignores the properties I set and I have to > fix these problems in my code afterwards? > > Right, the answer is: None > > But thats not quite right. First it's no use and second it steals my time in > chasing ridiculous bugs. I'm sure patches are welcome :) As a suggestion though, could glade not look up the default value of the property and save it when it's !default rather than when it's a particular value? I've not looked at the code, so feel free to ignore me if this doesn't make sense.
Ok, so first of all, sorry for being so rude in my first post. I do appreciate the work you developers put into the project. I just was quite distressed to see that the issue was addressed some years earlier... It just does not seem right to me that if I change the value of "can_focus" (e.g. of a button) from the default "yes" to "no" it does not change the xml output...
Glade 2 isn't maintained any more. People should be using Glade 3 now. Hopefully the problem is fixed there, but you'd need to check.
glade-legacy development has been stalled and it has been unmaintained for a few years now. Maintainers don't have future development plan so i am closing the bugs as WONTFIX. Please feel free to reopen the bugs in future if anyone takes the responsibility for active development.