Пример #1
0
        private void OnRepeatModeChanged(object o, EventArgs <PlaybackRepeatMode> args)
        {
            if (active_action.Value != (int)args.Value)
            {
                // This happens only when changing the mode using DBus.
                // In this case we need to locate the action by its value.
                foreach (RadioAction action in this)
                {
                    if (action.Value == (int)args.Value)
                    {
                        active_action = action;
                        break;
                    }
                }
            }

            if (saved_action == null)
            {
                RepeatMode.Set(ActionNameToConfigId(active_action.Name));
            }
            OnChanged();
        }