mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
Embed it, when there's no associated app for this mimetype anyway.
This makes Waldo's X-KDE-AutoEmbed commit not-so-necessary-anymore ;) svn path=/trunk/kdebase/konqueror/; revision=173330
This commit is contained in:
parent
9508f6f32b
commit
f7c5b52810
1 changed files with 14 additions and 9 deletions
|
@ -84,9 +84,23 @@ KonqViewFactory KonqFactory::createView( const QString &serviceType,
|
||||||
{
|
{
|
||||||
kdDebug(1202) << "Trying to create view for \"" << serviceType << "\"" << endl;
|
kdDebug(1202) << "Trying to create view for \"" << serviceType << "\"" << endl;
|
||||||
|
|
||||||
|
// We need to get those in any case
|
||||||
|
KTrader::OfferList offers, appOffers;
|
||||||
|
|
||||||
|
// Query the trader
|
||||||
|
getOffers( serviceType, &offers, &appOffers );
|
||||||
|
|
||||||
|
if ( partServiceOffers )
|
||||||
|
(*partServiceOffers) = offers;
|
||||||
|
if ( appServiceOffers )
|
||||||
|
(*appServiceOffers) = appOffers;
|
||||||
|
|
||||||
// We ask ourselves whether to do it or not only if no service was specified.
|
// We ask ourselves whether to do it or not only if no service was specified.
|
||||||
// If it was (from the View menu or from RMB + Embedding service), just do it.
|
// If it was (from the View menu or from RMB + Embedding service), just do it.
|
||||||
forceAutoEmbed |= !serviceName.isEmpty();
|
forceAutoEmbed |= !serviceName.isEmpty();
|
||||||
|
// Or if we have no associated app anyway, then embed.
|
||||||
|
forceAutoEmbed |= appOffers.isEmpty() && !offers.isEmpty();
|
||||||
|
|
||||||
if ( ! forceAutoEmbed )
|
if ( ! forceAutoEmbed )
|
||||||
{
|
{
|
||||||
if ( ! KonqFMSettings::settings()->shouldEmbed( serviceType ) )
|
if ( ! KonqFMSettings::settings()->shouldEmbed( serviceType ) )
|
||||||
|
@ -96,15 +110,6 @@ KonqViewFactory KonqFactory::createView( const QString &serviceType,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// We need to get those in any case
|
|
||||||
KTrader::OfferList offers;
|
|
||||||
|
|
||||||
// Query the trader
|
|
||||||
getOffers( serviceType, &offers, appServiceOffers );
|
|
||||||
|
|
||||||
if ( partServiceOffers )
|
|
||||||
(*partServiceOffers) = offers;
|
|
||||||
|
|
||||||
KService::Ptr service = 0L;
|
KService::Ptr service = 0L;
|
||||||
|
|
||||||
// Look for this service
|
// Look for this service
|
||||||
|
|
Loading…
Reference in a new issue