[System Tray] Fix assigning global shortcuts to applets from the config interface

The model has changed and is now created in JS but the code that changes the shortcuts was never adjusted

Differential Revision: https://phabricator.kde.org/D1567
wilder-5.14
Kai Uwe Broulik 10 years ago
parent 6326af4bf9
commit 7bfd0b03c4
  1. 7
      applets/systemtray/package/contents/ui/ConfigEntries.qml

@ -227,7 +227,12 @@ QtLayouts.GridLayout {
visible: modelData.hasOwnProperty("shortcut")
onKeySequenceChanged: {
if (keySequence != modelData.shortcut) {
tableView.model[modelData.index].shortcut = keySequence
// both SNIs and plasmoids are listed in the same TableView
// but they come from two separate models, so we need to subtract
// the SNI model count to get the actual plasmoid index
var index = modelData.index - plasmoid.rootItem.statusNotifierModel.count
plasmoid.applets[index].globalShortcut = keySequence
iconsPage.configurationChanged()
}
}

Loading…
Cancel
Save