From 4aed2c8219774f5d797760606b8489a92ddc5163 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kcontrol/privacy/Makefile.am | 16 ++ kcontrol/privacy/kcmprivacydialog.ui | 201 ++++++++++++++++++++++ kcontrol/privacy/kprivacymanager.cpp | 169 +++++++++++++++++++ kcontrol/privacy/kprivacymanager.h | 55 ++++++ kcontrol/privacy/kprivacysettings.ui | 308 +++++++++++++++++++++++++++++++++ kcontrol/privacy/privacy.cpp | 319 +++++++++++++++++++++++++++++++++++ kcontrol/privacy/privacy.desktop | 204 ++++++++++++++++++++++ kcontrol/privacy/privacy.h | 74 ++++++++ 8 files changed, 1346 insertions(+) create mode 100644 kcontrol/privacy/Makefile.am create mode 100644 kcontrol/privacy/kcmprivacydialog.ui create mode 100644 kcontrol/privacy/kprivacymanager.cpp create mode 100644 kcontrol/privacy/kprivacymanager.h create mode 100644 kcontrol/privacy/kprivacysettings.ui create mode 100644 kcontrol/privacy/privacy.cpp create mode 100644 kcontrol/privacy/privacy.desktop create mode 100644 kcontrol/privacy/privacy.h (limited to 'kcontrol/privacy') diff --git a/kcontrol/privacy/Makefile.am b/kcontrol/privacy/Makefile.am new file mode 100644 index 000000000..82ac0d2a6 --- /dev/null +++ b/kcontrol/privacy/Makefile.am @@ -0,0 +1,16 @@ +AM_CPPFLAGS = $(all_includes) +kde_module_LTLIBRARIES = kcm_privacy.la + +kcm_privacy_la_SOURCES = privacy.cpp kprivacysettings.ui kcmprivacydialog.ui kprivacymanager.cpp + +kcm_privacy_la_LDFLAGS = -module -avoid-version $(all_libraries) -no-undefined +kcm_privacy_la_LIBADD = $(LIB_KDEUI) -lkio + +METASOURCES = AUTO + +noinst_HEADERS = privacy.h + +messages: rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/privacy.pot + +xdg_apps_DATA = privacy.desktop diff --git a/kcontrol/privacy/kcmprivacydialog.ui b/kcontrol/privacy/kcmprivacydialog.ui new file mode 100644 index 000000000..df79e2ec1 --- /dev/null +++ b/kcontrol/privacy/kcmprivacydialog.ui @@ -0,0 +1,201 @@ + +KCMPrivacyDialog +Ralf Hoelzer + + + KCMPrivacyDialog + + + + 0 + 0 + 452 + 226 + + + + + 7 + 7 + 0 + 0 + + + + + 0 + 0 + + + + + 400 + 550 + + + + Privacy + + + + unnamed + + + 0 + + + + splitter1 + + + Vertical + + + + privacyListView + + + false + + + AllColumns + + + false + + + false + + + + + statusTextEdit + + + + 1 + 7 + 0 + 0 + + + + + 0 + 50 + + + + + 32767 + 200 + + + + Manual + + + + + + true + + + + + + layout1 + + + + unnamed + + + + selectAllButton + + + + 80 + 0 + + + + + 32767 + 32767 + + + + Select All + + + + + selectNoneButton + + + + 80 + 0 + + + + + 32767 + 32767 + + + + Select None + + + + + spacer1 + + + Horizontal + + + Maximum + + + + 80 + 20 + + + + + + cleanupButton + + + + 1 + 0 + 0 + 0 + + + + + 32767 + 32767 + + + + Clean Up + + + + + + + + klistview.h + ktextedit.h + + + diff --git a/kcontrol/privacy/kprivacymanager.cpp b/kcontrol/privacy/kprivacymanager.cpp new file mode 100644 index 000000000..cad01a169 --- /dev/null +++ b/kcontrol/privacy/kprivacymanager.cpp @@ -0,0 +1,169 @@ +/** + * kprivacymanager.cpp + * + * Copyright (c) 2003 Ralf Hoelzer + * + * 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 Lesser 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 "kprivacymanager.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +KPrivacyManager::KPrivacyManager() +{ + if (!kapp->dcopClient()->isAttached()) + kapp->dcopClient()->attach(); + + m_error = false; +} + + +KPrivacyManager::~KPrivacyManager() +{ +} + +bool KPrivacyManager::clearThumbnails() +{ + // http://freedesktop.org/Standards/Home + // http://triq.net/~jens/thumbnail-spec/index.html + + QDir thumbnailDir( QDir::homeDirPath() + "/.thumbnails/normal"); + thumbnailDir.setFilter( QDir::Files ); + QStringList entries = thumbnailDir.entryList(); + for( QStringList::Iterator it = entries.begin() ; it != entries.end() ; ++it) + if(!thumbnailDir.remove(*it)) m_error = true; + if(m_error) return m_error; + + thumbnailDir.setPath(QDir::homeDirPath() + "/.thumbnails/large"); + entries = thumbnailDir.entryList(); + for( QStringList::Iterator it = entries.begin() ; it != entries.end() ; ++it) + if(!thumbnailDir.remove(*it)) m_error = true; + if(m_error) return m_error; + + thumbnailDir.setPath(QDir::homeDirPath() + "/.thumbnails/fail"); + entries = thumbnailDir.entryList(); + for( QStringList::Iterator it = entries.begin() ; it != entries.end() ; ++it) + if(!thumbnailDir.remove(*it)) m_error = true; + + return m_error; +} + +bool KPrivacyManager::clearRunCommandHistory() const +{ + return kapp->dcopClient()->send( "kdesktop", "KDesktopIface", "clearCommandHistory()", "" ); +} + +bool KPrivacyManager::clearAllCookies() const +{ + return kapp->dcopClient()->send( "kded", "kcookiejar", "deleteAllCookies()", "" ); +} + +bool KPrivacyManager::clearSavedClipboardContents() +{ + if(!isApplicationRegistered("klipper")) + { + KConfig *c = new KConfig("klipperrc", false, false); + + { + KConfigGroupSaver saver(c, "General"); + c->deleteEntry("ClipboardData"); + c->sync(); + } + delete c; + return true; + } + + return kapp->dcopClient()->send( "klipper", "klipper", "clearClipboardHistory()", "" ); +} + +bool KPrivacyManager::clearFormCompletion() const +{ + QFile completionFile(locateLocal("data", "khtml/formcompletions")); + + return completionFile.remove(); +} + +bool KPrivacyManager::clearWebCache() const +{ + KProcess process; + process << "kio_http_cache_cleaner" << "--clear-all"; + return process.start(KProcess::DontCare); +} + +bool KPrivacyManager::clearRecentDocuments() const +{ + KRecentDocument::clear(); + return KRecentDocument::recentDocuments().isEmpty(); +} + +bool KPrivacyManager::clearQuickStartMenu() const +{ + return kapp->dcopClient()->send( "kicker", "kicker", "clearQuickStartMenu()", "" ); +} + +bool KPrivacyManager::clearWebHistory() +{ + QStringList args("--preload"); + + // preload Konqueror if it is not running + if(!isApplicationRegistered("konqueror")) + { + kdDebug() << "couldn't find Konqueror instance, preloading." << endl; + kapp->kdeinitExec("konqueror", args, 0,0); + } + + return kapp->dcopClient()->send( "konqueror*", "KonqHistoryManager", + "notifyClear(QCString)", "" ); +} + +bool KPrivacyManager::clearFavIcons() +{ + QDir favIconDir(KGlobal::dirs()->saveLocation( "cache", "favicons/" )); + favIconDir.setFilter( QDir::Files ); + + QStringList entries = favIconDir.entryList(); + + // erase all files in favicon directory + for( QStringList::Iterator it = entries.begin() ; it != entries.end() ; ++it) + if(!favIconDir.remove(*it)) m_error = true; + return m_error; +} + + +bool KPrivacyManager::isApplicationRegistered(const QString &appName) +{ + + QCStringList regApps = kapp->dcopClient()->registeredApplications(); + + for ( QCStringList::Iterator it = regApps.begin(); it != regApps.end(); ++it ) + if((*it).find(appName.latin1()) != -1) return true; + + return false; +} + +#include "kprivacymanager.moc" diff --git a/kcontrol/privacy/kprivacymanager.h b/kcontrol/privacy/kprivacymanager.h new file mode 100644 index 000000000..114618577 --- /dev/null +++ b/kcontrol/privacy/kprivacymanager.h @@ -0,0 +1,55 @@ +/** + * kprivacymanager.h + * + * Copyright (c) 2003 Ralf Hoelzer + * + * 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 Lesser 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 KPRIVACYMANAGER_H +#define KPRIVACYMANAGER_H + +#include + +/** +@author Ralf Hoelzer +*/ + +class KPrivacyManager : public QObject +{ +Q_OBJECT +public: + KPrivacyManager(); + + ~KPrivacyManager(); + + bool clearAllCookies() const; + bool clearSavedClipboardContents(); + bool clearThumbnails(); + bool clearRunCommandHistory() const; + bool clearFormCompletion() const; + bool clearWebHistory(); + bool clearWebCache() const; + bool clearQuickStartMenu() const; + bool clearRecentDocuments() const; + bool clearFavIcons(); + +private: + bool isApplicationRegistered(const QString &appName); + bool m_error; + +}; + +#endif diff --git a/kcontrol/privacy/kprivacysettings.ui b/kcontrol/privacy/kprivacysettings.ui new file mode 100644 index 000000000..93afe5dff --- /dev/null +++ b/kcontrol/privacy/kprivacysettings.ui @@ -0,0 +1,308 @@ + +KPrivacySettings +KDE Privacy Settings Widget +Licensed under the terms of the LGPL. +Derived from AT&T's Privacy Bird settings panel screenshot originally. + +George Staikos <staikos@kde.org> + + + KPrivacySettings + + + + 0 + 0 + 905 + 724 + + + + Privacy Settings + + + + unnamed + + + + line1 + + + HLine + + + Sunken + + + Horizontal + + + + + textLabel1 + + + Network privacy level: + + + _privacyLevel + + + + + + Low + + + + + Medium + + + + + High + + + + + Custom + + + + _privacyLevel + + + + 7 + 0 + 0 + 0 + + + + + + buttonGroup1_2 + + + Financial Information + + + + unnamed + + + + textLabel2 + + + Warn me when I visit a site that uses my financial or purchase information: + + + + + _warnFinancialMarketeer + + + For marketing or advertising purposes + + + + + _warnFinancialSpammer + + + To share with other companies + + + + + + + buttonGroup1 + + + Health Information + + + + unnamed + + + + textLabel2_2 + + + Warn me when I visit a site that uses my health or medical information: + + + + + _warnHealthMarketeer + + + For marketing or advertising purposes + + + + + _warnHealthSpammer + + + To share with other companies + + + + + + + buttonGroup1_2_2 + + + Demographics + + + + unnamed + + + + textLabel2_3 + + + Warn me when I visit a site that uses my non-personally identifiable information: + + + + + _warnDemographicsBigBrother + + + To determine my interests, habits or general behavior + + + + + _warnDemographicsSpammer + + + To share with other companies + + + + + + + _warnSpammers + + + Warn me when I visit a site that shares my personal information with other companies + + + + + _warnShady + + + Warn me when I visit a site that does not let me know what information they have about me + + + + + buttonGroup4 + + + Personal Information + + + + unnamed + + + + textLabel2_2_2 + + + Warn me when I visit a site that may contact me about other products or services: + + + + + textLabel2_2_2_2 + + + Warn me when I visit a site that may use my personal information to: + + + + + _warnPersonalHabits + + + Determine my habits, interests or general behavior + + + + + layout1 + + + + unnamed + + + + _warnPersonalTelephone + + + Via telephone + + + + + _warnPersonalMail + + + Via mail + + + + + + + layout3 + + + + unnamed + + + + _warnPersonalEmail + + + Via email + + + + + _warnPersonalBigBrother + + + And do not allow me to remove my contact information + + + + + + + + + + kdialog.h + + + + diff --git a/kcontrol/privacy/privacy.cpp b/kcontrol/privacy/privacy.cpp new file mode 100644 index 000000000..c0287ceba --- /dev/null +++ b/kcontrol/privacy/privacy.cpp @@ -0,0 +1,319 @@ +/** + * privacy.cpp + * + * Copyright (c) 2003 Ralf Hoelzer + * + * 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 Lesser 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 +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "privacy.h" + +Privacy::Privacy(QWidget *parent, const char *name) + : KCModule(parent, name) +{ + setQuickHelp( i18n("The privacy module allows a user to erase traces which KDE leaves on " + "the system, such as command histories or browser caches.")); + + setButtons( KCModule::Default|KCModule::Apply|KCModule::Help ); + + KAboutData *about = + new KAboutData(I18N_NOOP("kcm_privacy"), I18N_NOOP("KDE Privacy Control Module"), + 0, 0, KAboutData::License_GPL, + I18N_NOOP("(c) 2003 Ralf Hoelzer")); + + about->addAuthor("Ralf Hoelzer", 0, "ralf@well.com"); + about->addAuthor("Benjamin Meyer", I18N_NOOP("Thumbnail Cache"), "ben+kdeprivacy@meyerhome.net"); + setAboutData( about ); + + m_privacymanager = new KPrivacyManager(); + + QBoxLayout *top = new QVBoxLayout(this, 0, KDialog::spacingHint()); + + // add this once the P3P stuff is finished + //QTabWidget *privacyTabs = new QTabWidget(this, "privacytabs"); + + cleaningDialog = new KCMPrivacyDialog(this); + //p3pSettings = new KPrivacySettings(this); + + top->addWidget(cleaningDialog); + + //top->addWidget(privacyTabs); + //privacyTabs->addTab(cleaningDialog, i18n("Cleanup")); + //privacyTabs->addTab(p3pSettings, i18n("Privacy Settings")); + + + KListView *sw = cleaningDialog->privacyListView; + + sw->addColumn(i18n("Privacy Settings")); + sw->addColumn(i18n("Description")); + + sw->setRootIsDecorated(true); + sw->setTooltipColumn(1); + sw->setColumnWidthMode(0, QListView::Maximum); + + + + generalCLI = new KListViewItem(sw, i18n("General") ); + webbrowsingCLI = new KListViewItem(sw, i18n("Web Browsing") ); + + generalCLI->setOpen(true); + webbrowsingCLI->setOpen(true); + + clearThumbnails = new QCheckListItem(generalCLI, + i18n("Thumbnail Cache"),QCheckListItem::CheckBox); + clearRunCommandHistory = new QCheckListItem(generalCLI, + i18n("Run Command History"),QCheckListItem::CheckBox); + clearAllCookies = new QCheckListItem(webbrowsingCLI, + i18n("Cookies"),QCheckListItem::CheckBox); + clearSavedClipboardContents = new QCheckListItem(generalCLI, + i18n("Saved Clipboard Contents"),QCheckListItem::CheckBox); + clearWebHistory = new QCheckListItem(webbrowsingCLI, + i18n("Web History"),QCheckListItem::CheckBox); + clearWebCache = new QCheckListItem(webbrowsingCLI, + i18n("Web Cache"),QCheckListItem::CheckBox); + clearFormCompletion = new QCheckListItem(webbrowsingCLI, + i18n("Form Completion Entries"),QCheckListItem::CheckBox); + clearRecentDocuments = new QCheckListItem(generalCLI, + i18n("Recent Documents"),QCheckListItem::CheckBox); + clearQuickStartMenu = new QCheckListItem(generalCLI, + i18n("Quick Start Menu"),QCheckListItem::CheckBox); + clearFavIcons = new QCheckListItem(webbrowsingCLI, + i18n("Favorite Icons"),QCheckListItem::CheckBox); + + QWhatsThis::add(sw, i18n("Check all cleanup actions you would like to perform. These will be executed by pressing the button below")); + QWhatsThis::add(cleaningDialog->cleanupButton, i18n("Immediately performs the cleanup actions selected above")); + + clearThumbnails->setText(1, i18n("Clears all cached thumbnails")); + clearRunCommandHistory->setText(1, i18n("Clears the history of commands run through the Run Command tool on the desktop")); + clearAllCookies->setText(1, i18n("Clears all stored cookies set by websites")); + clearWebHistory->setText(1, i18n("Clears the history of visited websites")); + clearSavedClipboardContents->setText(1, i18n("Clears the clipboard contents stored by Klipper")); + clearWebCache->setText(1, i18n("Clears the temporary cache of websites visited")); + clearFormCompletion->setText(1, i18n("Clears values which were entered into forms on websites")); + clearRecentDocuments->setText(1, i18n("Clears the list of recently used documents from the KDE applications menu")); + clearQuickStartMenu->setText(1, i18n("Clears the entries from the list of recently started applications")); + clearFavIcons->setText(1, i18n("Clears the FavIcons cached from visited websites")); + + connect(sw, SIGNAL(selectionChanged()), SLOT(changed())); + + // store all entries in a list for easy access later on + checklist.append(clearThumbnails); + checklist.append(clearRunCommandHistory); + checklist.append(clearAllCookies); + checklist.append(clearSavedClipboardContents); + checklist.append(clearWebHistory); + checklist.append(clearWebCache); + checklist.append(clearFormCompletion); + checklist.append(clearRecentDocuments); + checklist.append(clearQuickStartMenu); + checklist.append(clearFavIcons); + + connect(cleaningDialog->cleanupButton, SIGNAL(clicked()), SLOT(cleanup())); + connect(cleaningDialog->selectAllButton, SIGNAL(clicked()), SLOT(selectAll())); + connect(cleaningDialog->selectNoneButton, SIGNAL(clicked()), SLOT(selectNone())); + + load(); +} + + +Privacy::~Privacy() +{ + delete m_privacymanager; +} + +void Privacy::load() +{ + load( false ); +} + +void Privacy::load(bool useDefaults) +{ + KConfig *c = new KConfig("kprivacyrc", false, false); + + c->setReadDefaults( useDefaults ); + + // get general privacy settings + { + KConfigGroupSaver saver(c, "Cleaning"); + + clearThumbnails->setOn(c->readBoolEntry("ClearThumbnails", true)); + clearRunCommandHistory->setOn(c->readBoolEntry("ClearRunCommandHistory", true)); + clearAllCookies->setOn(c->readBoolEntry("ClearAllCookies", true)); + clearSavedClipboardContents->setOn(c->readBoolEntry("ClearSavedClipboardContents", true)); + clearWebHistory->setOn(c->readBoolEntry("ClearWebHistory", true)); + clearWebCache->setOn(c->readBoolEntry("ClearWebCache", true)); + clearFormCompletion->setOn(c->readBoolEntry("ClearFormCompletion", true)); + clearRecentDocuments->setOn(c->readBoolEntry("ClearRecentDocuments", true)); + clearQuickStartMenu->setOn(c->readBoolEntry("ClearQuickStartMenu", true)); + clearFavIcons->setOn(c->readBoolEntry("ClearFavIcons", true)); + } + + { + KConfigGroupSaver saver(c, "P3P"); + + // TODO: add P3P settings here + } + + delete c; + emit changed( useDefaults ); +} + + +void Privacy::defaults() +{ + load( true ); +} + + +void Privacy::save() +{ + KConfig *c = new KConfig("kprivacyrc", false, false); + { + KConfigGroupSaver saver(c, "Cleaning"); + + c->writeEntry("ClearThumbnails", clearThumbnails->isOn()); + c->writeEntry("ClearRunCommandHistory", clearRunCommandHistory->isOn()); + c->writeEntry("ClearAllCookies", clearAllCookies->isOn()); + c->writeEntry("ClearSavedClipboardContents", clearSavedClipboardContents->isOn()); + c->writeEntry("ClearWebCache", clearWebCache->isOn()); + c->writeEntry("ClearWebHistory", clearWebHistory->isOn()); + c->writeEntry("ClearFormCompletion", clearFormCompletion->isOn()); + c->writeEntry("ClearRecentDocuments", clearRecentDocuments->isOn()); + c->writeEntry("ClearQuickStartMenu", clearQuickStartMenu->isOn()); + c->writeEntry("ClearFavIcons", clearFavIcons->isOn()); + } + + { + KConfigGroupSaver saver(c, "P3P"); + + // TODO: add settings for P3P + } + + c->sync(); + + delete c; + emit changed(false); + +} + +void Privacy::selectAll() +{ + QCheckListItem *item; + + for ( item = checklist.first(); item; item = checklist.next() ) + item->setOn(true); + + emit changed(true); +} + +void Privacy::selectNone() +{ + QCheckListItem *item; + + for ( item = checklist.first(); item; item = checklist.next() ) + item->setOn(false); + + emit changed(true); +} + + +void Privacy::cleanup() +{ + if (KMessageBox::warningContinueCancel(this, i18n("You are deleting data that is potentially valuable to you. Are you sure?")) != KMessageBox::Continue) return; + + cleaningDialog->statusTextEdit->clear(); + cleaningDialog->statusTextEdit->setText(i18n("Starting cleanup...")); + + QCheckListItem *item; + bool error = false; + + for ( item = checklist.first(); item; item = checklist.next() ) + { + if(item->isOn()) + { + QString statusText = i18n("Clearing %1...").arg(item->text()); + cleaningDialog->statusTextEdit->append(statusText); + + if(item == clearThumbnails) + error = m_privacymanager->clearThumbnails(); + + if(item == clearRunCommandHistory) + error = !m_privacymanager->clearRunCommandHistory(); + + if(item == clearSavedClipboardContents) + error = !m_privacymanager->clearSavedClipboardContents(); + + if(item == clearAllCookies) + error = !m_privacymanager->clearAllCookies(); + + if(item == clearFormCompletion) + error = !m_privacymanager->clearFormCompletion(); + + if(item == clearWebCache) + error = !m_privacymanager->clearWebCache(); + + if(item == clearWebHistory) + error = !m_privacymanager->clearWebHistory(); + + if(item == clearRecentDocuments) + error = !m_privacymanager->clearRecentDocuments(); + + if(item == clearQuickStartMenu) + error = !m_privacymanager->clearQuickStartMenu(); + + if(item == clearFavIcons) + error = m_privacymanager->clearFavIcons(); + + if(error) + { + QString errorText = i18n("Clearing of %1 failed").arg(item->text()); + cleaningDialog->statusTextEdit->append(errorText); + } + } + } + + + cleaningDialog->statusTextEdit->append(i18n("Clean up finished.")); + +} + +extern "C" +{ + + KDE_EXPORT KCModule *create_privacy(QWidget *parent, const char * /*name*/) + { + KGlobal::locale()->insertCatalogue("privacy"); + return new Privacy(parent, "Privacy"); + } +} + +#include "privacy.moc" diff --git a/kcontrol/privacy/privacy.desktop b/kcontrol/privacy/privacy.desktop new file mode 100644 index 000000000..f47b2dd0e --- /dev/null +++ b/kcontrol/privacy/privacy.desktop @@ -0,0 +1,204 @@ +[Desktop Entry] +Icon=trashcan_empty +Comment=Privacy - a kcontrol module to clean unwanted traces the user leaves on the system +Comment[af]=Privaatheid - 'n Beheer module wat voetspore wat deur gebruikers op die stelsel gelaat word skoon maak +Comment[ar]=الخصوصية - وحدة kcontrol لتنظيف الآثار غير المرغوب بها التي يتركها المستخدم على النظام +Comment[be]=Модуль захавання прыватнасці. Выдаляе файлы, што застаюцца пасля працы карыстальніка на кампутары +Comment[bg]=Настройване заличаването на личната информация +Comment[bn]=প্রাইভেসি - একটি কে-কন্ট্রোল মডিউল যার কাজব্যবহারের পর অবশিষ্ট চিহ্নগুলি পরিশোধন করা +Comment[bs]=Privatnost - KControl modul koji čisti neželjene tragove koje korisnik ostavlja na sistemu +Comment[ca]=Privacitat - un mòdul de kcontrol per a netejar les traces no desitjades que va deixant un usuari pel sistema +Comment[cs]=Soukromí - modul pro čištění citlivých údajů +Comment[csb]=Priwatny nastôw - mòduł, chtëren zezwôlô remac niepòrządané szlachë jaczé òstałë pò brëkòwnikù w systemie +Comment[cy]=Preifatrwydd - modiwl krheoli i glanhau olion nas dymunir y mae'r defnyddiwr yn eu gadael ar y cysawd +Comment[da]=Privacy - et kcontrol-modul der kan rense systemet for uønskede spor som brugeren efterlader. +Comment[de]=Privatsphäre: Ein Kontrollmodul, das unerwünschte Spuren von Benutzern auf dem System beseitigt +Comment[el]=Προσωπικό απόρρητο - ένα άρθρωμα του kcontrol για τον καθαρισμό των ιχνών που ο χρήστης αφήνει στο σύστημα +Comment[eo]=Privataj aferoj - modulo de la KDEa administrilo, kiu forigas uzantajn spurojn +Comment[es]=Privacy - un módulo de kcontrol para limpiar pistas que el usuario deja en el sistema sin querer +Comment[et]=Privaatsus on juhtimismoodul, mis aitab kõrvaldada süsteemist kasutaja jäetud jäljed +Comment[eu]=Pribatutasuna - Erabiltzaileek sisteman zehar nahi izan gabe uzten dituzten aztarnak garbitzen dituen kcontrol modulua +Comment[fa]=محرمانگی - یک پیمانه kcontrol برای پاک کردن ردیابیهای ناخواسته، که کاربر در سیستم به جا می‌گذارد. +Comment[fi]=Yksityisyys - Ohjauskeskuksen moduuli ei-toivottujen jälkien siivoamiseen järjestelmästä +Comment[fr]=Confidentialité - Un module externe du Centre de configuration pour effacer les traces indésirables qu'un utilisateur laisse sur le système +Comment[fy]=Privacy - in Konfiguraasjemodule wêrmei jo ûnwenste efterbluiwende sporen fan brûkers wiskje kinne +Comment[gl]=Intimidade - un módulo de kcontrol para limpar os rastos non desexados que o usuario deixa no sistema +Comment[he]=פרטיות - מודול ב־kcontrol המשתמש למחיקת עקבות לא רצויים שמשתמש משאיר אחריו במערכת +Comment[hi]=गोपनीयता- उपयोक्ता द्वारा तंत्र में छोड़े गए अवांछित पदचिह्नों को साफ करने का एक के-कंट्रोल मॉड्यूल +Comment[hr]=Privatnost - Modul kcontrol za brisanje neželjenih tragova koje su korisnici ostavili na sustavu +Comment[hu]=A rendszerben létrejött, privát adatok biztonságos törlése +Comment[is]=Einkamál - stjórneining fyrir kcontrol til að hreinsa burt upplýsingar og gögn sem ekki er æskilegt að verði eftir á vélinni +Comment[it]=Privacy - un modulo di controllo per cancellare le tracce indesiderate che l'utente lascia nel sistema +Comment[ja]=システムの利用を終えた後の不要な利用形跡を削除 +Comment[ka]=კონფიდენციალურობა - მოდული kcontrol, წმენდს მომხმარებლის არასასურველ ნაკვალევს სისტემაში +Comment[kk]=Зиянды пайдаланушының қалдырған іздерді өшіретін kcontrol модулі +Comment[km]=Privacy - ម៉ូឌុល kcontrol មួយ​ដែល​ប្រើ​ដើម្បី​សម្អាត​ដាន ដែល​អ្នក​ប្រើ​បន្សល់​ទុក​លើ​ប្រព័ន្ធ +Comment[lt]=Privatumas - kcontrol modulis, padedantis išvalyti nepageidaujamus naudotojo veiklos sistemoje pėdsakus +Comment[lv]=Privātums - kontrolcentra modulis, kas ļauj iztīrīt nevēlamas pēdas, ko atstāj lietotājs sistēmā +Comment[mk]=Приватност - kcontrol модул кој ги чисти несаканите траги кои ги остава корисникот на системот +Comment[mn]=Privacy - систем дэх хэрэглэгчийн хэрэглэхгүй охрисон хог цэвэрлэгчийн хяналтын модул +Comment[mt]=Privatezza - modulu ta' kcontrol biex tnaddaf traċċi li l-user jista' jħalli fuq is-sistema +Comment[nb]=Personvern – en kcontrol-modul som fjerner uønskede spor som brukeren etterlater i systemet +Comment[nds]=Privaatrebeet - Mit dit Moduul kannst Du de Bruuksporen vun't Systeem wegmaken +Comment[ne]=गोप्यता - प्रयोगकर्ताले प्रणालीमा छोडेका नचाहेका पदचिन्ह हटाउन के नियन्त्रण मोड्युल +Comment[nl]=Privacy - een configuratiemodule waarmee u ongewenste sporen die gebruikers achterlaten kunt wissen. +Comment[nn]=Personvern – ein kontrollmodul som fjernar uønskte spor som brukeren etterlèt seg i systemet +Comment[pa]=ਰਹੱਸ - ਇੱਕ ਕੰਟਰੋਲ ਮੈਡੀਊਲ ਹੈ, ਜੋ ਕਿ ਸਿਸਟਮ 'ਤੇ ਉਪਭੋਗੀ ਦੀ ਨਾ-ਲੋੜੀਦੀ ਪਛਾਣ ਨੂੰ ਸਮਾਪਤ ਕਰਦਾ ਹੈ। +Comment[pl]=Ustawienia prywatności - moduł, który pozwala usunąć niepożądane ślady pozostawiane przez użytkownika w systemie +Comment[pt]=Privacidade - um módulo do kcontrol para limpar os registos indesejáveis que o utilizador deixa no sistema +Comment[pt_BR]=Privacidade - um módulo de controle do KDE para limpar traços não-desejados do usuário no sistema +Comment[ro]=Șterge urmele nedorite pe care le lasă un utilizator în sistem +Comment[ru]=Модуль kcontrol, очищающий нежелательные следы, оставленные пользователем в операционной системе +Comment[rw]=Umwihariko - igice k-igenzura ryo gusiba ibirango bidakenewe ukoresha yasize kuri sisitemu +Comment[se]=Iežassuodjaleapmi – kcontrolmoduvla mii váldá eret luottaid maid geavaheaddji guođđa vuogádahkii +Comment[sk]=Modul na vyčistenie nežiadúcich infomácií, ktoré používateľ necháva v systéme +Comment[sl]=Zasebnost - nadzorni modul, ki počisti nezaželene sledi, ki jih uporabnik pusti na sistemu +Comment[sr]=Приватност — kcontrol модул који уклања трагове активности корисника на систему +Comment[sr@Latn]=Privatnost — kcontrol modul koji uklanja tragove aktivnosti korisnika na sistemu +Comment[sv]=Integritet - en modul i Inställningscentralen för att ta bort oönskade spår användaren lämnat i systemet +Comment[ta]=தனிப்பட்ட- பயனீட்டாளர் விட்டுவைத்த தேவை இல்லாத சுவடுகளை kcontrol பகுதி நீக்கும். +Comment[tg]=Барномаи kcontrol барои тоза кардани дирагуниҳои номатлуб, ки бо корбарон дар система монда шудаанд +Comment[th]=ความเป็นส่วนตัว - โมดูลของศูนย์ควบคุม KDE ที่จะทำความสะอาดร่องรอยไม่พึงประสงค์ที่ผู้ใช้ปล่อยเอาไว้บนระบบ +Comment[tr]=Gizlilik - kullanıcının sistemde bıraktığı iztenilmeyen izlemeleri temizleyen kcontrol modülü +Comment[tt]=Xosusílıq – qullanuçıdan soñ sistem eçendä qalğan ezlär beterüçe kcontrol modulı +Comment[uk]=Конфіденційність - модуль керування для очищення небажаної інформації залишеної користувачем у системі +Comment[vi]=Riêng tư - trình điều khiển giúp xoá các dấu vết mà người sử dụng để lại trên hệ thống +Comment[wa]=Vikereye da vosse - on module di kcontrol po rnetyî les passêyes nén volowes ki l' uzeu leye sol sistinme +Comment[zh_CN]=隐私 - 清除用户留在系统中痕迹的 kcontrol 模块 +Comment[zh_TW]=隱私權 - 一個控制模組用來清除使用者不希望留在系統中的痕跡 +Exec=kcmshell privacy +Keywords=Privacy,privacy +Keywords[ar]=خصوصية، الخصوصية +Keywords[az]=Gizlilik,gizlilik +Keywords[be]=Бяспека,Прыватнасць,Privacy,privacy +Keywords[bg]=анонимност, лична, информация, тайна, Privacy, privacy +Keywords[br]=Buhez prevez,buhez prevez +Keywords[bs]=Privacy,privacy,privatnost +Keywords[ca]=Privacitat,privacitat +Keywords[cs]=soukromí +Keywords[csb]=Priwatnosc,prowatno,swòjno, swòjnosc,priwatny nastôw +Keywords[cy]=Preifatrwydd, preifatrwydd +Keywords[de]=privatsphäre +Keywords[el]=Προσωπικό απόρρητο,προσωπικό απόρρητο +Keywords[eo]=privataj aferoj,privataj aferoj +Keywords[es]=Privacidad,privacidad +Keywords[et]=Privaatsus,privaatsus +Keywords[eu]=Pribatutasuna,pribatutasuna +Keywords[fa]=محرمانگی، محرمانگی +Keywords[fi]=Yksityisyys, yksityisyys +Keywords[fr]=Confidentialité,confidentialité +Keywords[fy]=privacy +Keywords[ga]=Príobháideachas,príobháideachas +Keywords[gl]=Intimidade,intimidade +Keywords[he]=פרטיות,פרטיות, Privacy,privacy +Keywords[hi]=गोपनीय,गोपनीयता +Keywords[hr]=Privacy,privacy,Privatnost,privatnost,privatno +Keywords[hu]=adatvédelem,adatbiztonság +Keywords[is]=Privacy,privacy,einkamál +Keywords[it]=privacy,riservatezza +Keywords[ja]=プライバシー +Keywords[km]=ភាព​ឯកជន +Keywords[lt]=Privacy,privacy,privatumas,Privatumas +Keywords[lv]=Privāts,privātums +Keywords[mk]=Privacy,privacy,Приватност,приватност +Keywords[mt]=Privacy,privacy,privatezza +Keywords[nb]=personvern,privat +Keywords[nds]=Privaatrebeet +Keywords[ne]=गोप्यता, गोप्यता +Keywords[nl]=privacy +Keywords[nn]=personvern,privat +Keywords[pa]=Privacy,ਰਹੱਸ, ਨਿੱਜੀ +Keywords[pl]=Prywatność,prywatność,ustawienia prywatności +Keywords[pt]=privacidade +Keywords[pt_BR]=Privacidade,privacidade +Keywords[ro]=intimitate +Keywords[rw]=Umwihariko,umwihariko +Keywords[se]=Iežassuodjaleapmi,iežassuodjaleapmi +Keywords[sk]=Privacy,privacy,súkromie +Keywords[sl]=Zasebnost,zasebnost +Keywords[sr]=Privacy,privacy,Приватност,приватност,приватно +Keywords[sr@Latn]=Privacy,privacy,Privatnost,privatnost,privatno +Keywords[sv]=Integritet,privatliv +Keywords[ta]=தனிப்பட்ட,தனிப்பட்ட +Keywords[te]=ప్రైవసి +Keywords[th]=ความเป็นส่วนตัว +Keywords[tr]=gizlilik +Keywords[uk]=Конфіденційність +Keywords[uz]=Shaxsiy maʼlumot,shaxsiy maʼlumot +Keywords[uz@cyrillic]=Шахсий маълумот,шахсий маълумот +Keywords[vi]=Riêng tư,riêng tư +Keywords[wa]=privé,privêye vikereye,vikerêye da vosse +Keywords[zh_CN]=Privacy,privacy,隐私 +Keywords[zh_TW]=Privacy,privacy,隱私權 +Name=Privacy +Name[af]=Privaatheid +Name[ar]=الخصوصية +Name[az]=Gizlilik +Name[be]=Прыватнасць +Name[bg]=Анонимност +Name[bn]=প্রাইভেসি +Name[br]=Buhez prevez +Name[bs]=Privatnost +Name[ca]=Privacitat +Name[cs]=Soukromí +Name[csb]=Priwatnosc +Name[cy]=Preifatrwydd +Name[de]=Privatsphäre +Name[el]=Προσωπικό απόρρητο +Name[eo]=Privataj aferoj +Name[es]=Privacidad +Name[et]=Privaatsus +Name[eu]=Pribatutasuna +Name[fa]=محرمانگی +Name[fi]=Yksityisyys +Name[fr]=Confidentialité +Name[ga]=Príobháideachas +Name[gl]=Intimidade +Name[he]=פרטיות +Name[hi]=गोपनीयता +Name[hr]=Privatnost +Name[hu]=Magánjellegű adatok törlése +Name[is]=Einkamál +Name[ja]=プライバシー +Name[ka]=კონფიდენციალურობა +Name[kk]=Қарақшылыққа қарсылық +Name[km]=ភាព​ឯកជន +Name[lt]=Privatumas +Name[lv]=Privātums +Name[mk]=Приватност +Name[ms]=Privasi +Name[mt]=Privatezza +Name[nb]=Personvern +Name[nds]=Privaatrebeet +Name[ne]=गोप्यता +Name[nn]=Personvern +Name[pa]=ਰਹੱਸ +Name[pl]=Prywatność +Name[pt]=Privacidade +Name[pt_BR]=Privacidade +Name[ro]=Intimitate +Name[ru]=Конфиденциальность +Name[rw]=Umwihariko +Name[se]=Iežassuodjaleapmi +Name[sk]=Súkromie +Name[sl]=Zasebnost +Name[sr]=Приватност +Name[sr@Latn]=Privatnost +Name[sv]=Integritet +Name[ta]=தனிமை +Name[te]=ప్రైవసి +Name[th]=ความเป็นส่วนตัว +Name[tr]=Gizlilik +Name[tt]=Xosusílıq +Name[uk]=Конфіденційність +Name[uz]=Shaxsiy maʼlumot +Name[uz@cyrillic]=Шахсий маълумот +Name[vi]=Riêng tư +Name[wa]=Vikereye da vosse +Name[zh_CN]=隐私 +Name[zh_TW]=隱私權 +Terminal=false +Type=Application +X-KDE-FactoryName=privacy +X-KDE-Library=privacy +Categories=Qt;KDE;X-KDE-settings-security; diff --git a/kcontrol/privacy/privacy.h b/kcontrol/privacy/privacy.h new file mode 100644 index 000000000..fcec193c7 --- /dev/null +++ b/kcontrol/privacy/privacy.h @@ -0,0 +1,74 @@ +/** + * privacy.h + * + * Copyright (c) 2003 Ralf Hoelzer + * + * 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 Lesser 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 _PRIVACY_H_ +#define _PRIVACY_H_ + +#include +#include + +#include "kcmprivacydialog.h" +#include "kprivacymanager.h" +#include "kprivacysettings.h" + +class Privacy: public KCModule +{ + Q_OBJECT + +public: + Privacy( QWidget *parent=0, const char *name=0 ); + ~Privacy(); + + virtual void load(); + virtual void load(bool useDefaults); + virtual void save(); + virtual void defaults(); + +public slots: + void cleanup(); + void selectAll(); + void selectNone(); + +private: + KCMPrivacyDialog *cleaningDialog; + KPrivacySettings *p3pSettings; + KPrivacyManager *m_privacymanager; + + QPtrList checklist; + + KListViewItem *generalCLI; + KListViewItem *webbrowsingCLI; + + QCheckListItem *clearThumbnails; + QCheckListItem *clearRunCommandHistory; + QCheckListItem *clearAllCookies; + QCheckListItem *clearSavedClipboardContents; + QCheckListItem *clearWebHistory; + QCheckListItem *clearWebCache; + QCheckListItem *clearFormCompletion; + QCheckListItem *clearRecentDocuments; + QCheckListItem *clearQuickStartMenu; + QCheckListItem *clearFavIcons; + //QCheckListItem *clearFileDialogHistory; + + +}; + +#endif -- cgit v1.2.1