X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/27e3907a3daf9a63d05c00a0ff746de6cfdf2bdf..76a46fd9094b17eb99e8a42cca8562fdc0b3814c:/src/global.h diff --git a/src/global.h b/src/global.h index 16305eafe..daf86134e 100644 --- a/src/global.h +++ b/src/global.h @@ -22,6 +22,9 @@ #include #include +#include + +class OrgKdeDolphinMainWindowInterface; namespace Dolphin { QList validateUris(const QStringList& uriList); @@ -44,14 +47,22 @@ namespace Dolphin { /** * Attaches URLs to an existing Dolphin instance if possible. - * Returns true if URLs were successfully attached + * If @p preferredService is a valid dbus service, it will be tried first. + * @p preferredService needs to support the org.kde.dolphin.MainWindow dbus interface with the /dolphin/Dolphin_1 path. + * Returns true if the URLs were successfully attached. + */ + bool attachToExistingInstance(const QList& inputUrls, bool openFiles, bool splitView, const QString& preferredService = QString()); + + /** + * Returns a QVector with all GUI-capable Dolphin instances */ - bool attachToExistingInstance(const QList& urls, bool openFiles, bool splitView, const QString& preferredService = QString()); + QVector, QStringList>> dolphinGuiInstances(const QString& preferredService); /** * TODO: Move this somewhere global to all KDE apps, not just Dolphin */ const int VERTICAL_SPACER_HEIGHT = 18; + const int LAYOUT_SPACING_SMALL = 2; } #endif //GLOBAL_H