Commit bf365c81 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

[mediaframe applet] Support creation of widget on file drop on containment

Summary: Depends: D12287

Test Plan:
Dropping an image file (of listed MIME type) or a folder adds the Media
Frame widget to list of widgets proposed to be added for that file/folder,
selecting it then creates an instance with the given file/folder being set
as source.

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D12288
parent 8c6aa4db
......@@ -430,4 +430,16 @@ Item {
}
}
Connections {
target: plasmoid
onExternalData: {
var type = items.isDir(data) ? "folder" : "file";
var item = {
"path": data,
"type": type
};
addItem(item);
}
}
}
......@@ -69,6 +69,6 @@ X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL-2.0+
X-KDE-PluginInfo-EnabledByDefault=true
X-Plasma-StandAloneApp=true
X-Plasma-DropMimeTypes=inode/directory,image/jpeg,image/png,image/svg+xml,image/svg+xml-compressed,image/bmp
X-Plasma-API=declarativeappletscript
X-Plasma-MainScript=ui/main.qml
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment