Commit bf7a430d authored by Björn Feber's avatar Björn Feber

[desktoppackage] Port to QQC2 and fix "Get New Widgets..." button text

Summary:
* Port to QQC2
* Fix "Get New Widgets..." button text

Test Plan: Try pressing Esc in the widget explorer dialog or alternatives dialog or in the panel edit mode. Also look at the "Get New Widgets..." button in the widget explorer dialog.

Reviewers: #plasma, #vdg, ngraham

Reviewed By: #vdg, ngraham

Subscribers: ngraham, plasma-devel, #vdg, #plasma

Tags: #plasma

Maniphest Tasks: T10586

Differential Revision: https://phabricator.kde.org/D20904
parent 34e5a40f
......@@ -17,7 +17,7 @@
*/
import QtQuick 2.0
import QtQuick.Controls 1.1 as QQC
import QtQuick.Controls 2.5 as QQC2
import QtQuick.Layouts 1.0
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.core 2.0 as PlasmaCore
......@@ -36,7 +36,7 @@ Item {
readonly property string addSpacerButtonText: i18nd("plasma_shell_org.kde.plasma.desktop", "Add Spacer")
readonly property string settingsButtonText: i18nd("plasma_shell_org.kde.plasma.desktop", "More Settings...")
QQC.Action {
QQC2.Action {
shortcut: "Escape"
onTriggered: {
// avoid leaving the panel in an inconsistent state when escaping while dragging it
......
......@@ -17,7 +17,7 @@
*/
import QtQuick 2.0
import QtQuick.Controls 1.0 as QtControls
import QtQuick.Controls 2.5 as QQC2
import QtQuick.Layouts 1.1
import QtQuick.Window 2.1
import org.kde.plasma.core 2.0 as PlasmaCore
......@@ -51,24 +51,24 @@ PlasmaCore.Dialog {
// we don't want a binding here, just set it to the current plugin once
Component.onCompleted: currentPlugin = alternativesHelper.currentPlugin
QtControls.Action {
QQC2.Action {
shortcut: "Escape"
onTriggered: dialog.close()
}
QtControls.Action {
QQC2.Action {
shortcut: "Return"
onTriggered: switchButton.clicked(null)
}
QtControls.Action {
QQC2.Action {
shortcut: "Enter"
onTriggered: switchButton.clicked(null)
}
QtControls.Action {
QQC2.Action {
shortcut: "Up"
onTriggered: mainList.decrementCurrentIndex()
}
QtControls.Action {
QQC2.Action {
shortcut: "Down"
onTriggered: mainList.incrementCurrentIndex()
}
......
......@@ -18,7 +18,7 @@
*/
import QtQuick 2.7
import QtQuick.Controls 1.1
import QtQuick.Controls 2.5 as QQC2
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.core 2.0 as PlasmaCore
......@@ -92,7 +92,7 @@ Item {
id: kwindowsystem
}
Action {
QQC2.Action {
shortcut: "Escape"
onTriggered: {
if (searchInput.length > 0) {
......@@ -103,21 +103,21 @@ Item {
}
}
Action {
QQC2.Action {
shortcut: "Up"
onTriggered: list.currentIndex = (list.count + list.currentIndex - 1) % list.count
}
Action {
QQC2.Action {
shortcut: "Down"
onTriggered: list.currentIndex = (list.currentIndex + 1) % list.count
}
Action {
QQC2.Action {
shortcut: "Enter"
onTriggered: addCurrentApplet()
}
Action {
QQC2.Action {
shortcut: "Return"
onTriggered: addCurrentApplet()
}
......@@ -352,7 +352,7 @@ Item {
right: parent.right
}
iconSource: "get-hot-new-stuff"
text: i18nd("plasma_shell_org.kde.plasma.desktop", "Get new widgets")
text: i18nd("plasma_shell_org.kde.plasma.desktop", "Get New Widgets...")
onClicked: {
getWidgetsDialog.model = widgetExplorer.widgetsMenuActions
getWidgetsDialog.openRelative()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment