Re: How to stop signal in the folowing case?
- From: Olexiy Avramchenko <olexiy irtech cn ua>
- To: "Peter T. Mayer" <peter_t_mayer yahoo de>
- Cc: gtk-list gnome org
- Subject: Re: How to stop signal in the folowing case?
- Date: Fri, 07 May 2004 19:29:31 +0300
Peter T. Mayer wrote:
Hello,
Lets assume we have two spinbuttons (spinbutton_A and spinbutton_B),
if I change one of the spinbuttons the callback functions:
+ void on_spinbutton_B_changed (GtkEditable *editable, gpointer user_data);
void on_spinbutton_A_changed (GtkEditable *editable, gpointer user_data) {
+ g_signal_handlers_block_matched(editable, G_SIGNAL_MATCH_FUNC,
0,0, NULL, on_spinbutton_B_changed, NULL);
gtk_spin_button_set_value( spinbutton_B, MY_VALUE );
+ g_signal_handlers_unblock_matched(editable, G_SIGNAL_MATCH_FUNC,
0,0, NULL, on_spinbutton_B_changed, NULL);
}
void on_spinbutton_B_changed (GtkEditable *editable, gpointer
user_data) {
+ g_signal_handlers_block_matched(editable, G_SIGNAL_MATCH_FUNC,
0,0, NULL, on_spinbutton_A_changed, NULL);
gtk_spin_button_set_value( spinbutton_A, MY_VALUE );
+ g_signal_handlers_unblock_matched(editable, G_SIGNAL_MATCH_FUNC,
0,0, NULL, on_spinbutton_A_changed, NULL);
}
Hi,
How *exactly* did you try to block the signal emission ?
Olexiy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]