From 11330f86785426fb0d85b75d42f9c41fb40dc0b9 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 28 Mar 2016 08:43:36 -0500 Subject: [PATCH] add/include new patches --- Handle-non-existing-kickoffrc-correctly.patch | 76 +++++++++++++++++++ Set-config-group.patch | 65 ++++++++++++++++ 2 files changed, 141 insertions(+) create mode 100644 Handle-non-existing-kickoffrc-correctly.patch create mode 100644 Set-config-group.patch diff --git a/Handle-non-existing-kickoffrc-correctly.patch b/Handle-non-existing-kickoffrc-correctly.patch new file mode 100644 index 0000000..1814500 --- /dev/null +++ b/Handle-non-existing-kickoffrc-correctly.patch @@ -0,0 +1,76 @@ +From fc9a550fbd0cb51f5342972948c38129de1bac35 Mon Sep 17 00:00:00 2001 +From: Eike Hein +Date: Sun, 27 Mar 2016 17:13:46 +0900 +Subject: [PATCH 44/46] Handle non-existing kickoffrc correctly. + +BUG:357029 +--- + .../contents/updates/obsolete_kickoffrc.js | 24 ++++++++++++++-------- + 1 file changed, 16 insertions(+), 8 deletions(-) + +diff --git a/desktoppackage/contents/updates/obsolete_kickoffrc.js b/desktoppackage/contents/updates/obsolete_kickoffrc.js +index a3e6e9f..b95dd46 100644 +--- a/desktoppackage/contents/updates/obsolete_kickoffrc.js ++++ b/desktoppackage/contents/updates/obsolete_kickoffrc.js +@@ -1,18 +1,26 @@ + var kickoffConfig = ConfigFile("kickoffrc"); + + kickoffConfig.group = "Favorites"; +-var favorites = kickoffConfig.readEntry("FavoriteURLs").split(','); ++var favorites = kickoffConfig.readEntry("FavoriteURLs"); ++var haveFavorites = (favorites.length > 0); ++ ++if (haveFavorites) { ++ favorites = favorites.split(','); ++} + + kickoffConfig.group = "SystemApplications"; +-var systemApplications = kickoffConfig.readEntry("DesktopFiles").split(','); ++var systemApplications = kickoffConfig.readEntry("DesktopFiles"); ++var haveSystemApplications = (systemApplications.length > 0); ++ ++if (haveSystemApplications) { ++ systemApplications = systemApplications.split(','); + +-if (systemApplications.length) { + // This used to be hardcoded in Kickoff C++ code; it's now the KConfigXT + // default but needs to be added in when migrating from the rc file. + systemApplications.unshift("systemsettings.desktop"); + } + +-if (favorites.length || systemApplications.length) { ++if (haveFavorites || haveSystemApplications) { + for (var i in panels()) { + var panel = panels()[i]; + +@@ -22,11 +30,11 @@ if (favorites.length || systemApplications.length) { + if (widget.type == "org.kde.plasma.kickoff") { + widget.currentConfigGroup = ["General"]; + +- if (favorites.length) { ++ if (haveFavorites) { + widget.writeConfig("favorites", favorites); + } + +- if (systemApplications.length) { ++ if (haveSystemApplications) { + widget.writeConfig("systemApplications", systemApplications); + } + } +@@ -42,11 +50,11 @@ if (favorites.length || systemApplications.length) { + if (widget.type == "org.kde.plasma.kickoff") { + widget.currentConfigGroup = ["General"]; + +- if (favorites.length) { ++ if (haveFavorites) { + widget.writeConfig("favorites", favorites); + } + +- if (systemApplications.length) { ++ if (haveSystemApplications) { + widget.writeConfig("systemApplications", systemApplications); + } + } +-- +1.9.3 + diff --git a/Set-config-group.patch b/Set-config-group.patch new file mode 100644 index 0000000..b243acf --- /dev/null +++ b/Set-config-group.patch @@ -0,0 +1,65 @@ +From bc28403a08c81d2c07c4582622d9c138ede24704 Mon Sep 17 00:00:00 2001 +From: Eike Hein +Date: Sun, 27 Mar 2016 17:03:57 +0900 +Subject: [PATCH 1/2] Set config group. + +BUG:357029 +--- + desktoppackage/contents/updates/obsolete_kickoffrc.js | 16 ++++++++++------ + 1 file changed, 10 insertions(+), 6 deletions(-) + +diff --git a/desktoppackage/contents/updates/obsolete_kickoffrc.js b/desktoppackage/contents/updates/obsolete_kickoffrc.js +index d92cae9..a3e6e9f 100644 +--- a/desktoppackage/contents/updates/obsolete_kickoffrc.js ++++ b/desktoppackage/contents/updates/obsolete_kickoffrc.js +@@ -6,13 +6,13 @@ var favorites = kickoffConfig.readEntry("FavoriteURLs").split(','); + kickoffConfig.group = "SystemApplications"; + var systemApplications = kickoffConfig.readEntry("DesktopFiles").split(','); + +-if (systemApplications) { ++if (systemApplications.length) { + // This used to be hardcoded in Kickoff C++ code; it's now the KConfigXT + // default but needs to be added in when migrating from the rc file. + systemApplications.unshift("systemsettings.desktop"); + } + +-if (favorites || systemApplications) { ++if (favorites.length || systemApplications.length) { + for (var i in panels()) { + var panel = panels()[i]; + +@@ -20,11 +20,13 @@ if (favorites || systemApplications) { + var widget = panel.widgetById(panel.widgetIds[j]); + + if (widget.type == "org.kde.plasma.kickoff") { +- if (favorites) { ++ widget.currentConfigGroup = ["General"]; ++ ++ if (favorites.length) { + widget.writeConfig("favorites", favorites); + } + +- if (systemApplications) { ++ if (systemApplications.length) { + widget.writeConfig("systemApplications", systemApplications); + } + } +@@ -38,11 +40,13 @@ if (favorites || systemApplications) { + var widget = desktop.widgetById(desktop.widgetIds[j]); + + if (widget.type == "org.kde.plasma.kickoff") { +- if (favorites) { ++ widget.currentConfigGroup = ["General"]; ++ ++ if (favorites.length) { + widget.writeConfig("favorites", favorites); + } + +- if (systemApplications) { ++ if (systemApplications.length) { + widget.writeConfig("systemApplications", systemApplications); + } + } +-- +1.9.3 +