Re: [gtk-list] .99.4 broke GTK_TOGGLE_BUTTON(button)->active (PLEASE READ)
- From: <nuke bayside net>
- To: gtk List <gtk-list redhat com>
- Subject: Re: [gtk-list] .99.4 broke GTK_TOGGLE_BUTTON(button)->active (PLEASE READ)
- Date: Mon, 2 Mar 1998 23:49:28 -0500 (EST)
On Mon, 2 Mar 1998, Leeman Strout wrote:
>
> Looks like using GTK_TOGGLE_BUTTON(button)->active doesn't work anymore.
> Either that or theres a chance that some signals changed. Did
> toggle_buttons stop emitting "clicked" ? Then again, even when I use
> "toggled" nothing happens right.
i may be having a similar problem.. (not exactly sure)
in case nobody heard/listened to my first post about three weeks ago, the
CVS tree right after 0.99.3's release made my gtk hack segfault. here's a
snippet of what i did in my hack, and where it's happening:
in the gtk_real_button_released function of gtkbutton.c, i added the
following lines inside the if (GTK_WIDGET_STATE...
GTK_WIDGET(GTK_LABEL(GTK_BUTTON(button)->child))->allocation.x--;
GTK_WIDGET(GTK_LABEL(GTK_BUTTON(button)->child))->allocation.y--;
obviously, this was intended to shift the text by one pixel. i don't think
it's causing any access violation. here's where it gets weird. the text is
shifted x++ and y++ in gtk_real_button_enter and gtk_real_button_pressed
with no problem. weirder yet, the segfault only occurs after a "Close"
button (default button to close a window, such as "cancel" in Gimp
preferences, and the many "Closes" in testgtk) is released. in this case,
the text shifts back to its centered position, and *then* i get a core
dump.
granted, my code is a rather cheapo hack, but it's a cheapo hack that
*should work*, but isn't. note that i've been doing this to gtkbuttons
since 0.99.2, and it has only turned into a problem in the CVS tree right
after 0.99.3's release. did something happen to the signal/widget code?
please excuse my lack of knowledge on widgets..
i'd most appreciate any suggestions as to why this is causing a problem,
what i can do to fix it, or maybe even a better way to accomplish the
text-shifting thing :)
also note.. if this is the Best Way(tm) to do what i'm trying to do, we're
going to have alot of annoyed theme-writers come Gtk 1.2 (or in whatever
version theme support is functional)
_ _ __ __ _ _ _
| / |/ /_ __/ /_____ | Nuke Skyjumper |
| / / // / '_/ -_) | "Master of the Farce" |
|_ /_/|_/\_,_/_/\_\\__/ _|_ nuke@bayside.net _|
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]