Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.2
kdebase4-runtime
4_3_BRANCH.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 4_3_BRANCH.diff of Package kdebase4-runtime
package: kdebase-runtime-4.3.5.tar.bz2 kdemod: kdebase/runtime --- BRANCH_STATUS +++ BRANCH_STATUS @@ -0,0 +1,2 @@ +current HEAD: 1080100 +svn di between //tags/KDE/4.3.5/kdebase/runtime and //branches/KDE/4.3/kdebase/runtime --- kioslave/desktop/desktopnotifier.h +++ kioslave/desktop/desktopnotifier.h @@ -1,5 +1,5 @@ /* This file is part of the KDE Project - Copyright (C) 2008 Fredrik Höglund <fredrik@kde.org> + Copyright (C) 2008, 2009 Fredrik Höglund <fredrik@kde.org> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -20,15 +20,26 @@ #define DESKTOPNOTIFIER_H #include <kdedmodule.h> +#include <QtDBus/QtDBus> + +class KDirWatch; class DesktopNotifier : public KDEDModule { Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.kde.DesktopNotifier") + public: DesktopNotifier(QObject* parent, const QList<QVariant>&); +public slots: + Q_SCRIPTABLE Q_NOREPLY void watchDir(const QString &path); + private slots: void dirty(const QString &path); + +private: + KDirWatch *dirWatch; }; #endif --- kioslave/desktop/kio_desktop.h +++ kioslave/desktop/kio_desktop.h @@ -1,5 +1,5 @@ /* This file is part of the KDE project - Copyright (C) 2008 Fredrik Höglund <fredrik@kde.org> + Copyright (C) 2008, 2009 Fredrik Höglund <fredrik@kde.org> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -33,6 +33,7 @@ void checkLocalInstall(); QString desktopFile(KIO::UDSEntry&) const; virtual bool rewriteUrl(const KUrl &url, KUrl &newUrl); + virtual void listDir(const KUrl &url); virtual void prepareUDSEntry(KIO::UDSEntry &entry, bool listing=false) const; virtual void rename(const KUrl &, const KUrl &, KIO::JobFlags flags); }; --- kioslave/desktop/desktopnotifier.cpp +++ kioslave/desktop/desktopnotifier.cpp @@ -1,5 +1,5 @@ /* This file is part of the KDE Project - Copyright (C) 2008 Fredrik Höglund <fredrik@kde.org> + Copyright (C) 2008, 2009 Fredrik Höglund <fredrik@kde.org> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -36,13 +36,18 @@ DesktopNotifier::DesktopNotifier(QObject *parent, const QList<QVariant> &) : KDEDModule(parent) { - KDirWatch *dirWatch = new KDirWatch(this); - dirWatch->addDir(KGlobalSettings::desktopPath(), KDirWatch::WatchSubDirs); + dirWatch = new KDirWatch(this); + dirWatch->addDir(KGlobalSettings::desktopPath()); dirWatch->addDir(KGlobal::dirs()->localxdgdatadir() + "Trash/files"); connect(dirWatch, SIGNAL(dirty(QString)), SLOT(dirty(QString))); } +void DesktopNotifier::watchDir(const QString &path) +{ + dirWatch->addDir(path); +} + void DesktopNotifier::dirty(const QString &path) { Q_UNUSED(path) --- kioslave/desktop/kio_desktop.cpp +++ kioslave/desktop/kio_desktop.cpp @@ -1,5 +1,5 @@ /* This file is part of the KDE project - Copyright (C) 2008 Fredrik Höglund <fredrik@kde.org> + Copyright (C) 2008, 2009 Fredrik Höglund <fredrik@kde.org> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -157,6 +157,17 @@ return true; } +void DesktopProtocol::listDir(const KUrl &url) +{ + KIO::ForwardingSlaveBase::listDir(url); + + KUrl actual; + rewriteUrl(url, actual); + + QDBusInterface kded("org.kde.kded", "/modules/desktopnotifier", "org.kde.DesktopNotifier"); + kded.call("watchDir", actual.path()); +} + QString DesktopProtocol::desktopFile(KIO::UDSEntry &entry) const { const QString name = entry.stringValue(KIO::UDSEntry::UDS_NAME);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor