removed plasma config updates as they are not going to be neccessary

This commit is contained in:
Ivailo Monev 2014-11-15 02:42:11 +02:00
parent 43871e6dfa
commit 4956fb024a
11 changed files with 0 additions and 343 deletions

View file

@ -1,26 +0,0 @@
set(notifications-to-orgkdenotifications_SRCS notifications-to-orgkdenotifications.cpp)
kde4_add_executable(notifications-to-orgkdenotifications ${notifications-to-orgkdenotifications_SRCS})
target_link_libraries(notifications-to-orgkdenotifications ${KDE4_KDECORE_LIBS})
install(TARGETS notifications-to-orgkdenotifications DESTINATION ${LIB_INSTALL_DIR}/kconf_update_bin/)
install(FILES notifications-to-orgkdenotifications.upd DESTINATION ${KCONF_UPDATE_INSTALL_DIR})
set(plasma_add_shortcut_to_menu_SRCS plasma-add-shortcut-to-menu.cpp)
kde4_add_executable(plasma-add-shortcut-to-menu ${plasma_add_shortcut_to_menu_SRCS})
target_link_libraries(plasma-add-shortcut-to-menu ${KDE4_KDECORE_LIBS})
install(TARGETS plasma-add-shortcut-to-menu DESTINATION ${LIB_INSTALL_DIR}/kconf_update_bin/)
install(FILES plasma-add-shortcut-to-menu.upd DESTINATION ${KCONF_UPDATE_INSTALL_DIR})
set(plasma_to_plasma_desktop_SRCS plasma-to-plasma-desktop.cpp)
kde4_add_executable(plasma-to-plasma-desktop ${plasma_to_plasma_desktop_SRCS})
target_link_libraries(plasma-to-plasma-desktop ${KDE4_KIO_LIBS})
install(TARGETS plasma-to-plasma-desktop DESTINATION ${LIB_INSTALL_DIR}/kconf_update_bin/)
install(FILES plasmarc-to-plasmadesktoprc.upd DESTINATION ${KCONF_UPDATE_INSTALL_DIR})
install(FILES plasma-to-plasmadesktop-shortcuts.upd DESTINATION ${KCONF_UPDATE_INSTALL_DIR})
install(FILES systray-to-notifications-widget.js
addShowActivitiesManagerPlasmoid.js
set-hidden-single-vd-pager.js
DESTINATION ${DATA_INSTALL_DIR}/plasma-desktop/updates/ )

View file

@ -1,53 +0,0 @@
function findWidgetsIn(containment, type)
{
var widgetIds = containment.widgetIds
for (id in widgetIds) {
var widget = containment.widgetById(widgetIds[id])
if (widget.type == type) {
return widget;
}
}
return false;
}
this.findWidgets = function(type)
{
for (i in panelIds) {
if (findWidgetsIn(panelById(panelIds[i]), type)) {
return true;
}
}
for (i in activityIds) {
if (findWidgetsIn(activityById(activityIds[i]), type)) {
return true;
}
}
return false;
}
if (!findWidgets('org.kde.showActivityManager')) {
var panels = panels()
var found = false
for (i in panels) {
found = findWidgetsIn(panels[i], 'launcher')
// Also check for the old style simplelauncher
if (!found) {
found = findWidgetsIn(panels[i], 'simplelauncher')
}
if (found) {
var showWidget = panels[i].addWidget("org.kde.showActivityManager")
showWidget.index = found.index + 1;
break;
}
}
if (!found && panels.length > 0) {
var showWidget = panels[i].addWidget("org.kde.showActivityManager")
showWidget.index = 0;
}
}

View file

