GNOME Bugzilla – Bug 746645
input-selector: Allow setting pads active
Last modified: 2017-03-07 08:06:44 UTC
Created attachment 300135 [details] [review] patch Makes the pad's 'active' property writeable and allows writing TRUE to it in order to set the pad active.
This I find a bit weird API-wise, because you can only activate it but not de-activate it. Do we have similar API on any other elements? If only activation is allowed an action signal would perhaps be a cleaner solution.
I suppose deactivation could set active_pad to NULL, in which case input-selector will switch to the oldest existing pad the next tiem something happens.
Created attachment 300643 [details] [review] patch 1/2 input-selector: Fold debugging and locking into _set_active_pad Also renames the function to _set_active_sinkpad for consistency with _is_active_sinkpad and _get_active_sinkpad.
Created attachment 300644 [details] [review] patch 2/2 input-selector: Allow setting pads active Makes the pad's 'active' property writable. Here's another implementation that doesn't reject FALSE and doesn't use g_object_set.
Hm, now I'm noticing that setting FALSE on already deactivated pads would still screw with the selector, so this isn't good either. I guess I'll do the signal variant.
This was a bad idea and I'm giving up on this one. :p