@@ -125,7 +125,8 @@ Item {
125125 menuModel.loadExtendedAttributes(menuIndex, {'min-value': 'double',
126126 'max-value': 'double',
127127 'min-icon': 'icon',
128− 'max-icon': 'icon'});
128+ 'max-icon': 'icon',
129+ 'x-canonical-sync-action': 'string'});
129130 }
130131
131132 ServerPropertySynchroniser {
@@ -143,25 +144,15 @@ Item {
143144 onSyncTriggered: menuModel.changeState(menuIndex, value)
144145 }
145146
146− // For volume resync.
147− Loader {
148− active: sliderItem.menuData ? sliderItem.menuData.action == "indicator.volume" : false
149− sourceComponent: QDBusActionGroup {
150− busType: 1
151− busName: rootModel.busName
152− objectPath: rootModel.actions["indicator"]
153− Component.onCompleted: start()
154−
155− property var syncAction: action("volume-sync")
156− property int resync: {
157− if (syncAction === null) return 0;
158− return syncAction.valid ? syncAction.state : 0
159− }
160− onResyncChanged: {
161− sliderPropertySync.reset();
162− sliderPropertySync.updateUserValue();
163− }
164− }
147+ property var syncAction: UnityMenuAction {
148+ model: menuModel
149+ index: menuIndex
150+ name: getExtendedProperty(extendedData, "xCanonicalSyncAction", "")
151+ }
152+ property int resyncState: syncAction.valid ? syncAction.state : 0
153+ onResyncStateChanged: {
154+ sliderPropertySync.reset();
155+ sliderPropertySync.updateUserValue();
165156 }
166157 }
167158 }