@ -1,63 +0,0 @@
/*
* Copyright 2006 Aaron Seigo <aseigo@kde.org>
* Copyright 2012 Marco Martin <mart@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License version 2
* published by the Free Software Foundation
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <KComponentData>
#include <KConfig>
#include <KConfigGroup>
#include <KStandardDirs>
#include <KDebug>
int main()
{
KComponentData cd("notifications-to-orgkdenotifications-update");
QString file = KStandardDirs::locateLocal("config", "plasma-desktop-appletsrc");
if (file.isEmpty()) {
return 0;
}
KConfig config(file);
KConfigGroup containments(&config, "Containments");
foreach (const QString &group, containments.groupList()) {
KConfigGroup applets(&containments, group);
applets = KConfigGroup(&applets, "Applets");
foreach (const QString &appletGroup, applets.groupList()) {
KConfigGroup applet(&applets, appletGroup);
QString plugin = applet.readEntry("plugin", QString());
if (plugin == "notifications") {
applet.writeEntry("plugin", "org.kde.notifications");
} else if (plugin == "systemtray") {
KConfigGroup subApplets(&applet, "Configuration");
subApplets = KConfigGroup(&subApplets, "Applets");
foreach (const QString &subAppletGroup, subApplets.groupList()) {
KConfigGroup subApplet(&subApplets, subAppletGroup);
QString subPlugin = subApplet.readEntry("plugin", QString());
if (subPlugin == "notifications") {
subApplet.writeEntry("plugin", "org.kde.notifications");
}
}
}
}
}
return 0;
}

View file

@ -1,2 +0,0 @@
Id=4.10QmlNotifications
Script=notifications-to-orgkdenotifications

View file

@ -1,55 +0,0 @@
/*
* Copyright 2006 Aaron Seigo <aseigo@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License version 2
* published by the Free Software Foundation
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <KComponentData>
#include <KConfig>
#include <KConfigGroup>
#include <KStandardDirs>
int main()
{
KComponentData cd("plasma-add-shortcut-to-menu-update");
QString file = KStandardDirs::locateLocal("config", "plasma-appletsrc");
if (file.isEmpty()) {
return 0;
}
KConfig config(file);
KConfigGroup containments(&config, "Containments");
foreach (const QString &group, containments.groupList()) {
KConfigGroup applets(&containments, group);
applets = KConfigGroup(&applets, "Applets");
foreach (const QString &appletGroup, applets.groupList()) {
KConfigGroup applet(&applets, appletGroup);
QString plugin = applet.readEntry("plugin", QString());
if (plugin == "launcher" || plugin == "simplelauncher") {
KConfigGroup shortcuts(&applet, "Shortcuts");
if (!shortcuts.hasKey("global")) {
shortcuts.writeEntry("global", "Alt+F1");
}
return 0;
}
}
}
return 0;
}

View file

@ -1,2 +0,0 @@
Id=4.1LauncherShortcut
Script=plasma-add-shortcut-to-menu-update

View file

@ -1,90 +0,0 @@
/*
* Copyright 2006 Aaron Seigo <aseigo@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License version 2
* published by the Free Software Foundation
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <QApplication>
#include <QFile>
#include <KComponentData>
#include <KConfig>
#include <KConfigGroup>
#include <KDebug>
#include <KStandardDirs>
#include <KIO/Job>
void migrateAppletsrc()
{
QString oldRc = KStandardDirs::locateLocal("config", "plasma-appletsrc");
if (oldRc.isEmpty() || !QFile::exists(oldRc)) {
//kDebug() << oldRc << "doesn't exist!";
return;
}
QString newRc = KStandardDirs::locateLocal("config", "plasma-desktop-appletsrc");
if (QFile::exists(newRc)) {
//kDebug() << newRc << "exists!";
return;
}
//kDebug() << "move" << oldRc << "to" << newRc;
KIO::FileCopyJob *job = KIO::file_move(oldRc, newRc);
job->exec();
}
void migratePlasmarc()
{
QString oldRc = KStandardDirs::locateLocal("config", "plasmarc");
if (oldRc.isEmpty() || !QFile::exists(oldRc)) {
//kDebug() << oldRc << "doesn't exist!";
return;
}
QString newRc = KStandardDirs::locateLocal("config", "plasma-desktoprc");
if (QFile::exists(newRc)) {
//kDebug() << newRc << "exists!";
return;
}
KIO::FileCopyJob *job = KIO::file_copy(oldRc, newRc);
job->exec();
//kDebug() << "opening up" << oldRc << "for" << newRc;
KConfig newConfig("plasma-desktoprc", KConfig::NoGlobals);
foreach (const QString &group, newConfig.groupList()) {
//kDebug() << group;
if (group.startsWith("Theme") || group == "CachePolicies") {
KConfigGroup newGroup(&newConfig, group);
newGroup.deleteGroup();
}
}
}
int main(int argc, char *argv[])
{
KComponentData cd("plasma-to-plasma-desktop");
QApplication app(argc, argv);
migratePlasmarc();
migrateAppletsrc();
return 0;
}

View file

@ -1,4 +0,0 @@
Id=4.3plasma-desktop-shortcuts
File=kglobalshortcutsrc
Group=plasma,plasma-desktop
AllKeys

View file

@ -1,3 +0,0 @@
Id=4.3plasma-desktop
Script=plasma-to-plasma-desktop

View file

@ -1,10 +0,0 @@
for (var i in panelIds) {
var panel = panelById(panelIds[i]);
for (var j in panel.widgetIds) {
var widget = panel.widgetById(panel.widgetIds[j]);
if (widget.type == "pager") {
widget.writeConfig('hideWhenSingleDesktop', 'true');
widget.reloadConfig();
}
}
}

View file

@ -1,35 +0,0 @@
var biggestId = 0;
var tmpBiggestId = 0;
for (var i in activityIds) {
var activity = activityById(activityIds[i]);
if (activity.widgetIds.length > 0) {
tmpBiggestId = Math.max.apply(null, activity.widgetIds);
if (tmpBiggestId > biggestId) {
biggestId = tmpBiggestId;
}
}
}
for (var i in panelIds) {
var panel = panelById(panelIds[i]);
if (panel.widgetIds.length > 0) {
tmpBiggestId = Math.max.apply(null, panel.widgetIds);
if (tmpBiggestId > biggestId) {
biggestId = tmpBiggestId;
}
}
}
for (var i in panelIds) {
var panel = panelById(panelIds[i]);
for (var j in panel.widgetIds) {
var widget = panel.widgetById(panel.widgetIds[j]);
if (widget.type == "systemtray") {
widget.currentConfigGroup = new Array('Applets', biggestId+1);
widget.writeConfig('plugin', 'notifications');
widget.reloadConfig();
}
}
}