remotewidgetshelper and plasma-remote-helper be gone

This commit is contained in:
Sebastian Kügler 2013-02-14 15:22:30 +01:00
parent af4103bac1
commit d105b1bd3f
8 changed files with 0 additions and 209 deletions

View File

@ -1,3 +1 @@
add_subdirectory(plasmapkg)
#add_subdirectory(plasma-remote-helper)
#add_subdirectory(remotewidgetshelper)

View File

@ -1,10 +0,0 @@
set(plasma_remote_helper_SRCS
main.cpp
)
kde4_add_executable(plasma-remote-helper ${plasma_remote_helper_SRCS})
target_link_libraries(plasma-remote-helper ${KDE4_KDEUI_LIBS})
install(TARGETS plasma-remote-helper ${INSTALL_TARGETS_DEFAULT_ARGS})

View File

@ -1,2 +0,0 @@
#! /usr/bin/env bash
$XGETTEXT *.cpp -o $podir/plasma-remote-helper.pot

View File

@ -1,81 +0,0 @@
/* Copyright 2011 Kevin Ottens <ervin@kde.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2,
or (at your option) any later version.
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 <iostream>
#include <QtDBus/QDBusInterface>
#include <QtDBus/QDBusReply>
#include <KDE/KApplication>
#include <KDE/KAboutData>
#include <KDE/KCmdLineArgs>
static const char description[] = I18N_NOOP("Trigger the installation of a remote Plasma Widget");
static const char version[] = "0.1";
int addRemotePlasmoidToShell(const QString &shellName, const QString &url)
{
QString serviceName = "org.kde." + shellName;
QDBusInterface iface(serviceName, "/App");
if (!iface.isValid()) {
std::cerr << "Error: Couldn't contact "
<< shellName.toLocal8Bit().constData() << std::endl;
return 1;
} else {
QDBusReply<void> reply = iface.call("addRemotePlasmoid", url);
if (!reply.isValid()) {
std::cerr << "Error: Couldn't call addRemotePlasmoid on "
<< shellName.toLocal8Bit().constData() << std::endl;
return 1;
}
}
return 0;
}
int main(int argc, char **argv)
{
KAboutData aboutData("plasma-remote-helper", 0, ki18n("Plasma Remote Widget Helper"),
version, ki18n(description), KAboutData::License_GPL,
ki18n("(C) 2011 Kevin Ottens"));
aboutData.addAuthor( ki18n("Kevin Ottens"),
ki18n("Original author"),
"ervin@kde.org" );
KComponentData componentData(aboutData);
KCmdLineArgs::init( argc, argv, &aboutData );
KCmdLineOptions options;
options.add("+<url>", ki18n("URL to the Plasma Remote Widget."));
KCmdLineArgs::addCmdLineOptions( options );
KApplication app;
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
if (args->count()<1) {
KCmdLineArgs::usageError(i18n("Syntax Error: Not enough arguments"));
} else if (args->count()>1) {
KCmdLineArgs::usageError(i18n("Syntax Error: Too many arguments"));
}
QString url = args->arg(0);
return addRemotePlasmoidToShell("plasma-desktop", url);
}

View File

@ -1,9 +0,0 @@
########### next target ###############
kde4_add_executable(kcmremotewidgetshelper remotewidgetshelper.cpp)
target_link_libraries(kcmremotewidgetshelper ${KDE4_KDECORE_LIBS})
install(TARGETS kcmremotewidgetshelper DESTINATION ${LIBEXEC_INSTALL_DIR})
kde4_install_auth_helper_files(kcmremotewidgetshelper org.kde.kcontrol.kcmremotewidgets root)
kde4_install_auth_actions(org.kde.kcontrol.kcmremotewidgets kcm_remotewidgets.actions)

View File

@ -1,20 +0,0 @@
[org.kde.kcontrol.kcmremotewidgets.save]
Name=Save remote widgets' policies
Name[cs]=Uložit zásady vzdálených widgetů
Name[de]=Regelungen für entfernte Miniprogramme speichern
Name[nl]=Beleidsregels voor widgets op afstand opslaan
Name[pt]=Gravar as políticas dos elementos remotos
Name[pt_BR]=Salvar políticas de widgets remotos
Name[sk]=Uložiť politiky pre vzdialené widgety
Name[uk]=Зберегти правила для віддалених віджетів
Name[x-test]=xxSave remote widgets' policiesxx
Description=Prevents the system from saving remote plasma widgets' policies
Description[cs]=Zabrání systému ukládat zásady vzdálených widgetů plasmy
Description[de]=Hindert das System daran, Regelungen für entfernte Miniprogramme zu speichern.
Description[nl]=Voorkomt het opslaan door het systeem van beleidsregels voor widgets op afstand
Description[pt]=Impede o sistema de gravar as políticas dos elementos remotos do Plasma
Description[pt_BR]=Previne o sistema de salvar as políticas de widgets Plasma remotos
Description[sk]=Zabraňuje systému ukladať politiky pre vzdialené widgety
Description[uk]=Заборонити системі зберігати правила для віддалених віджетів Плазми
Description[x-test]=xxPrevents the system from saving remote plasma widgets' policiesxx
Policy=auth_admin

View File

@ -1,51 +0,0 @@
/*
Copyright (C) 2009 Dario Freddi <drf@kde.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
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 Lesser 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 "remotewidgetshelper_p.h"
#include <QFile>
#include <QTextStream>
ActionReply RemoteWidgetsHelper::save(const QVariantMap &args)
{
QString filename = args["filename"].toString();
QString source = args["source"].toString();
QFile file(filename);
if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
ActionReply reply = ActionReply::HelperErrorReply;
reply.setErrorCode(file.error());
return reply;
}
QFile sfile(source);
if (!sfile.open(QIODevice::ReadOnly)) {
ActionReply reply = ActionReply::HelperErrorReply;
reply.setErrorCode(sfile.error());
return reply;
}
QTextStream stream(&file);
stream << sfile.readAll();
return ActionReply::SuccessReply;
}
KDE4_AUTH_HELPER_MAIN("org.kde.kcontrol.kcmremotewidgets", RemoteWidgetsHelper)

View File

@ -1,34 +0,0 @@
/*
Copyright (C) 2009 Dario Freddi <drf@kde.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
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 Lesser 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 .
*/
#ifndef REMOTEWIDGETS_HELPER_H
#define REMOTEWIDGETS_HELPER_H
#include <kauth.h>
using namespace KAuth;
class RemoteWidgetsHelper : public QObject
{
Q_OBJECT
public slots:
ActionReply save(const QVariantMap &map);
};
#endif // REMOTEWIDGETS_HELPER_H