[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.0/kdebase/apps
From: David Faure <faure () kde ! org>
Date: 2008-01-04 14:40:36
Message-ID: 1199457636.090005.595.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 757231 by dfaure:
Make it possible to run applications from the applications:/ kioslave again.
M +10 -4 dolphin/src/dolphinpart.cpp
M +5 -4 konqueror/src/konqmainwindow.cpp
--- branches/KDE/4.0/kdebase/apps/dolphin/src/dolphinpart.cpp #757230:757231
@@ -277,6 +277,14 @@
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.
// TODO: this doesn't work, mouseButtons() is always 0.
// Issue N176832 for the missing QAIV signal; task 177399
@@ -284,9 +292,7 @@
if (QApplication::mouseButtons() & Qt::MidButton) {
kDebug() << "MMB!!" << item.mimetype();
if (item.mimeTypePtr()->is("inode/directory")) {
- KParts::OpenUrlArguments args;
- args.setMimeType( item.mimetype() );
- emit m_extension->createNewWindow( item.url(), args );
+ emit m_extension->createNewWindow(item.url(), args);
} else {
kDebug() << "run()";
item.run();
@@ -294,7 +300,7 @@
} else {
// Left button. [Right button goes to slotOpenContextMenu before triggered \
can be emitted] kDebug() << "LMB";
- emit m_extension->openUrlRequest(item.url());
+ emit m_extension->openUrlRequest(item.url(), args, browserArgs);
}
}
--- branches/KDE/4.0/kdebase/apps/konqueror/src/konqmainwindow.cpp #757230:757231
@@ -265,13 +265,13 @@
setStandardToolBarMenuEnabled( true );
createGUI( 0 );
-
+
m_combo->setParent( toolBar("locationToolBar") );
m_combo->setFont( KGlobalSettings::generalFont() );
m_combo->show();
checkDisableClearButton();
-
+
connect(toolBarMenuAction(),SIGNAL(activated()),this,SLOT(slotForceSaveMainWindowSettings()) \
);
if ( !m_toggleViewGUIClient->empty() )
@@ -599,7 +599,7 @@
KMessageBox::error( this, i18n("There appears to be a configuration \
error. You have associated Konqueror with %1, but it cannot handle this file type.", \
mimeType)); return;
}
- if ( !url.isLocalFile() && KonqRun::isTextExecutable( mimeType ) )
+ if ( !url.isLocalFile() && !trustedSource && KonqRun::isTextExecutable( \
mimeType ) ) mimeType = "text/plain"; // view, don't execute
// Remote URL: save or open ?
QString protClass = KProtocolInfo::protocolClass(url.protocol());
@@ -615,7 +615,8 @@
KUrl::List lst;
lst.append(url);
//kDebug(1202) << "Got offer " << (offer ? offer->name().toLatin1() \
: "0");
- if ( ( trustedSource || KonqRun::allowExecution( mimeType, url ) ) \
&& + const bool allowExecution = trustedSource || \
KParts::BrowserRun::allowExecution( mimeType, url ); + if ( \
allowExecution &&
( KonqRun::isExecutable( mimeType ) || !offer || !KRun::run( \
*offer, lst, this ) ) ) {
setLocationBarURL( oldLocationBarURL ); // Revert to previous \
locationbar URL
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic