[10112] in The GTK GIMP ToolKit mailing list archive
[gtk-list] Re: text-entry retrieval
daemon@ATHENA.MIT.EDU (Dave Cole)
Sat Nov 14 19:33:05 1998
To: gtk-list@redhat.com
From: Dave Cole <dave@dccs.com.au>
Date: 15 Nov 1998 11:32:57 +1100
In-Reply-To: Tom Vogt's message of "Sat, 14 Nov 1998 15:54:54 +0100"
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com
>>>>> "Tom" == Tom Vogt <tom@lemuria.org> writes:
Tom> it seems that setting the entry does create a copy, because
Tom> changing the entry doesn't change the variable. I have
Tom> experimented with a general callback that gets the variable which
Tom> belongs to the textfield passed as the data structure, but that
Tom> won't work either. creating individual callbacks for each and
Tom> every entry is not an option.
I am not sure why you are having problems with the GtkEntry callback.
I use it in the way you describe, and I am not having any problems.
I have built a layer on top of a few of the Gtk widgets so I can
capture user entry in my persistent storage transparently. Once the
widget has been attached to the data, all updates to the data by the
user, or other code are automatically propagated to any widget
attached to the data.
static void entryChanged_CB(GtkWidget* entry, RegUiEntry* ui)
{
entryCheck(ui);
}
:
gtk_signal_connect(GTK_OBJECT(entry), "changed",
GTK_SIGNAL_FUNC(entryChanged_CB), ui);
- Dave
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS dpu s-:+ a C++$ ULS++$ P+++$>++++ L++>+++$ E+>++ W N++ !o K w++$ O !M-
!V(-) PS+ PE- Y+ PGP !t-- 5++ X R tv b+ DI+++ D G e++ h--- r+++ y++++
------END GEEK CODE BLOCK------
--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null