Re: signal passing
- From: Peter Bloomfield <peterbloomfield bellsouth net>
- To: gtk-app-devel-list gnome org
- Subject: Re: signal passing
- Date: Tue, 24 May 2005 11:24:17 +0000
On 05/24/2005 05:12:57 AM, srinivas wrote:
[ snip ]
if (strlen(s)>0)
Better: if (s[0] != '\0')
[ snip ]
and in "on_button_next_clicked" callback i just added the one u
given.
void
on_button_next_clicked (GtkButton *button,
gpointer user_data)
{
g_signal_emit_by_name (entry, "activate", NULL);
}
Why go through the whole process of emitting a signal? Put the
output code in a handler, and call it from both
"on_entry_activate" and "on_button_next_clicked".
BTW: is entry declared somewhere? Passing it as the user-data
when you connect to the signal is cleaner.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]