Differential D12041 Diff 43256 desktoppackage/contents/configuration/ConfigurationContainmentAppearance.qml
Changeset View
Changeset View
Standalone View
Standalone View
desktoppackage/contents/configuration/ConfigurationContainmentAppearance.qml
Show All 15 Lines | |||||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. | ||
17 | */ | 17 | */ | ||
18 | 18 | | |||
19 | import QtQuick 2.0 | 19 | import QtQuick 2.0 | ||
20 | import org.kde.plasma.configuration 2.0 | 20 | import org.kde.plasma.configuration 2.0 | ||
21 | import QtQuick.Controls 1.0 as QtControls | 21 | import QtQuick.Controls 1.0 as QtControls | ||
22 | import QtQuick.Layouts 1.1 | 22 | import QtQuick.Layouts 1.1 | ||
23 | 23 | | |||
24 | import org.kde.kconfig 1.0 // for KAuthorized | ||||
25 | import org.kde.plasma.private.shell 2.0 as ShellPrivate // for WallpaperPlugin | ||||
26 | | ||||
24 | ColumnLayout { | 27 | ColumnLayout { | ||
25 | id: root | 28 | id: root | ||
26 | 29 | | |||
27 | property int formAlignment: wallpaperComboBox.x + (units.largeSpacing/2) | 30 | property int formAlignment: wallpaperComboBox.x + (units.largeSpacing/2) | ||
28 | property string currentWallpaper: "" | 31 | property string currentWallpaper: "" | ||
29 | property string containmentPlugin: "" | 32 | property string containmentPlugin: "" | ||
30 | signal configurationChanged | 33 | signal configurationChanged | ||
31 | 34 | | |||
Show All 28 Lines | 62 | if (configDialog.currentWallpaper == data.pluginName) { | |||
60 | wallpaperComboBox.currentIndex = i | 63 | wallpaperComboBox.currentIndex = i | ||
61 | break; | 64 | break; | ||
62 | } | 65 | } | ||
63 | } | 66 | } | ||
64 | } | 67 | } | ||
65 | 68 | | |||
66 | Row { | 69 | Row { | ||
67 | spacing: units.largeSpacing / 2 | 70 | spacing: units.largeSpacing / 2 | ||
68 | anchors.right: wallpaperRow.right | | |||
69 | visible: pluginComboBox.count > 1 | 71 | visible: pluginComboBox.count > 1 | ||
ngraham: Don't leave commented-out code; remove it | |||||
70 | Item { | | |||
71 | width: units.largeSpacing | | |||
72 | height: parent.height | | |||
73 | } | | |||
74 | QtControls.Label { | 72 | QtControls.Label { | ||
73 | width: formAlignment - units.largeSpacing | ||||
75 | anchors.verticalCenter: pluginComboBox.verticalCenter | 74 | anchors.verticalCenter: pluginComboBox.verticalCenter | ||
76 | text: i18nd("plasma_shell_org.kde.plasma.desktop", "Layout:") | 75 | text: i18nd("plasma_shell_org.kde.plasma.desktop", "Layout:") | ||
76 | horizontalAlignment: Text.AlignRight | ||||
ngraham: Don't leave commented-out code; remove it | |||||
77 | } | 77 | } | ||
78 | QtControls.ComboBox { | 78 | QtControls.ComboBox { | ||
79 | id: pluginComboBox | 79 | id: pluginComboBox | ||
80 | enabled: !plasmoid.immutable | 80 | enabled: !plasmoid.immutable | ||
81 | model: configDialog.containmentPluginsConfigModel | 81 | model: configDialog.containmentPluginsConfigModel | ||
82 | width: theme.mSize(theme.defaultFont).width * 24 | 82 | width: theme.mSize(theme.defaultFont).width * 24 | ||
83 | textRole: "name" | 83 | textRole: "name" | ||
84 | onCurrentIndexChanged: { | 84 | onCurrentIndexChanged: { | ||
▲ Show 20 Lines • Show All 59 Lines • ▼ Show 20 Line(s) | 139 | QtControls.ComboBox { | |||
144 | onCurrentIndexChanged: { | 144 | onCurrentIndexChanged: { | ||
145 | var model = configDialog.wallpaperConfigModel.get(currentIndex) | 145 | var model = configDialog.wallpaperConfigModel.get(currentIndex) | ||
146 | root.currentWallpaper = model.pluginName | 146 | root.currentWallpaper = model.pluginName | ||
147 | configDialog.currentWallpaper = model.pluginName | 147 | configDialog.currentWallpaper = model.pluginName | ||
148 | main.sourceFile = model.source | 148 | main.sourceFile = model.source | ||
149 | root.configurationChanged() | 149 | root.configurationChanged() | ||
150 | } | 150 | } | ||
151 | } | 151 | } | ||
152 | QtControls.Button { | ||||
153 | iconName: "get-hot-new-stuff" | ||||
154 | text: i18nd("plasma_shell_org.kde.plasma.desktop", "Get New Wallpaper Plugins...") | ||||
155 | visible: KAuthorized.authorize("ghns") | ||||
156 | onClicked: wallpaperPlugin.getNewWallpaperPlugin(this) | ||||
157 | | ||||
158 | ShellPrivate.WallpaperPlugin { | ||||
159 | id: wallpaperPlugin | ||||
It might be a bit wordy, but to be consistent with the form used everywhere else, this should say, "Get new Wallpaper Plugins..." ngraham: It might be a bit wordy, but to be consistent with the form used everywhere else, this should… | |||||
Zren: "Get New Wallpaper" is capitalized. Are we using lowercase so the "Wallpaper Plugins" stands… | |||||
Sorry for the confusion, I was more commenting on the fact that the word "New" would be included. Following the pattern is a good idea, though I would favor lowercasing the word "new" everywhere (would be in another patch though). ngraham: Sorry for the confusion, I was more commenting on the fact that the word "New" would be… | |||||
160 | } | ||||
161 | } | ||||
152 | } | 162 | } | ||
153 | 163 | | |||
154 | Item { | 164 | Item { | ||
155 | id: emptyConfig | 165 | id: emptyConfig | ||
156 | } | 166 | } | ||
157 | 167 | | |||
158 | QtControls.StackView { | 168 | QtControls.StackView { | ||
159 | id: main | 169 | id: main | ||
Show All 39 Lines |
Don't leave commented-out code; remove it