mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-24 02:42:50 +00:00
plasma: remove unused favicons and filebrowser data engines
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
0d80e11934
commit
0373b489c4
9 changed files with 0 additions and 662 deletions
|
@ -1,8 +1,6 @@
|
|||
add_subdirectory(applicationjobs)
|
||||
add_subdirectory(apps)
|
||||
add_subdirectory(dict)
|
||||
add_subdirectory(favicons)
|
||||
add_subdirectory(filebrowser)
|
||||
add_subdirectory(geolocation)
|
||||
add_subdirectory(mpris2)
|
||||
add_subdirectory(notifications)
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
set(favicons_engine_SRCS
|
||||
favicons.cpp
|
||||
)
|
||||
|
||||
kde4_add_plugin(plasma_engine_favicons ${favicons_engine_SRCS} )
|
||||
target_link_libraries(plasma_engine_favicons KDE4::plasma KDE4::kdecore)
|
||||
|
||||
install(TARGETS plasma_engine_favicons DESTINATION ${KDE4_PLUGIN_INSTALL_DIR} )
|
||||
install(FILES plasma-dataengine-favicons.desktop DESTINATION ${KDE4_SERVICES_INSTALL_DIR} )
|
||||
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007 Marco Martin <notmart@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as published by
|
||||
* the Free Software Foundation; either version 2 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 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 "favicons.h"
|
||||
|
||||
#include <KMimeType>
|
||||
#include <KStandardDirs>
|
||||
#include <KDebug>
|
||||
|
||||
FaviconsEngine::FaviconsEngine(QObject* parent, const QVariantList& args)
|
||||
: Plasma::DataEngine(parent, args)
|
||||
{
|
||||
}
|
||||
|
||||
bool FaviconsEngine::updateSourceEvent(const QString &identifier)
|
||||
{
|
||||
KUrl faviconUrl(identifier);
|
||||
if (faviconUrl.protocol().isEmpty()) {
|
||||
faviconUrl = KUrl("http://" + identifier);
|
||||
}
|
||||
|
||||
const QString fileName = KMimeType::favIconForUrl(faviconUrl.url(), true);
|
||||
if (fileName.isEmpty()) {
|
||||
kDebug() << "No icon available for " << identifier;
|
||||
setData(identifier, QImage());
|
||||
return false;
|
||||
}
|
||||
|
||||
const QString cachePath = KStandardDirs::locateLocal("cache", fileName + ".png");
|
||||
const QImage image(cachePath, "PNG");
|
||||
if (image.isNull()) {
|
||||
kWarning() << "Could not load the image" << cachePath;
|
||||
setData(identifier, QImage());
|
||||
return false;
|
||||
}
|
||||
|
||||
setData(identifier, image);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool FaviconsEngine::sourceRequestEvent(const QString &identifier)
|
||||
{
|
||||
return updateSourceEvent(identifier);
|
||||
}
|
||||
|
||||
#include "moc_favicons.cpp"
|
|
@ -1,47 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007 Tobias Koenig <tokoe@kde.org>
|
||||
* Copyright (C) 2008 Marco Martin <notmart@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as published by
|
||||
* the Free Software Foundation; either version 2 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 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.
|
||||
*/
|
||||
|
||||
#ifndef FAVICONS_DATAENGINE_H
|
||||
#define FAVICONS_DATAENGINE_H
|
||||
|
||||
#include <Plasma/DataEngine>
|
||||
|
||||
/**
|
||||
* This class provides favicons for websites
|
||||
*
|
||||
* the queries are just the url of websites we want to fetch an icon
|
||||
*/
|
||||
class FaviconsEngine : public Plasma::DataEngine
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FaviconsEngine(QObject* parent, const QVariantList& args);
|
||||
|
||||
protected:
|
||||
bool sourceRequestEvent(const QString &identifier);
|
||||
|
||||
protected Q_SLOTS:
|
||||
bool updateSourceEvent(const QString &identifier);
|
||||
};
|
||||
|
||||
K_EXPORT_PLASMA_DATAENGINE(favicons, FaviconsEngine)
|
||||
|
||||
#endif // FAVICONS_DATAENGINE_H
|
|
@ -1,159 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=Favicons
|
||||
Name[ar]=أيقونات الويب
|
||||
Name[ast]=Favicons
|
||||
Name[be@latin]=Ikony sajtaŭ
|
||||
Name[bg]=Уеб-икони
|
||||
Name[bn]=ফ্যাভ-আইকন
|
||||
Name[bn_IN]=Favicons
|
||||
Name[bs]=favikone
|
||||
Name[ca]=Icones de web
|
||||
Name[ca@valencia]=Icones de web
|
||||
Name[cs]=Oblíbené ikony
|
||||
Name[csb]=Faviconë (ikònczi)
|
||||
Name[da]=Favicons
|
||||
Name[de]=Webseiten-Symbole
|
||||
Name[el]=Αγαπημένα εικονίδια
|
||||
Name[en_GB]=Favicons
|
||||
Name[eo]=Favorikonoj
|
||||
Name[es]=Favicons
|
||||
Name[et]=Lemmikikoonid
|
||||
Name[eu]=Gogoko-ikonoak
|
||||
Name[fi]=Webbisivukuvakkeet
|
||||
Name[fr]=Émoticônes
|
||||
Name[fy]=Favicon-ôfbyldings
|
||||
Name[ga]=Deilbhíní Ceanán
|
||||
Name[gl]=Iconas de páxina web
|
||||
Name[gu]=ફેવિકોન્સ
|
||||
Name[he]=סמלי מועדפים
|
||||
Name[hi]=फेविकॉन
|
||||
Name[hne]=फेविकान
|
||||
Name[hr]=Omiljene ikone
|
||||
Name[hu]=Favikonok
|
||||
Name[ia]=Favicons
|
||||
Name[id]=Ikon Favorit
|
||||
Name[is]=Veftáknmyndir (favicons)
|
||||
Name[it]=Iconcine
|
||||
Name[ja]=ファビコン
|
||||
Name[kk]=Favicon таңбашалары
|
||||
Name[km]=រូបតំណាងសំណព្វ
|
||||
Name[kn]=ಫೆವಿಕಾನ್ಗಳು
|
||||
Name[ko]=파비콘
|
||||
Name[ku]=Nîşanên Malperan
|
||||
Name[lt]=Srities ženkliukai
|
||||
Name[lv]=TīmekļaIkonas
|
||||
Name[mai]=फेविकान
|
||||
Name[mk]=Омилени икони
|
||||
Name[ml]=ഇഷ്ടചിഹ്നങ്ങള്
|
||||
Name[mr]=Favicons
|
||||
Name[nb]=Ikoner for favorittsteder
|
||||
Name[nds]=Nettsieden-Lüttbiller
|
||||
Name[nl]=Favicons
|
||||
Name[nn]=Bokmerkeikon
|
||||
Name[or]=Favicons
|
||||
Name[pa]=ਫੇਵੀਕਾਨ
|
||||
Name[pl]=Ikony witryn
|
||||
Name[pt]='Favicons'
|
||||
Name[pt_BR]=Favicons
|
||||
Name[ro]=Pictograme favorite
|
||||
Name[ru]=Значки сайтов
|
||||
Name[si]=Favicons
|
||||
Name[sk]=Favikony
|
||||
Name[sl]=Ikone spletnih strani
|
||||
Name[sr]=фавиконе
|
||||
Name[sr@ijekavian]=фавиконе
|
||||
Name[sr@ijekavianlatin]=favikone
|
||||
Name[sr@latin]=favikone
|
||||
Name[sv]=Favoritikoner
|
||||
Name[ta]=சின்னங்கள்
|
||||
Name[tg]=Нишонаҳои саҳифаи интернетӣ
|
||||
Name[th]=ไอคอนเว็บ
|
||||
Name[tr]=Site Simgeleri
|
||||
Name[ug]=تور بېكەت سىنبەلگە
|
||||
Name[uk]=Піктограми «Вибраного»
|
||||
Name[wa]=Pititès imådjetes favicons
|
||||
Name[x-test]=xxFaviconsxx
|
||||
Name[zh_CN]=网站图标
|
||||
Name[zh_TW]=網站圖示
|
||||
Comment=Data Engine for getting favicons of web sites
|
||||
Comment[ar]=محرك بيانات لجلب أيقونات مواقع الوِب
|
||||
Comment[ast]=Motor de datos pa obtener favicons de los sitios web
|
||||
Comment[be@latin]=Systema źviestak dla atrymańnia ikon sajtaŭ
|
||||
Comment[bg]=Ядро за изтегляне на уеб-икони от сайтове
|
||||
Comment[bs]=Datomotor za dobavljanje favikona veb sajtova
|
||||
Comment[ca]=Motor de dades per obtenir icones de web dels llocs web
|
||||
Comment[ca@valencia]=Motor de dades per obtindre icones de web dels llocs web
|
||||
Comment[cs]=Mechanismus pro získávání ikon webových stránek
|
||||
Comment[da]=Datamotor til at hente favicons fra hjemmesider
|
||||
Comment[de]=Daten-Treiber zum Holen von Webseiten-Symbolen von Webseiten
|
||||
Comment[el]=Μηχανή δεδομένων για ανάκτηση αγαπημένων εικονιδίων από ιστοσελίδες
|
||||
Comment[en_GB]=Data Engine for getting favicons of web sites
|
||||
Comment[es]=Motor de datos para obtener favicons de los sitios web
|
||||
Comment[et]=Andmemootor lemmikikoonide hankimiseks veebilehekülgedelt
|
||||
Comment[eu]=Webguneen gogoko-ikonoak eskuratzeko datu-motorra
|
||||
Comment[fi]=Data-kone webbisivukuvakkeiden hakemiseksi
|
||||
Comment[fr]=Moteur de données permettant d'obtenir les émoticônes des sites Web
|
||||
Comment[fy]=Gegevens motor foar it krijen fan favicon-ôfbyldings fan websiden
|
||||
Comment[ga]=Inneall Sonraí a fhaigheann deilbhíní ceanán ó shuímh Ghréasáin
|
||||
Comment[gl]=Motor de datos para obter as iconas de páxina dos sitios web
|
||||
Comment[gu]=વેબ સાઇટ્સનાં ફેવિકોન્સ મેળવવા માટે માહિતી એન્જિન
|
||||
Comment[he]=מנוע תוכן להשגת סמלי מועדפים של אתרי אינטרנט
|
||||
Comment[hi]=वेबसाइटों के फेविकॉन को प्राप्त करने के लिए डाटा इंजिन
|
||||
Comment[hne]=वेब साइट के फेविकान लाय बर डाटा इंजिन
|
||||
Comment[hr]=Podatkovni mehanizam za nabavljanje omiljenih ikona sa web stranica
|
||||
Comment[hu]=Weboldalak favikonjainak letöltésére szolgáló adatmotor
|
||||
Comment[ia]=Motor de datos per obtener favicons del sitos web
|
||||
Comment[id]=Mesin Data untuk mendapatkan ikon favorit situs web
|
||||
Comment[is]=Gagnavél til söfnunar á veftáknmyndum (favicons)
|
||||
Comment[it]=Motore di dati per ottenere le iconcine dei siti Web
|
||||
Comment[ja]=ウェブサイトのファビコンを取得するためのデータエンジン
|
||||
Comment[kk]=Веб сайттарының таңбашаларын алу тетігі
|
||||
Comment[km]=ម៉ាស៊ីនទិន្នន័យសម្រាប់ទទួលរូបតំណាងសំណព្វរបស់តំបន់បណ្ដាញ
|
||||
Comment[kn]=ಜಾಲ ತಾಣಗಳ ಫೆವಿಕಾನ್ಗಳನ್ನು ಪಡೆಯಲು ನೆರವಾಗುವ ದತ್ತ ಎಂಜಿನ್
|
||||
Comment[ko]=웹 사이트의 파비콘을 가져오는 데이터 엔진
|
||||
Comment[lt]=Duomenų variklis srities ženkliukų atsisiuntimui iš interneto
|
||||
Comment[lv]=Datu dzinējs tīmekļa vietņu ikonu ielādei
|
||||
Comment[mk]=Податочна машина за добивање омилени икони од веб-локации
|
||||
Comment[ml]=വെബ് സൈറ്റുകളുടെ ഇഷ്ടചിഹ്നങ്ങള് ലഭിക്കാനുള്ള ഡേറ്റ എഞ്ചിന്
|
||||
Comment[mr]=संकेत स्थळाचे favicons प्राप्त करण्याकरिता Data Engine
|
||||
Comment[nb]=Datamotor for å hente favorittikoner fra nettsider
|
||||
Comment[nds]=Datenkarn för Nettsieden-Lüttbiller
|
||||
Comment[nl]=Gegevensengine voor het ophalen van favicons van websites
|
||||
Comment[nn]=Datamotor for henting av bokmerkeikon til nettsider
|
||||
Comment[pa]=ਵੈੱਬ ਸਾਇਟਾਂ ਲਈ ਫੈਵੀਕਾਨ ਲੈਣ ਲਈ ਡਾਟਾ ਇੰਜਣ
|
||||
Comment[pl]=Silnik danych do pobierania ikon witryn
|
||||
Comment[pt]=Um motor de dados para obter os 'favicons' das páginas Web
|
||||
Comment[pt_BR]=Mecanismo de dados para busca dos favicons de páginas Web
|
||||
Comment[ro]=Motor de date pentru preluarea pictogramelor siturilor web
|
||||
Comment[ru]=Источник данных значков сайтов
|
||||
Comment[si]=වෙබ් අඩවි වල favicon ලබාගැනීමේ දත්ත එන්ජිම
|
||||
Comment[sk]=Dátový nástroj na získavanie favikon z webových stránok
|
||||
Comment[sl]=Podatkovni vir za pridobivanje ikon spletnih strani
|
||||
Comment[sr]=Датомотор за добављање фавикона веб сајтова
|
||||
Comment[sr@ijekavian]=Датомотор за добављање фавикона веб сајтова
|
||||
Comment[sr@ijekavianlatin]=Datomotor za dobavljanje favikona veb sajtova
|
||||
Comment[sr@latin]=Datomotor za dobavljanje favikona veb sajtova
|
||||
Comment[sv]=Datagränssnitt för att hämta favoritikoner för webbplatser
|
||||
Comment[ta]=Data Engine for getting favicons of web sites
|
||||
Comment[te]=వెబ్ సైటులయొక్క ఫెవికాన్లను(ఫేవరేట్ఐకాన్స్) పొందుటకొరకు డాటా యింజన్
|
||||
Comment[th]=กลไกข้อมูลสำหรับรับค่าไอคอนหน้าเว็บของเว็บไซต์
|
||||
Comment[tr]=Ağ sitelerinden site simgelerini almak için bir Veri Motoru
|
||||
Comment[ug]=تور بېكەت سىنبەلگىسىگە ئېرىشىدىغان سانلىق-مەلۇمات ماتورى
|
||||
Comment[uk]=Рушій даних для отримання піктограм для вебсайтів
|
||||
Comment[vi]=Cơ chế dữ liệu để lấy các favicon cho trang web
|
||||
Comment[wa]=Moteur di dnêyes pos cweri des favicons des waibes
|
||||
Comment[x-test]=xxData Engine for getting favicons of web sitesxx
|
||||
Comment[zh_CN]=用于获取网站图标的数据引擎
|
||||
Comment[zh_TW]=取得網站的圖示的資料引擎
|
||||
X-KDE-ServiceTypes=Plasma/DataEngine
|
||||
Type=Service
|
||||
Icon=view-web-browser-dom-tree
|
||||
X-KDE-Library=plasma_engine_favicons
|
||||
|
||||
X-KDE-PluginInfo-Author=
|
||||
X-KDE-PluginInfo-Email=
|
||||
X-KDE-PluginInfo-Name=favicons
|
||||
X-KDE-PluginInfo-Version=
|
||||
X-KDE-PluginInfo-Website=
|
||||
X-KDE-PluginInfo-Category=
|
|
@ -1,10 +0,0 @@
|
|||
set(filebrowser_engine_SRCS
|
||||
filebrowserengine.cpp
|
||||
)
|
||||
|
||||
kde4_add_plugin(plasma_engine_filebrowser ${filebrowser_engine_SRCS})
|
||||
target_link_libraries(plasma_engine_filebrowser KDE4::kdecore KDE4::kio KDE4::plasma)
|
||||
|
||||
install(TARGETS plasma_engine_filebrowser DESTINATION ${KDE4_PLUGIN_INSTALL_DIR})
|
||||
install(FILES plasma-dataengine-filebrowser.desktop DESTINATION ${KDE4_SERVICES_INSTALL_DIR} )
|
||||
|
|
@ -1,152 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007 Ivan Cukic <ivan.cukic+kde@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License either version 2, or
|
||||
* (at your option) any later version as 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 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 "filebrowserengine.h"
|
||||
|
||||
#include <Plasma/DataContainer>
|
||||
|
||||
#include <QDir>
|
||||
#include <KDirWatch>
|
||||
#include <KDebug>
|
||||
#include <KFileMetaInfo>
|
||||
|
||||
#define InvalidIfEmpty(A) ((A.isEmpty())?(QVariant()):(QVariant(A)))
|
||||
#define forMatchingSources for (DataEngine::SourceDict::iterator it = sources.begin(); it != sources.end(); ++it) \
|
||||
if (dir == QDir(it.key()))
|
||||
|
||||
FileBrowserEngine::FileBrowserEngine(QObject* parent, const QVariantList& args) :
|
||||
Plasma::DataEngine(parent, args), m_dirWatch(NULL)
|
||||
{
|
||||
Q_UNUSED(args)
|
||||
|
||||
m_dirWatch = new KDirWatch(this);
|
||||
connect(
|
||||
m_dirWatch, SIGNAL(dirty(QString)),
|
||||
this, SLOT(updateData(QString))
|
||||
);
|
||||
}
|
||||
|
||||
FileBrowserEngine::~FileBrowserEngine()
|
||||
{
|
||||
delete m_dirWatch;
|
||||
}
|
||||
|
||||
void FileBrowserEngine::init()
|
||||
{
|
||||
kDebug() << "init() called";
|
||||
}
|
||||
|
||||
bool FileBrowserEngine::sourceRequestEvent(const QString &path)
|
||||
{
|
||||
kDebug() << "source requested() called: "<< path;
|
||||
m_dirWatch->addDir(path);
|
||||
setData(path, "type", QVariant("unknown"));
|
||||
updateData(path);
|
||||
return true;
|
||||
}
|
||||
|
||||
void FileBrowserEngine::updateData(const QString &path)
|
||||
{
|
||||
ObjectType type = NOTHING;
|
||||
if (QDir(path).exists()) {
|
||||
type = DIRECTORY;
|
||||
} else if (QFile::exists(path)) {
|
||||
type = FILE;
|
||||
}
|
||||
|
||||
DataEngine::SourceDict sources = containerDict();
|
||||
|
||||
QDir dir(path);
|
||||
clearData(path);
|
||||
|
||||
if (type == DIRECTORY) {
|
||||
kDebug() << "directory info processing: "<< path;
|
||||
if (dir.isReadable()) {
|
||||
const QStringList visibleFiles = dir.entryList(QDir::Files, QDir::Name);
|
||||
const QStringList allFiles = dir.entryList(QDir::Files | QDir::Hidden,
|
||||
QDir::Name);
|
||||
|
||||
const QStringList visibleDirectories = dir.entryList(QDir::Dirs
|
||||
| QDir::NoDotAndDotDot, QDir::Name);
|
||||
const QStringList allDirectories = dir.entryList(QDir::Dirs
|
||||
| QDir::NoDotAndDotDot | QDir::Hidden, QDir::Name);
|
||||
|
||||
forMatchingSources {
|
||||
kDebug() << "MATCH";
|
||||
it.value()->setData("item.type", QVariant("directory"));
|
||||
|
||||
QVariant vdTmp;
|
||||
if (!visibleDirectories.isEmpty()) vdTmp = QVariant(visibleDirectories);
|
||||
it.value()->setData("directories.visible", vdTmp);
|
||||
|
||||
QVariant adTmp;
|
||||
if (!allDirectories.empty()) adTmp = QVariant(allDirectories);
|
||||
it.value()->setData("directories.all", adTmp);
|
||||
|
||||
QVariant vfTmp;
|
||||
if (!visibleFiles.empty()) vfTmp = QVariant(visibleFiles);
|
||||
it.value()->setData("files.visible", vfTmp);
|
||||
|
||||
QVariant afTmp;
|
||||
if (!allFiles.empty()) afTmp = QVariant(allFiles);
|
||||
it.value()->setData("files.all", afTmp);
|
||||
}
|
||||
}
|
||||
} else if (type == FILE) {
|
||||
kDebug() << "file info processing: "<< path;
|
||||
KFileMetaInfo kfmi(path);
|
||||
if (kfmi.isValid()) {
|
||||
kDebug() << "METAINFO: " << kfmi.keys();
|
||||
|
||||
forMatchingSources {
|
||||
kDebug() << "MATCH";
|
||||
it.value()->setData("item.type", QVariant("file"));
|
||||
|
||||
foreach (const KFileMetaInfoItem &item, kfmi.items()) {
|
||||
it.value()->setData(item.key(), item.value());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
forMatchingSources {
|
||||
it.value()->setData("item.type", QVariant("imaginary"));
|
||||
}
|
||||
};
|
||||
|
||||
scheduleSourcesUpdated();
|
||||
|
||||
}
|
||||
|
||||
void FileBrowserEngine::clearData(const QString &path)
|
||||
{
|
||||
QDir dir(path);
|
||||
const DataEngine::SourceDict sources = containerDict();
|
||||
for (DataEngine::SourceDict::const_iterator it = sources.begin(); it
|
||||
!= sources.end(); ++it) {
|
||||
if (dir == QDir(it.key())) {
|
||||
kDebug() << "matched: "<< path << " "<< it.key();
|
||||
it.value()->removeAllData();
|
||||
|
||||
} else {
|
||||
kDebug() << "didn't match: "<< path << " "<< it.key();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#include "moc_filebrowserengine.cpp"
|
|
@ -1,57 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007 Ivan Cukic <ivan.cukic+kde@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License either version 2, or
|
||||
* (at your option) any later version as 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 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 FILEBROWSERENGINE_H
|
||||
#define FILEBROWSERENGINE_H
|
||||
|
||||
#include <Plasma/DataEngine>
|
||||
|
||||
class KDirWatch;
|
||||
|
||||
/**
|
||||
* This class evaluates the basic expressions given in the interface.
|
||||
*/
|
||||
class FileBrowserEngine : public Plasma::DataEngine
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FileBrowserEngine( QObject* parent, const QVariantList& args );
|
||||
~FileBrowserEngine();
|
||||
|
||||
protected:
|
||||
bool sourceRequestEvent(const QString &path);
|
||||
void init();
|
||||
|
||||
protected slots:
|
||||
void dirDirty(const QString &path);
|
||||
|
||||
private:
|
||||
enum ObjectType { NOTHING, FILE, DIRECTORY };
|
||||
|
||||
KDirWatch * m_dirWatch;
|
||||
void updateData(const QString &path);
|
||||
void clearData(const QString &path);
|
||||
|
||||
//QMap < QString, QStringList > m_regiteredListeners;
|
||||
};
|
||||
|
||||
K_EXPORT_PLASMA_DATAENGINE(filebrowser, FileBrowserEngine)
|
||||
|
||||
#endif
|
|
@ -1,162 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Name=Files and Directories
|
||||
Name[ar]=الملفات والمجلدات
|
||||
Name[ast]=Ficheros y direutorios
|
||||
Name[be@latin]=Fajły j katalohi
|
||||
Name[bg]=Файлове и папки
|
||||
Name[bn]=ফাইল এবং ডিরেক্টরি
|
||||
Name[bn_IN]=ফাইল ও ডিরেক্টরি
|
||||
Name[bs]=datoteke i fascikle
|
||||
Name[ca]=Fitxers i directoris
|
||||
Name[ca@valencia]=Fitxers i directoris
|
||||
Name[cs]=Soubory a složky
|
||||
Name[csb]=Lopczi ë katalodżi
|
||||
Name[da]=Filer og mapper
|
||||
Name[de]=Dateien und Ordner
|
||||
Name[el]=Αρχεία και κατάλογοι
|
||||
Name[en_GB]=Files and Directories
|
||||
Name[eo]=Dosieroj kaj Dosierujoj
|
||||
Name[es]=Archivos y directorios
|
||||
Name[et]=Failid ja kataloogid
|
||||
Name[eu]=Fitxategiak eta direktorioak
|
||||
Name[fi]=Tiedostot ja kansiot
|
||||
Name[fr]=Fichiers et dossiers
|
||||
Name[fy]=triemmen en triemtafels
|
||||
Name[ga]=Comhaid agus Comhadlanna
|
||||
Name[gl]=Ficheiros e cartafoles
|
||||
Name[gu]=ફાઇલો અને ડિરેક્ટરીઓ
|
||||
Name[he]=קבצים ותיקיות
|
||||
Name[hi]=फ़ाइलें तथा डिरेक्ट्रियाँ
|
||||
Name[hne]=फाइल अउ डिरेक्टरी
|
||||
Name[hr]=Datoteke i direktoriji
|
||||
Name[hu]=Fájlok és mappák
|
||||
Name[ia]=Files e directorios
|
||||
Name[id]=Berkas dan Direktori
|
||||
Name[is]=Skrár og möppur
|
||||
Name[it]=File e cartelle
|
||||
Name[ja]=ファイルとディレクトリ
|
||||
Name[kk]=Файлдар мен Қапшықтар
|
||||
Name[km]=ឯកសារ និងថត
|
||||
Name[kn]=ಕಡತ ಹಾಗೂ ಕಡಕಕೋಶಗಳು
|
||||
Name[ko]=파일과 디렉터리
|
||||
Name[lt]=Failai ir aplankai
|
||||
Name[lv]=Faili un Mapes
|
||||
Name[mai]=फाइल आओर निर्देशिका
|
||||
Name[mk]=Датотеки и папки
|
||||
Name[ml]=ഫയല്, തട്ട് എന്നിവ
|
||||
Name[mr]=फाईल व संचयीका
|
||||
Name[nb]=Filer og mapper
|
||||
Name[nds]=Dateien un Ornern
|
||||
Name[nl]=Bestanden en mappen
|
||||
Name[nn]=Filer og mapper
|
||||
Name[or]=ଫାଇଲ ଏବଂ ଡ଼ିରେକ୍ଟୋରୀଗୁଡ଼ିକ
|
||||
Name[pa]=ਫਾਇਲਾਂ ਅਤੇ ਡਾਇਰੈਕਟਰੀਆਂ
|
||||
Name[pl]=Pliki i katalogi
|
||||
Name[pt]=Ficheiros e Pastas
|
||||
Name[pt_BR]=Arquivos e pastas
|
||||
Name[ro]=Fișiere și directoare
|
||||
Name[ru]=Файлы и папки
|
||||
Name[si]=ගොනු සහ බහලුම්
|
||||
Name[sk]=Súbory a adresáre
|
||||
Name[sl]=Datoteke in mape
|
||||
Name[sr]=фајлови и фасцикле
|
||||
Name[sr@ijekavian]=фајлови и фасцикле
|
||||
Name[sr@ijekavianlatin]=fajlovi i fascikle
|
||||
Name[sr@latin]=fajlovi i fascikle
|
||||
Name[sv]=Filer och kataloger
|
||||
Name[ta]=கோப்புகளும் அடைவுகளும்
|
||||
Name[tg]=Проводник
|
||||
Name[th]=ดูแฟ้มและไดเรกทอรี
|
||||
Name[tr]=Dosyalar ve Dizinler
|
||||
Name[ug]=ھۆججەت ۋە مۇندەرىجەلەر
|
||||
Name[uk]=Файли і каталоги
|
||||
Name[vi]=Tập tin và thư mục
|
||||
Name[wa]=Fitchîs eyet ridants
|
||||
Name[x-test]=xxFiles and Directoriesxx
|
||||
Name[zh_CN]=文件和目录
|
||||
Name[zh_TW]=檔案與目錄
|
||||
Comment=Information about files and directories.
|
||||
Comment[ar]=معلومات عن الملفات والمجلدات.
|
||||
Comment[ast]=Información sobre los ficheros y direutorios.
|
||||
Comment[bg]=Данни за файлове и папки.
|
||||
Comment[bn]=ফাইল এবং ডিরেক্টরি সংক্রান্ত তথ্য।
|
||||
Comment[bs]=Podaci o datotekema i fasciklama.
|
||||
Comment[ca]=Informació quant a fitxers i directoris.
|
||||
Comment[ca@valencia]=Informació quant a fitxers i directoris.
|
||||
Comment[cs]=Informace o souborech a adresářích.
|
||||
Comment[csb]=Wëdowiédzô ò lopkach ë katalogach.
|
||||
Comment[da]=Information om filer og mapper.
|
||||
Comment[de]=Informationen über Dateien und Ordner.
|
||||
Comment[el]=Πληροφορίες για αρχεία και καταλόγους.
|
||||
Comment[en_GB]=Information about files and directories.
|
||||
Comment[eo]=Informoj pri dosieroj kaj dosierujoj
|
||||
Comment[es]=Información sobre los archivos y directorios.
|
||||
Comment[et]=Teave failide ja kataloogide kohta.
|
||||
Comment[eu]=Fitxategi eta direktorioei buruzko informazioa
|
||||
Comment[fi]=Tietoa tiedostosta ja hakemistoista.
|
||||
Comment[fr]=Informations sur les fichiers et les dossiers.
|
||||
Comment[fy]=Ynformaasje oer triemmen en triemtafels.
|
||||
Comment[ga]=Eolas faoi chomhaid agus faoi chomhadlanna.
|
||||
Comment[gl]=Información acerca de ficheiros e cartafoles.
|
||||
Comment[gu]=ફાઇલો અને ડિરેક્ટરીઓ માટે માહિતી
|
||||
Comment[he]=מידע על קבצים ותיקיות
|
||||
Comment[hi]=फ़ाइलों व डिरेक्ट्रियों के बारे में जानकारी
|
||||
Comment[hr]=Informacije o datotekama i direktorijima.
|
||||
Comment[hu]=Fájl- és mappajellemzők.
|
||||
Comment[ia]=Information re files e directorios.
|
||||
Comment[id]=Informasi tentang berkas dan direktori.
|
||||
Comment[is]=Upplýsingar um skrár og möppur.
|
||||
Comment[it]=Informazioni su file e cartelle.
|
||||
Comment[ja]=ファイルとディレクトリに関する情報
|
||||
Comment[kk]=Файлдар мен қыпшықтар туралы мәлімет
|
||||
Comment[km]=ព័ត៌មានអំពីឯកសារ និងថត ។
|
||||
Comment[kn]=ಕಡತಗಳು ಹಾಗೂ ಕಡತಕೋಶಗಳ ಬಗೆಗೆ ಮಾಹಿತಿ.
|
||||
Comment[ko]=파일과 디렉터리 정보입니다.
|
||||
Comment[lt]=Informacija apie failus ir aplankus.
|
||||
Comment[lv]=Informācija par failiem un mapēm.
|
||||
Comment[mk]=Информации за датотеки и папки.
|
||||
Comment[ml]=ഫയലുകളുടേയും തട്ടുകളുടേയും വിവരങ്ങള്.
|
||||
Comment[mr]=फाईल्स व संचयीका विषयी माहिती.
|
||||
Comment[nb]=Informasjon om filer og mapper.
|
||||
Comment[nds]=Informatschonen över Dateien un Ornern
|
||||
Comment[nl]=Informatie over bestanden en mappen.
|
||||
Comment[nn]=Informasjon om filer og mapper.
|
||||
Comment[pa]=ਫਾਇਲਾਂ ਅਤੇ ਡਾਇਰੈਕਟਰੀਆਂ ਵਾਸਤੇ ਜਾਣਕਾਰੀ
|
||||
Comment[pl]=Informacje o plikach i katalogach.
|
||||
Comment[pt]=Informação sobre os ficheiros e pastas.
|
||||
Comment[pt_BR]=Informações sobre pastas e arquivos.
|
||||
Comment[ro]=Informații despre fișiere și dosare.
|
||||
Comment[ru]=Сведения о файлах и папках для виджетов.
|
||||
Comment[si]=ගොනු හා බහාළුම් පිළිබඳ තොරතුරු
|
||||
Comment[sk]=Informácie o súboroch a adresároch.
|
||||
Comment[sl]=Podatki o datotekah in mapah.
|
||||
Comment[sr]=Подаци о фајловима и фасциклама.
|
||||
Comment[sr@ijekavian]=Подаци о фајловима и фасциклама.
|
||||
Comment[sr@ijekavianlatin]=Podaci o fajlovima i fasciklama.
|
||||
Comment[sr@latin]=Podaci o fajlovima i fasciklama.
|
||||
Comment[sv]=Information om filer och kataloger.
|
||||
Comment[tg]=Информация о папках и файлах для плазмоидов
|
||||
Comment[th]=ข้อมูลเกี่ยวกับแฟ้มและไดเรกทอรีต่าง ๆ
|
||||
Comment[tr]=Dosyalar ve dizinler hakkında bilgiler.
|
||||
Comment[ug]=ھۆججەت ۋە مۇندەرىجەلەر ھەققىدە ئۇچۇرلار
|
||||
Comment[uk]=Інформація про файли і каталоги.
|
||||
Comment[vi]=Thông tin về tất cả các tập tin và thư mục.
|
||||
Comment[wa]=Pondants et djondants so les ridants eyet les fitchîs.
|
||||
Comment[x-test]=xxInformation about files and directories.xx
|
||||
Comment[zh_CN]=关于文件和目录的信息。
|
||||
Comment[zh_TW]=關於檔案與目錄的資訊。
|
||||
X-KDE-ServiceTypes=Plasma/DataEngine
|
||||
Type=Service
|
||||
Icon=system-file-manager
|
||||
X-KDE-Library=plasma_engine_filebrowser
|
||||
|
||||
X-KDE-PluginInfo-Author=
|
||||
X-KDE-PluginInfo-Email=
|
||||
X-KDE-PluginInfo-Name=filebrowser
|
||||
X-KDE-PluginInfo-Version=
|
||||
X-KDE-PluginInfo-Website=
|
||||
X-KDE-PluginInfo-Category=
|
||||
X-KDE-PluginInfo-Depends=
|
||||
X-KDE-PluginInfo-License=
|
||||
|
||||
|
Loading…
Add table
Reference in a new issue