Re: Blockingsignals for all widgets(except one or two)
- From: Owen Taylor <otaylor redhat com>
- To: Jason Tan <jason rebel rebel net au>
- Cc: gtk-app-devel-list gnome org, gtk-list gnome org
- Subject: Re: Blockingsignals for all widgets(except one or two)
- Date: 06 Nov 2000 09:05:02 -0500
Jason Tan <jason rebel rebel net au> writes:
> Um...
> You can safely ignoe my last post.
> I have worked out a way to do it.
>
> If anyone is ineterested this is what I came up with.
>
> GtkWidget *MainW=gtk_window_new(GTK_WINDOW_TOPLEVEL);
>
> ...
>
> //add many widgets to MainW
>
> ...
>
>
>
> void do_sens(GtkWidget *w,gpointer data)
> {
> gtk_widget_set_sensitive(GTK_WIDGET(w),(gboolean)data);
> }
>
>
> void sens_all(gboolean sens)
> {
> gtk_container_foreach (GTK_CONTAINER(MainW),
> do_sens,
> (gpointer *)sens);
> }
>
> It seems to do what I wanted.
>
>
> Jason
Of course, gtk_widget_set_sensitivity() already propagates
sensitivity to the child widgets...
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]