You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			40 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C++
		
	
			
		
		
	
	
			40 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C++
		
	
#include "dbusinterface.h"
 | 
						|
 | 
						|
#include <QProcess>
 | 
						|
#include <QDBusConnection>
 | 
						|
#include <QDBusInterface>
 | 
						|
#include <QDBusConnectionInterface>
 | 
						|
 | 
						|
DBusInterface::DBusInterface()
 | 
						|
{
 | 
						|
    QDBusConnection::sessionBus().registerObject("/org/freedesktop/FileManager1", this,
 | 
						|
                                                 QDBusConnection::ExportScriptableContents | QDBusConnection::ExportAdaptors);
 | 
						|
    QDBusConnectionInterface *sessionInterface = QDBusConnection::sessionBus().interface();
 | 
						|
 | 
						|
    if (sessionInterface) {
 | 
						|
        sessionInterface->registerService(QStringLiteral("org.freedesktop.FileManager1"), QDBusConnectionInterface::QueueService);
 | 
						|
    }
 | 
						|
}
 | 
						|
 | 
						|
void DBusInterface::ShowFolders(const QStringList &uriList, const QString &startUpId)
 | 
						|
{
 | 
						|
    Q_UNUSED(startUpId);
 | 
						|
 | 
						|
    QProcess::startDetached("cutefish-filemanager", uriList);
 | 
						|
}
 | 
						|
 | 
						|
void DBusInterface::ShowItems(const QStringList &uriList, const QString &startUpId)
 | 
						|
{
 | 
						|
    Q_UNUSED(startUpId);
 | 
						|
 | 
						|
    QProcess::startDetached("cutefish-filemanager", uriList);
 | 
						|
}
 | 
						|
 | 
						|
void DBusInterface::ShowItemProperties(const QStringList &uriList, const QString &startUpId)
 | 
						|
{
 | 
						|
    Q_UNUSED(uriList);
 | 
						|
    Q_UNUSED(startUpId);
 | 
						|
 | 
						|
    // TODO
 | 
						|
}
 |