on xenial help sign in
Use volume-sync action to resync the volume control. Fixes: #1520548
6412840Nick Dedekind
qml/Panel/Indicators/MenuItemFactory.qml+13−1
@@ -125,10 +125,12 @@ Item {
125 menuModel.loadExtendedAttributes(menuIndex, {'min-value': 'double',
125 menuModel.loadExtendedAttributes(menuIndex, {'min-value': 'double',
126 'max-value': 'double',
126 'max-value': 'double',
127 'min-icon': 'icon',
127 'min-icon': 'icon',
128− 'max-icon': 'icon'});
128+ 'max-icon': 'icon',
129+ 'x-canonical-sync-action': 'string'});
129 }
130 }
130
131
131 ServerPropertySynchroniser {
132 ServerPropertySynchroniser {
133+ id: sliderPropertySync
132 objectName: "sync"
134 objectName: "sync"
133 syncTimeout: Utils.Constants.indicatorValueTimeout
135 syncTimeout: Utils.Constants.indicatorValueTimeout
134 bufferedSyncTimeout: true
136 bufferedSyncTimeout: true
@@ -141,6 +143,16 @@ Item {
141
143
142 onSyncTriggered: menuModel.changeState(menuIndex, value)
144 onSyncTriggered: menuModel.changeState(menuIndex, value)
143 }
145 }
146+
147+ UnityMenuAction {
148+ model: menuModel
149+ index: menuIndex
150+ name: getExtendedProperty(extendedData, "xCanonicalSyncAction", "")
151+ onStateChanged: {
152+ sliderPropertySync.reset();
153+ sliderPropertySync.updateUserValue();
154+ }
155+ }
144 }
156 }
145 }
157 }
146
158