a binary slipped into kdelibs/plasma; move it to kdebase/runtime/
svn path=/trunk/KDE/kdebase/runtime/; revision=1134613
This commit is contained in:
parent
12727c90c9
commit
ebbf44692b
102
remotewidgetshelper/kcm_remotewidgets.actions
Normal file
102
remotewidgetshelper/kcm_remotewidgets.actions
Normal file
@ -0,0 +1,102 @@
|
||||
[org.kde.kcontrol.kcmremotewidgets.save]
|
||||
Name=Save remote widgets policies
|
||||
Name[ar]=احفظ سياسات الودجات البعيدة
|
||||
Name[bg]=Запазване политиките на отдалечени джаджи
|
||||
Name[ca]=Desa polítiques d'estris remots
|
||||
Name[ca@valencia]=Alça polítiques d'estris remots
|
||||
Name[da]=Gem politikker for eksterne widgets
|
||||
Name[de]=Regelungen für entfernte Miniprogramme speichern
|
||||
Name[el]=Αποθήκευση των πολιτικών απομακρυσμένων μικροεφαρμογών
|
||||
Name[en_GB]=Save remote widgets policies
|
||||
Name[es]=Guardar las políticas de elementos gráficos remotos
|
||||
Name[et]=Välisvidinate reeglite salvestamine
|
||||
Name[eu]=Gorde urruneko widget politikak
|
||||
Name[fi]=Tallena etäkäyttöliittymäelementtien toimintatavat
|
||||
Name[fr]=Enregistrer la politique des éléments distants
|
||||
Name[ga]=Sábháil polasaithe um giuirléidí cianda
|
||||
Name[gl]=Gardar as políticas dos widgets remotos
|
||||
Name[hr]=Snimi pravila za udaljene widgete
|
||||
Name[hu]=A távoli Plasma-elemek használati módjának mentése
|
||||
Name[ia]=Il Salva le politicas de le widgets remote
|
||||
Name[id]=Simpan kebijakan widget jarak jauh
|
||||
Name[is]=Vistar meðhöndlunarstefnu fyrir fjarlægar græjur
|
||||
Name[it]=Salva regole elementi remoti
|
||||
Name[kk]=Қашық виджет ережелерін сақтау
|
||||
Name[km]=រក្សាទុកគោលនយោបាយធាតុក្រាហ្វិកពីចម្ងាយ
|
||||
Name[ko]=원격 위젯 정책 저장
|
||||
Name[lt]=Įrašyti nutolusių valdiklių politiką
|
||||
Name[lv]=Saglabāt attālināto sīkrīku politikas
|
||||
Name[nb]=Lagre praksis for nettverkselementer
|
||||
Name[nds]=Regeln för feern Lüttprogrammen sekern
|
||||
Name[nl]=Beleidsregels voor widgets op afstand opslaan
|
||||
Name[nn]=Lagra reglar for fjernelement
|
||||
Name[pa]=ਰਿਮੋਟ ਵਿਦਜੈੱਟ ਪਾਲਸੀਆਂ ਸੰਭਾਲੋ
|
||||
Name[pl]=Zapisz zdalne polityki elementów interfejsu
|
||||
Name[pt]=Gravar as políticas dos elementos remotos
|
||||
Name[pt_BR]=Salvar políticas de widgets remotos
|
||||
Name[ro]=Salvează politici de controale distante
|
||||
Name[sk]=Uložiť politiky pre vzdialené widgety
|
||||
Name[sl]=Shrani pravila za oddaljene gradnike
|
||||
Name[sr]=Сачувај смернице удаљених виџета
|
||||
Name[sr@ijekavian]=Сачувај смернице удаљених виџета
|
||||
Name[sr@ijekavianlatin]=Sačuvaj smernice udaljenih vidžeta
|
||||
Name[sr@latin]=Sačuvaj smernice udaljenih vidžeta
|
||||
Name[sv]=Spara policy för grafiska fjärrkomponenter
|
||||
Name[tg]=Сиёсати виҷетҳои дурдастро нигоҳ доред
|
||||
Name[th]=บันทึกนโยบายต่าง ๆ ของวิดเจ็ตทางไกล
|
||||
Name[tr]=Uzak gereçler politikalarını kaydet
|
||||
Name[uk]=Зберегти правила для віддалених віджетів
|
||||
Name[x-test]=xxSave remote widgets policiesxx
|
||||
Name[zh_CN]=保存远程部件策略
|
||||
Name[zh_TW]=儲存遠端元件政策
|
||||
Description=Prevents the system from saving plasma remote widgets policies
|
||||
Description[ar]=تمنع النظام من حفظ سياسات الودجات بلازما البعيدة
|
||||
Description[bg]=Посигурява системата да не запазва политиките на отдалечените джаджи па plasma
|
||||
Description[ca]=Evita al sistema de desar polítiques d'estris remots del plasma
|
||||
Description[ca@valencia]=Evita al sistema d'alçar polítiques d'estris remots del plasma
|
||||
Description[da]=Forhindrer systemet i et gemme politikker for eksterne plasma widgets
|
||||
Description[de]=Verhindert, dass das System Regeln für entfernte Miniprogramme speichert
|
||||
Description[el]=Αποτρέπει το σύστημα από το να σώσει τις πολιτικές απομακρυσμένων μικροεφαρμογών plasma
|
||||
Description[en_GB]=Prevents the system from saving plasma remote widgets policies
|
||||
Description[es]=Impide que el sistema guarde políticas de elementos gráficos remotos
|
||||
Description[et]=Takistab süsteemil salvestamast Plasma välisvidinate reegleid
|
||||
Description[eu]=Sistemak urruneko tramankuluen politikak gorde ditzan ekiditen du
|
||||
Description[fi]=Estää järjestelmää tallettamasta plasma etäkäyttöliittymäelementtien toimintatavat
|
||||
Description[fr]=Empêche le système d'enregistrer la politique des éléments distants
|
||||
Description[ga]=Ná lig don chóras polasaithe um giuirléidí cianda plasma a shábháil
|
||||
Description[gl]=Evita que o sistema garde as políticas de plasma dos widgets remotos
|
||||
Description[hr]=Brani sustavu da snima pravila za plasama udaljene widgete
|
||||
Description[hu]=Meggátolja, hogy a gép elmentse a távoli Plasma-elemek házirendjét
|
||||
Description[ia]=Il preveni le systema ab salvar le politicas de le remote widgets de plasma
|
||||
Description[id]=Cegah sistem dari menyimpan kebijakan widget jarak jauh plasma
|
||||
Description[is]=Kemur í veg fyrir að kerfið visti meðhöndlunarstefnu fyrir fjarlægar græjur
|
||||
Description[it]=Impedisce al sistema di salvare le regole degli elementi plasma remoti
|
||||
Description[kk]=Plasma қашық виджет ережелерін сақтауын болдырмау
|
||||
Description[km]=ការពារប្រព័ន្ធកុំឲ្យរក្សាទុកគោលការណ៍ធាតុក្រាហ្វិកប្លាស្មាពីចម្ងាយ
|
||||
Description[ko]=Plasma 원격 위젯 정책을 저장하지 못하도록 합니다
|
||||
Description[lt]=Apsaugo sistemą nuo plazmos nutolusių valdiklių politikos įrašymo
|
||||
Description[lv]=Liedz sistēmai saglabāt plasma attālināto sīkrīku politikas
|
||||
Description[nb]=Hindrer at systemet lagrer praksiser for plasmaelementer på nettverket
|
||||
Description[nds]=Höllt dat Systeem vun't Sekern vun de Regeln för feern Plasma-Lüttprogrammen af
|
||||
Description[nl]=Voorkomt het opslaan door het systeem van beleidsregels voor widgets op afstand
|
||||
Description[nn]=Hindrar systemet å lagra reglar for fjernelement
|
||||
Description[pa]=ਸਿਸਟਮ ਨੂੰ ਪਲਾਜ਼ਮਾ ਰਿਮੋਟ ਵਿਦਜੈੱਟ ਪਾਲਸੀ ਸੰਭਾਲਣ ਤੋਂ ਰੋਕਦਾ ਹੈ
|
||||
Description[pl]=Nie pozwala systemowi na zapisanie zdalnych polityk elementów interfejsu
|
||||
Description[pt]=Impede que o sistema grave as políticas dos elementos remotos do Plasma
|
||||
Description[pt_BR]=Previne o sistema de salvar as políticas de widgets Plasma remotos
|
||||
Description[ro]=Previne salvarea politicilor de controale distante de către sistem
|
||||
Description[sk]=Zabraňuje systému uloženie politík pre vzdialené widgety
|
||||
Description[sl]=Sistemu prepreči, da bi shranil pravila za oddaljene gradnike
|
||||
Description[sr]=Спречава систем да сачува смерница удаљених плазма виџета
|
||||
Description[sr@ijekavian]=Спрјечава систем да сачува смјерница удаљених плазма виџета
|
||||
Description[sr@ijekavianlatin]=Sprječava sistem da sačuva smjernica udaljenih plasma vidžeta
|
||||
Description[sr@latin]=Sprečava sistem da sačuva smernica udaljenih plasma vidžeta
|
||||
Description[sv]=Förhindrar systemet från att spara policy för Plasma grafiska fjärrkomponenter
|
||||
Description[tg]=Системаро аз захиракунии сиёсати ваҷетҳои дурдаст қатъ мекунад
|
||||
Description[th]=ป้องกันระบบจากการบันทึกนโยบายต่าง ๆ ของวิดเจ็ตทางไกล
|
||||
Description[tr]=Uzak gereçler politikalarını kaydetme işleminden sistemi korur
|
||||
Description[uk]=Заборонити системі зберігати правила для віддалених віджетів Плазми
|
||||
Description[x-test]=xxPrevents the system from saving plasma remote widgets policiesxx
|
||||
Description[zh_CN]=阻止系统保存来自远程的部件策略请求
|
||||
Description[zh_TW]=避免系統儲存 plasma 遠端元件政策
|
||||
Policy=auth_admin
|
51
remotewidgetshelper/remotewidgetshelper.cpp
Normal file
51
remotewidgetshelper/remotewidgetshelper.cpp
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
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)
|
34
remotewidgetshelper/remotewidgetshelper_p.h
Normal file
34
remotewidgetshelper/remotewidgetshelper_p.h
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
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
|
Loading…
Reference in New Issue
Block a user