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 685816 - Widget attributes editing broken
Widget attributes editing broken
Status: RESOLVED FIXED
Product: glade
Classification: Applications
Component: general
unspecified
Other Linux
: Normal major
: ---
Assigned To: Juan Pablo Ugarte
Glade 3 Maintainers
: 687374 688970 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-10-09 15:40 UTC by Maël Lavault
Modified: 2012-11-26 13:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot (102.98 KB, image/png)
2012-10-09 16:30 UTC, Maël Lavault
  Details
screenshot 2 (109.29 KB, image/png)
2012-10-09 16:41 UTC, Maël Lavault
  Details
screenshot3 (110.97 KB, image/png)
2012-10-09 16:42 UTC, Maël Lavault
  Details
Activatable sensitivity fix (13.09 KB, patch)
2012-10-17 22:19 UTC, Juan Pablo Ugarte
none Details | Review
UI test with lots of GtkActivatables (16.11 KB, application/x-glade)
2012-10-17 22:26 UTC, Juan Pablo Ugarte
  Details

Description Maël Lavault 2012-10-09 15:40:15 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.
Comment 1 Tristan Van Berkom 2012-10-09 16:22:35 UTC
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 ?
Comment 2 Maël Lavault 2012-10-09 16:30:58 UTC
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
Comment 3 Tristan Van Berkom 2012-10-09 16:38:39 UTC
Interesting, I guess you are referring to the disabled stock button ?

Is it configured to "Use Action Appearance" ?

And... what does the tooltip say ?
Comment 4 Maël Lavault 2012-10-09 16:39:12 UTC
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.
Comment 5 Maël Lavault 2012-10-09 16:41:33 UTC
Created attachment 226126 [details]
screenshot 2

other screen showing the problem
Comment 6 Maël Lavault 2012-10-09 16:42:13 UTC
Created attachment 226128 [details]
screenshot3

With another widget, other attributes are disabled
Comment 7 Tristan Van Berkom 2012-10-09 16:51:26 UTC
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).
Comment 8 Tristan Van Berkom 2012-10-09 16:53:42 UTC
(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).
Comment 9 Tristan Van Berkom 2012-10-09 17:03:10 UTC
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 :-/
Comment 10 Maël Lavault 2012-10-09 17:06:44 UTC
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.
Comment 11 Tristan Van Berkom 2012-10-09 17:12:19 UTC
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
Comment 12 Maël Lavault 2012-10-09 17:15:58 UTC
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.
Comment 13 Juan Pablo Ugarte 2012-10-13 16:16:50 UTC
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.
Comment 14 Juan Pablo Ugarte 2012-10-17 22:19:41 UTC
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.
Comment 15 Juan Pablo Ugarte 2012-10-17 22:26:35 UTC
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.
Comment 16 Kalev Lember 2012-10-19 13:29:30 UTC
This is also happening with the 3.12.2 release, could you backport the fix there as well?
Comment 17 Juan Pablo Ugarte 2012-11-01 20:26:21 UTC
*** Bug 687374 has been marked as a duplicate of this bug. ***
Comment 18 Juan Pablo Ugarte 2012-11-02 00:49:34 UTC
Fixed in glade-3-12, glade-3-14 and master
Comment 19 Juan Pablo Ugarte 2012-11-26 13:49:31 UTC
*** Bug 688970 has been marked as a duplicate of this bug. ***