[maemo-users] problem on gsinal

From: Dave Neary dneary at maemo.org
Date: Wed Jul 16 12:50:40 EEST 2008
Hi Zhengzhe,

Zhenghe Zhang wrote:
> As the codes show below, I add a button to my dialog, and write a
> callback function response of clicking button.
> 
> When I run my application, I find my applications do this:
> 
> 1.      call the callback function,
> 
> 2.      after step 1, execute the default handler of signal

Yes, gsignals chain up, so you can attach many callbacks to one button.
Usually this does no harm.

Digging in the documentation at
http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html, I
found this:

g_signal_override_class_closure ()

void                g_signal_chain_from_overridden      (const GValue
*instance_and_params,
                                                         GValue
*return_value);

Calls the original class closure of a signal. This function should only
be called from an overridden class closure; see
g_signal_override_class_closure().

instance_and_params : 	the argument list of the signal emission. The
first element in the array is a GValue for the instance the signal is
being emitted on. The rest are any arguments to be passed to the signal.
return_value : 	Location for the return value.

I don't know if that's what you're looking for, honestly I don't see
what the problem is with the default handler being called.

Cheers,
Dave.

-- 
maemo.org docsmaster
Email: dneary at maemo.org
Jabber: bolsh at jabber.org


More information about the maemo-users mailing list