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 679589 - Use Action Appearance not supported for GTK 2.12 but added to widgets in Glade 3.8.2
Use Action Appearance not supported for GTK 2.12 but added to widgets in Glad...
Status: RESOLVED FIXED
Product: glade
Classification: Applications
Component: general
3.8.x
Other Linux
: Normal normal
: ---
Assigned To: Glade 3 Maintainers
Glade 3 Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-07-08 16:40 UTC by Volanin
Modified: 2012-07-16 03:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Glade file targeting GTK 2.12 with a single window and button. (631 bytes, application/x-glade)
2012-07-08 16:40 UTC, Volanin
Details

Description Volanin 2012-07-08 16:40:12 UTC
Created attachment 218298 [details]
Glade file targeting GTK 2.12 with a single window and button.

I am creating a glade project targeted to GTK 2.12 (debian lenny).

Previously, I used glade 3.6.7 and had no problems with it. But since I upgraded to glade 3.8.2, it insists on adding the "Use Action Appearance" property to my widgets, even when I explicitly target the 2.12 GTK version.

This can be verified by creating a window with a single button and then clicking the Execute button in the "Verify versions and deprecations" option. I've attached a simple glade file illustrating this.


Bug summary:


- What is expected to happen?

Glade projects targeting GTK 2.12 should not have the "Use Action Appearance" property added to widgets.


- What happens instead?

Glade adds the "Use Action Appearance" to some widgets such as buttons. The resulting glade file works in GTK 2.12, but when executed, the program using the glade file displays GTK_CRITICAL errors in the terminal window.


- Version used?

Latest 3.8.2
Comment 1 André Klapper 2012-07-09 11:04:26 UTC
Not sure if 3.8 is still maintained - it's a rather old version.
Comment 2 Juan Pablo Ugarte 2012-07-09 23:15:52 UTC
Yes, it is (somewhat) maintained as its the latest version for Gtk2.
This has to be a bug when it serialize properties because use-action-appearance has the corresponding since="2.16" tag in the catalog
I will take a look when I have some time, in the mean time, can I suggest some sed magic? :)
Comment 3 Volanin 2012-07-09 23:37:18 UTC
Sed magic is exactly what I am doing right now!
;)

I found something that might help: the GTK2 documentation says that the default value for this property is TRUE. But I believe that the fix for the bug #582882 changed that.

My glade files don't have this properly listed at all. And it seems that after the patch, when I load my glade projects, it forces the "Use Action Appearance" property to FALSE (since they're not defined), and since this is different from the default, when I save the file this key is included in the glade file.
Comment 4 Juan Pablo Ugarte 2012-07-12 22:09:28 UTC
There are two related issues
First is that when we add a default in glade the value has to be saved so that it works at runtime, the other one is that we save unsupported stuff, the latter probably not to loose information.

I think a good solution would be to disable use-appereance if there is no action set and skip disabled props when saving
Comment 5 Juan Pablo Ugarte 2012-07-13 23:36:08 UTC
Alright, fixed in master glade-3-8 and glade-3-12 branches
What I did was
* Took out default="false" for use-action-appearance, so now it should be on its gtk default (true)
* set use-action-appearance insensitive if no related-action is set
* only save both properties if there is a related-action set

This should cover all cases including bug #582882

So let me know if it works for you

thanks for reporting
Comment 6 Volanin 2012-07-14 00:27:55 UTC
Just downloaded the glade-3-8 git branch and compiled it.
Now a funny thing happens:


1. Create a new project, add a window and a button, edit preferences to GTK 2.12 and click in EXECUTE: No errors!

2. Save this project and close it. Load the project again.

3. Go to preferences and click EXECUTE: errors about use-action-appearance!

4. Save the project again. Glade will complain about saving a project with errors. Save anyway.

5. Edit the glade file: use-action-appearance is not there, so the file is saved correctly besides the error warning!


So the bug is fixed for new projects, but is still there for loaded projects, although saving generates a good glade file in both cases.
Comment 7 Volanin 2012-07-14 01:26:08 UTC
Traced this behaviour to the function "activatable_parse_finished"
in the file "plugins/gtk+/glade-gtk.c".

Is was introduced by commit 931d990a5735450c83512b9c97e32720c69c1be2.
Probably to fix bug #582882, as the date and developer matches.

Removing this function fixes the wrong behaviour described above.
Comment 8 Juan Pablo Ugarte 2012-07-14 02:08:34 UTC
Hmm yeah I think it is safe to remove that function as that was probably there from the old bug #582882 fix
Comment 9 Volanin 2012-07-14 02:53:53 UTC
Tell me when you commit that, so I can test again!
;)
Comment 10 Juan Pablo Ugarte 2012-07-15 23:39:02 UTC
done
Comment 11 Volanin 2012-07-16 03:40:44 UTC
Perfect now.
Thank you!