GNOME Bugzilla – Bug 685816
Widget attributes editing broken
Last modified: 2012-11-26 13:49:31 UTC
Hi, With glade 3.12.2 and glade 3.14, on fedora 17, i'm unable to edit attributes for some widgets. Screenshot attached. For example i cannot add a custom image to my button, or change the stock item.
Any screenshot with that ? Wild guess, are they showing up insensitive ? Do they have tooltips when you hover over them ? Do they say something about how your project is targeting GTK+2.24 or some earlier version, but the properties are only introduced in a later version ?
Created attachment 226121 [details] Screenshot Oups forgot the screenshot :p the project target gtk 3.0 (this window is from totem opensubtitle plugin from last git revision) When I try to click on it, nothings happens. Yes there are tooltips on them. I'm not the only one encountering this issue : http://stackoverflow.com/questions/12661904/cannot-edit-button-labels-in-glade-3-14-0
Interesting, I guess you are referring to the disabled stock button ? Is it configured to "Use Action Appearance" ? And... what does the tooltip say ?
In fact for tooltips it depends. On my screenshot the stock button label has it (but it looks sensitive) but the last radiobutton has it not.
Created attachment 226126 [details] screenshot 2 other screen showing the problem
Created attachment 226128 [details] screenshot3 With another widget, other attributes are disabled
Man, properties can be insensitive for various reasons, if you tell me what the tooltips say, then maybe I can help. If they say something that doesnt make sense, then maybe it's a bug. What pray tell, do the tooltips say ? For screenshot 2, I'll bet the tooltip says something about the use-action-appearance property not being editable since there is no action set... that would make sense. In other scenarios, you cannot set the stock id for a button, because use-action-appearance is *not* set. It could be that we messed up somewhere with those properties leaving you in a situation where the stock-id is insensitive because use-action-appearance is True but not settable (shouldnt be the case but possible)... but I'm really just guessing now... cause you have to tell me what the tooltips say (we did intentionally put tooltips there, to inform users *why* the properties are not settable).
(In reply to comment #7) [...] > In other scenarios, you cannot set the stock id for a button, because > use-action-appearance is *not* set. Correction, in the case that a button has an action and is configured to pull it's appearance properties from the related action, it is invalid to set the stock/label/image or any appearance properties (i.e. a GtkActivatable widget either configures it's appearance by the action, or directly, but not both).
Looks like this commit might have broken it, because it makes the default for use-action-appearance TRUE (instead of the original forced FALSE). commit 772fb3bb54d79e04d37085218741fc2ac3ecbdb8 Author: Juan Pablo Ugarte <juanpablougarte@gmail.com> Date: Fri Jul 13 20:08:24 2012 -0300 However my build of Glade 2.12.2 doesnt exhibit this problem :-/
Ok I understand, you are right properties are set to use an action, anyway the use action appearance pop not tooltip and is insensitive so I can't change it.
a.) does it happen consistently when you start from scratch and create a new project ? Then what version of GTK+ exactly is running ? b.) if not, does it happen consistently for a specific project you are editing ? if so, please attach Glade file to reproduce
Ok a workaround is to create and set a new action to make the button sensitive again. But this doesn't happend before and is not the desired behaviour (what are the reason for forcing the use action appearance ?), so i guess the commit you pointed is responsible. It happens in every new project you create. To test just add a window, a GtkBox and a button.
Hello, seems like I introduced it trying to fix something else. I pushed a quick fix into master that should not break anything since I only modified the custom GtkButton editor to set sensitivity properly. Please let me know if it works for you and/or find any corner cases.
Created attachment 226701 [details] [review] Activatable sensitivity fix So this patch applies on top of 2.14.1 release and should fix every GtkActivatable widget sensitivity problem. I think it simplifies things a bit. the idea is that adaptors and custom editors should never use the value of use-action-appearance directly instead they should use glade_gtk_activatable_get_use_action_appearance () which only returns the use-action-appearance value if there is a related-action set otherwise it just return FALSE.
Created attachment 226702 [details] UI test with lots of GtkActivatables Here is a test UI file with every supported activatable. BTW i forgot to mention that in this patch there is a fix in gladeui/glade-editor-property.c that changes the sensitivity of the property editor label, not just he input part. This is mostly cosmetic and should be applied separately.
This is also happening with the 3.12.2 release, could you backport the fix there as well?
*** Bug 687374 has been marked as a duplicate of this bug. ***
Fixed in glade-3-12, glade-3-14 and master
*** Bug 688970 has been marked as a duplicate of this bug. ***