Gtk.Switch.set_state() without setting active

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm using a Gtk.Switch to start/stop a service. I want to use the
"state" property to indicate whether the service is actually running,
and the "active" property to indicate whether the user wants the service
to be running. I got the "delayed state change" described here [1]
working, i.e. when the user turns the switch from off to on, the "state"
is not set until the service is actually running. But then if I use
set_state(False), e.g. because the service ran into an error and exited,
the "active" property is set to False too, which is not what I want. Is
there any way to set "state" without setting "active"?

I hope it's clear what I want to achieve. If not, I can prepare some
screenshots to explain it.

[1]
https://developer.gnome.org/gtk3/stable/GtkSwitch.html#GtkSwitch-state-set

Cheers
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list



[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux