mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
forwardport r757231
Make it possible to run applications from the applications:/ kioslave again. svn path=/trunk/KDE/kdebase/apps/; revision=757239
This commit is contained in:
parent
dc62d3840b
commit
7bdfc26009
1 changed files with 10 additions and 4 deletions
|
@ -277,6 +277,14 @@ void DolphinPart::slotRequestItemInfo(const KFileItem& item)
|
||||||
|
|
||||||
void DolphinPart::slotItemTriggered(const KFileItem& item)
|
void DolphinPart::slotItemTriggered(const KFileItem& item)
|
||||||
{
|
{
|
||||||
|
KParts::OpenUrlArguments args;
|
||||||
|
args.setMimeType(item.mimetype());
|
||||||
|
|
||||||
|
// Ideally, konqueror should be changed to not require trustedSource for directory views,
|
||||||
|
// since the idea was not to need BrowserArguments for non-browser stuff...
|
||||||
|
KParts::BrowserArguments browserArgs;
|
||||||
|
browserArgs.trustedSource = true;
|
||||||
|
|
||||||
// MMB click support.
|
// MMB click support.
|
||||||
// TODO: this doesn't work, mouseButtons() is always 0.
|
// TODO: this doesn't work, mouseButtons() is always 0.
|
||||||
// Issue N176832 for the missing QAIV signal; task 177399
|
// Issue N176832 for the missing QAIV signal; task 177399
|
||||||
|
@ -284,9 +292,7 @@ void DolphinPart::slotItemTriggered(const KFileItem& item)
|
||||||
if (QApplication::mouseButtons() & Qt::MidButton) {
|
if (QApplication::mouseButtons() & Qt::MidButton) {
|
||||||
kDebug() << "MMB!!" << item.mimetype();
|
kDebug() << "MMB!!" << item.mimetype();
|
||||||
if (item.mimeTypePtr()->is("inode/directory")) {
|
if (item.mimeTypePtr()->is("inode/directory")) {
|
||||||
KParts::OpenUrlArguments args;
|
emit m_extension->createNewWindow(item.url(), args);
|
||||||
args.setMimeType( item.mimetype() );
|
|
||||||
emit m_extension->createNewWindow( item.url(), args );
|
|
||||||
} else {
|
} else {
|
||||||
kDebug() << "run()";
|
kDebug() << "run()";
|
||||||
item.run();
|
item.run();
|
||||||
|
@ -294,7 +300,7 @@ void DolphinPart::slotItemTriggered(const KFileItem& item)
|
||||||
} else {
|
} else {
|
||||||
// Left button. [Right button goes to slotOpenContextMenu before triggered can be emitted]
|
// Left button. [Right button goes to slotOpenContextMenu before triggered can be emitted]
|
||||||
kDebug() << "LMB";
|
kDebug() << "LMB";
|
||||||
emit m_extension->openUrlRequest(item.url());
|
emit m_extension->openUrlRequest(item.url(), args, browserArgs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue