Commit 40aa0225 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Port to KNewStuff.Entry enums rather than using magic numbers

parent 6a754b17
Pipeline #154670 passed with stage
in 7 minutes and 23 seconds
......@@ -13,7 +13,7 @@ import QtQuick.Templates 2.3 as T
import QtQml 2.15
import org.kde.kirigami 2.8 as Kirigami
import org.kde.newstuff 1.81 as NewStuff
import org.kde.newstuff 1.91 as NewStuff
import org.kde.kcm 1.5 as KCM
import org.kde.kquickcontrols 2.0 as KQuickControls
import org.kde.private.kcms.colors 1.0 as Private
......@@ -494,9 +494,9 @@ KCM.GridViewKCM {
text: i18n("Get New Color Schemes…")
configFile: "colorschemes.knsrc"
onEntryEvent: function (entry, event) {
if (event == 1) { // StatusChangedEvent
if (event == NewStuff.Entry.StatusChangedEvent) {
kcm.knsEntryChanged(entry)
} else if (event == 2) { // AdoptedEvent
} else if (event == NewStuff.Entry.AdoptedEvent) {
kcm.loadSelectedColorScheme()
}
}
......
......@@ -10,7 +10,7 @@ import QtQuick.Layouts 1.1
import QtQuick.Controls 2.2 as QtControls
import QtQuick.Dialogs 1.1 as QtDialogs
import org.kde.kirigami 2.5 as Kirigami
import org.kde.newstuff 1.81 as NewStuff
import org.kde.newstuff 1.91 as NewStuff
import org.kde.kcm 1.3 as KCM
import org.kde.private.kcm_cursortheme 1.0
......@@ -140,7 +140,7 @@ KCM.GridViewKCM {
text: i18n("&Get New Cursors…")
configFile: "xcursor.knsrc"
onEntryEvent: function (entry, event) {
if (event == 1) { // StatusChangedEvent
if (event == NewStuff.Entry.StatusChangedEvent) {
kcm.ghnsEntryChanged(entry);
}
}
......
......@@ -11,7 +11,7 @@ import QtQuick.Dialogs 1.0 as QtDialogs
import QtQuick.Controls 2.3 as QtControls
import org.kde.kirigami 2.14 as Kirigami
import org.kde.kquickcontrolsaddons 2.0 as KQCAddons
import org.kde.newstuff 1.81 as NewStuff
import org.kde.newstuff 1.91 as NewStuff
import org.kde.kcm 1.3 as KCM
import org.kde.private.kcms.icons 1.0 as Private
......@@ -251,9 +251,9 @@ KCM.GridViewKCM {
text: i18n("Get New Icons…")
configFile: "icons.knsrc"
onEntryEvent: function (entry, event) {
if (event == 1) { // StatusChangedEvent
if (event == NewStuff.Entry.StatusChangedEvent) {
kcm.ghnsEntriesChanged();
} else if (event == 2) { // AdoptedEvent
} else if (event == NewStuff.Entry.AdoptedEvent) {
kcm.reloadConfig();
}
}
......
......@@ -9,7 +9,7 @@ import QtQuick.Layouts 1.1
import QtQuick.Window 2.2
import QtQuick.Controls 2.3 as QtControls
import org.kde.kirigami 2.5 as Kirigami
import org.kde.newstuff 1.81 as NewStuff
import org.kde.newstuff 1.91 as NewStuff
import org.kde.kconfig 1.0 // for KAuthorized
import org.kde.kcm 1.3 as KCM
......@@ -85,9 +85,9 @@ KCM.GridViewKCM {
configFile: "lookandfeel.knsrc"
text: i18n("Get New Global Themes…")
onEntryEvent: function (entry, event) {
if (event == 1) { // StatusChangedEvent
if (event == NewStuff.Entry.StatusChangedEvent) {
kcm.knsEntryChanged(entry);
} else if (event == 2) { // AdoptedEvent
} else if (event == NewStuff.Entry.AdoptedEvent) {
kcm.reloadConfig();
}
}
......
......@@ -10,7 +10,7 @@ import QtQuick.Dialogs 1.0 as QtDialogs
import QtQuick.Controls 2.10 as QtControls
import org.kde.kirigami 2.10 as Kirigami
import org.kde.private.kcms.style 1.0 as Private
import org.kde.newstuff 1.81 as NewStuff
import org.kde.newstuff 1.91 as NewStuff
import org.kde.kcm 1.2 as KCM
Kirigami.Page {
......@@ -100,7 +100,7 @@ Kirigami.Page {
text: i18n("Get New GNOME/GTK Application Styles…")
configFile: "gtk_themes.knsrc"
onEntryEvent: function (entry, event) {
if (event == 1) { // StatusChangedEvent
if (event == NewStuff.Entry.StatusChangedEvent) {
kcm.load();
}
}
......
......@@ -14,7 +14,7 @@ import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.wallpapers.image 2.0 as Wallpaper
import org.kde.kquickcontrols 2.0 as KQuickControls
import org.kde.kquickcontrolsaddons 2.0
import org.kde.newstuff 1.62 as NewStuff
import org.kde.newstuff 1.91 as NewStuff
import org.kde.kcm 1.5 as KCM
import org.kde.kirigami 2.12 as Kirigami
......@@ -389,7 +389,7 @@ ColumnLayout {
text: i18nd("plasma_wallpaper_org.kde.image", "Get New Wallpapers…")
viewMode: NewStuff.Page.ViewMode.Preview
onEntryEvent: function(entry, event) {
if (event == 1) { // StatusChangedEvent
if (event == NewStuff.Entry.StatusChangedEvent) {
imageWallpaper.newStuffFinished()
}
}
......@@ -488,7 +488,7 @@ ColumnLayout {
text: i18nd("plasma_wallpaper_org.kde.image", "Get New Wallpapers…")
viewMode: NewStuff.Page.ViewMode.Preview
onEntryEvent: function(entry, event) {
if (event == 1) { // StatusChangedEvent
if (event == NewStuff.Entry.StatusChangedEvent) {
imageWallpaper.newStuffFinished()
}
}
......
Supports Markdown
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