@@ -125,7 +125,8 @@ 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'});
131 ServerPropertySynchroniser {
132 ServerPropertySynchroniser {
@@ -143,25 +144,15 @@ Item {
143 onSyncTriggered: menuModel.changeState(menuIndex, value)
144 onSyncTriggered: menuModel.changeState(menuIndex, value)
146− // For volume resync.
148− active: sliderItem.menuData ? sliderItem.menuData.action == "indicator.volume" : false
149− sourceComponent: QDBusActionGroup {
151− busName: rootModel.busName
152− objectPath: rootModel.actions["indicator"]
153− Component.onCompleted: start()
155− property var syncAction: action("volume-sync")
147+ property var syncAction: UnityMenuAction {
156− property int resync: {
148+ model: menuModel
157− if (syncAction === null) return 0;
149+ index: menuIndex
150+ name: getExtendedProperty(extendedData, "xCanonicalSyncAction", "")
158− return syncAction.valid ? syncAction.state : 0
152+ property int resyncState: syncAction.valid ? syncAction.state : 0
159− }
153+ onResyncStateChanged: {
161− sliderPropertySync.reset();
154+ sliderPropertySync.reset();
162− sliderPropertySync.updateUserValue();
155+ sliderPropertySync.updateUserValue();