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 322340 - can_focus property is ignored when set on GtkTreeView
can_focus property is ignored when set on GtkTreeView
Status: RESOLVED WONTFIX
Product: glade-legacy
Classification: Deprecated
Component: general
2.12.x
Other Linux
: Normal normal
: ---
Assigned To: Damon Chaplin
Damon Chaplin
gnome[unmaintained]
Depends on:
Blocks:
 
 
Reported: 2005-11-24 15:39 UTC by Chris Lord
Modified: 2011-02-25 05:20 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Chris Lord 2005-11-24 15:39:02 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.
Comment 1 Damon Chaplin 2005-11-24 16:28:05 UTC
It seems to work OK for me. Can you check the XML again?
Comment 2 Chris Lord 2005-11-25 08:25:34 UTC
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.
Comment 3 Damon Chaplin 2005-11-25 13:16:22 UTC
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.
Comment 4 Damon Chaplin 2006-07-14 08:55:09 UTC
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.
Comment 5 kaonashi 2010-03-17 11:13:30 UTC
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.
Comment 6 Chris Lord 2010-03-17 19:44:51 UTC
(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.
Comment 7 kaonashi 2010-03-18 00:35:45 UTC
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...
Comment 8 Damon Chaplin 2010-03-18 09:50:07 UTC
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.
Comment 9 Akhil Laddha 2011-02-25 05:20:57 UTC
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.