Gtk.Switch.set_state() without setting active
- From: segfault <segfault riseup net>
- To: gtk-list gnome org
- Subject: Gtk.Switch.set_state() without setting active
- Date: Thu, 20 Oct 2016 13:00:51 +0000
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]