problem w/ composite notebook tabs



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

I have a notebook, and one of the tabs has some buttons on it.

This works just fine.

However, I have the situation where I want to desensitize on of the buttons
(depending upon application state, the button should be unavailable).

So I save off a pointer to the button, and desensitize/sensitize it as
appropriate. and THIS works just as expected as well.

BUT... One of the side effects of desensitizing a button in a label, is that it
seems that the remaining buttons to the right of the desensitized button will
ALSO become desensitized when the tab is selected. (Conversely, when the button
is re-sensitized, selecting the tab will propagate the sensitivity to the
buttons on the right as well).

I should hasten to add that if I use simple images, instead of buttons, then
this problem does not persist. In other words, with simple images, desensitizing
one, does not desensitize it's sibling to the right. (I'm using buttons because
I need the callback. :)

I have modified the gtk2/examples/notebook example, and attached it for the
curious, as clarification.

I'm presently trying to understand this behavior by running this sample under
the debugger, and breakpointing inside of the gtk library, to catch it when the
library is desensitizing the button(s) to the right of the desensitized button.
I'm still working on tracing this thru the debugger.

In the meantime, I'm curious as to whether the behavior I'm seeing is to be
expected (well... I guess I didn't expect it :)

Any thoughts, comments are appreciated,

- -Greg

- --
+---------------------------------------------------------------------+

Please also check the log file at "/dev/null" for additional information.
                (from /var/log/Xorg.setup.log)

| Greg Hosler                                   ghosler redhat com    |
+---------------------------------------------------------------------+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFHGsjg404fl/0CV/QRAuyLAJ9xKnzTUWHVNXQRwvVhD8rxfOclaACdEt+C
5bLf2hQyknoHma8q2ycmQ1s=
=saQx
-----END PGP SIGNATURE-----

CC = gcc

CFLAGS = -g -Wall                       \
        -DG_DISABLE_DEPRECATED          \
        -DGDK_DISABLE_DEPRECATED        \
        -DGDK_PIXBUF_DISABLE_DEPRECATED \
        -DGTK_DISABLE_DEPRECATED

notebook: notebook.c 
        $(CC) notebook.c -o notebook $(CFLAGS) `pkg-config gtk+-2.0 --cflags --libs`

clean: 
        rm -f *.o notebook


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]