|
Re: How to disable temporary callbacks using Glade?: msg#00062gnome.gtk+.perl
ws wrote: [...] > > sub on_CoEn_changed{ > print "..Combo-Entry changed by user and NOT during set-Operations"; > } > > sub setSelector{ > signal_handler_block(?); > #how? > $form->{'Co'} ->set_popdown_strings(@choice); #popDownList set > $form->{'CoEn'} ->set_text($sv[2]); #e.g. > value $sv[2] visible > #bad:calls on_CoEn_changed > signal_handler_unblock(?); #how? > } Hi, You need to know the 'connection id' of the signal_connect call that is triggering the handler. The connection id is returned by the signal_connect() call so you do: $id = $widget->signal_connect('changed', ...... and later: $widget->signal_handler_block($id); $id probably needs to be a global so that it is available in the handler. Version 0.60 of Glade-Perl can generate code that saves the ids in a predictable fashion so that you can use them in signal handlers like: my $id = $form->{'__CONNECT_ID'}{'entry1'}{'after_key_press_event'} $id = $widget->signal_connect('changed', ...... ... HTH, Dermot |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Enumerating Gtk object & proprietes ?: 00062, raptor |
|---|---|
| Next by Date: | Re: Gtk::Editor ?: 00062, Dermot Musgrove |
| Previous by Thread: | How to disable temporary callbacks using Glade?i: 00062, ws |
| Next by Thread: | Gtk::Editor ?: 00062, raptor |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |