Change the behaviour of a button
- From: David Rosal <david rosal upf edu>
- To: gtk-app-devel-list gnome org
- Subject: Change the behaviour of a button
- Date: Fri, 23 Dec 2005 10:04:11 +0100
Hi.
In my gtk app I have a long list of files that I want to remove.
I have a button with the label "Remove" and the icon of a trash bin
beside the label. I have put both together in a GtkBox and I've packed
the GtkBox into the button with gtk_container_add(). Then I've
g_signal_connect()'ed the button to a callback that removes the list of
files.
Ok. Then I wanted to be able to stop the file removing with the same
button, so I wanted it to have the label "Stop" and the "Stop" gtk icon
inside.
I know how to change the callbacks with g_signal_block() and
g_signal_unblock(), but I don't know which is the best way to change the
label and icon inside the button. It should be such that the old
"Remove" label and icon could be reused, because I want the "Stop"
button to change into "Remove" again.
Sorry for my fuzzy english.
Thanks for any help in advance.
*david
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]