diff --git a/modules/gui/qt/playlist/qml/PlaylistOverlayMenu.qml b/modules/gui/qt/playlist/qml/PlaylistOverlayMenu.qml index 77cb4c2220e132cef19498f0695fe4545217ac5c..ea855a978f03de45693cb6b454ee52bdbe41a200 100644 --- a/modules/gui/qt/playlist/qml/PlaylistOverlayMenu.qml +++ b/modules/gui/qt/playlist/qml/PlaylistOverlayMenu.qml @@ -212,16 +212,7 @@ Widgets.OverlayMenu { } Repeater { - model: [{title: i18n.qtr("Title"), key: PlaylistControllerModel.SORT_KEY_TITLE}, - {title: i18n.qtr("Duration"), key: PlaylistControllerModel.SORT_KEY_DURATION}, - {title: i18n.qtr("Artist"), key: PlaylistControllerModel.SORT_KEY_ARTIST}, - {title: i18n.qtr("Album"), key: PlaylistControllerModel.SORT_KEY_ALBUM}, - {title: i18n.qtr("Album Artist"), key: PlaylistControllerModel.SORT_KEY_ALBUM_ARTIST}, - {title: i18n.qtr("Genre"), key: PlaylistControllerModel.SORT_KEY_GENRE}, - {title: i18n.qtr("Date"), key: PlaylistControllerModel.SORT_KEY_DATE}, - {title: i18n.qtr("Track Number"), key: PlaylistControllerModel.SORT_KEY_TRACK_NUMBER}, - {title: i18n.qtr("URL"), key: PlaylistControllerModel.SORT_KEY_URL}, - {title: i18n.qtr("Rating"), key: PlaylistControllerModel.SORT_KEY_RATING}] + model: mainPlaylistController.sortKeyTitleList delegate: Loader { asynchronous: true diff --git a/modules/gui/qt/playlist/qml/PlaylistToolbar.qml b/modules/gui/qt/playlist/qml/PlaylistToolbar.qml index 6a3c4fdf8b07016661b259b89c7dccfce17a7002..f1a1f44a2ffbe803904af764e69d04ebef5c14ff 100644 --- a/modules/gui/qt/playlist/qml/PlaylistToolbar.qml +++ b/modules/gui/qt/playlist/qml/PlaylistToolbar.qml @@ -86,23 +86,13 @@ Widgets.NavigableFocusScope { focusPolicy: Qt.NoFocus - model: [ - { text: i18n.qtr("Title"), criteria: PlaylistControllerModel.SORT_KEY_TITLE }, - { text: i18n.qtr("Duration"), criteria: PlaylistControllerModel.SORT_KEY_DURATION }, - { text: i18n.qtr("Artist"), criteria: PlaylistControllerModel.SORT_KEY_ARTIST }, - { text: i18n.qtr("Album"), criteria: PlaylistControllerModel.SORT_KEY_ALBUM }, - { text: i18n.qtr("Genre"), criteria: PlaylistControllerModel.SORT_KEY_GENRE }, - { text: i18n.qtr("Date"), criteria: PlaylistControllerModel.SORT_KEY_DATE }, - { text: i18n.qtr("Track number"), criteria: PlaylistControllerModel.SORT_KEY_TRACK_NUMBER }, - { text: i18n.qtr("URL"), criteria: PlaylistControllerModel.SORT_KEY_URL }, - { text: i18n.qtr("Rating"), criteria: PlaylistControllerModel.SORT_KEY_RATING }, - ] - textRole: "text" - criteriaRole: "criteria" + model: mainPlaylistController.sortKeyTitleList + textRole: "title" + criteriaRole: "key" listWidth: VLCStyle.widthSortBox onSortSelected: { - mainPlaylistController.sort(modelData.criteria) + mainPlaylistController.sort(modelData.key) } colors: playlistToolbar.colors