Re: blocking signal emission
- From: Tomek Grzejszczyk <tgrzejsz elka pw edu pl>
- To: Tomek Grzejszczyk <tgrzejsz elka pw edu pl>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: blocking signal emission
- Date: Sun, 10 Oct 2004 13:41:24 +0200
Tomek Grzejszczyk wrote:
> Hi,
> I'am having trouble blocking signal emission. In the following code I
try to block "value-changed" signal emission during a call to
gtk_range_set_range();
>
...
>
> g_signal_connect ((gpointer) hscale_height, "value_changed",
> G_CALLBACK (on_hscale_height_value_changed),
> NULL);
>
Ok, now I know that when I connect signal with:
gint id = g_signal_connect ((gpointer) hscale_height, "value_changed",
G_CALLBACK (on_hscale_height_value_changed),
NULL);
and later use this id in a call to g_signal_handler_block(), the signal
is getting blocked. This is what I want. Another question is how to do
it in a nice way. Because a signal connection happens in a file
autogenerated by glade with a clear header "DON'T EDIT". So I don't want
to edit it. There must be a way to find the handler's id later. I just
don't know why a call to:
guint id1 = g_signal_lookup("value-changed",
G_OBJECT_TYPE(tmpscale));
dosn't return a proper id? Hmm, maybe this is just a different id and I
need to call further functions to ask for a handler? But which functions?
Thanks for help,
Tomek
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]