[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdebase/libkonq
From: David Faure <faure () kde ! org>
Date: 2005-01-26 23:57:41
Message-ID: 20050126235741.AC7871BC36 () office ! kde ! org
[Download RAW message or body]
CVS commit by faure:
Don't show actions (servicemenus) for trashed items nor trash.desktop by default.
BUG: 97607
M +25 -12 konq_popupmenu.cc 1.214
--- kdebase/libkonq/konq_popupmenu.cc #1.213:1.214
@@ -599,4 +599,5 @@ void KonqPopupMenu::setup(KonqPopupFlags
PopupServices s;
+ KURL urlForServiceMenu( m_lstItems.first()->url() );
// 1 - Look for builtin and user-defined services
@@ -610,4 +611,9 @@ void KonqPopupMenu::setup(KonqPopupFlags
const QString priority = cfg.readEntry("X-KDE-Priority");
const QString submenuName = cfg.readEntry( "X-KDE-Submenu" );
+ if ( cfg.readEntry("Type") == "Link" ) {
+ urlForServiceMenu = cfg.readEntry("URL");
+ // TODO: Do we want to make all the actions apply on the target
+ // of the .desktop file instead of the .desktop file itself?
+ }
ServiceList* list = s.selectList( priority, submenuName );
(*list) = KDEDesktopMimeType::userDefinedServices( path, cfg, url.isLocalFile() );
@@ -667,5 +673,12 @@ void KonqPopupMenu::setup(KonqPopupFlags
{
const QString protocol = cfg.readEntry( "X-KDE-Protocol" );
- if ( protocol != m_sViewURL.protocol() )
+ if ( protocol != urlForServiceMenu.protocol() )
+ continue;
+ }
+ else if ( urlForServiceMenu.protocol() == "trash" )
+ {
+ // Require servicemenus for the trash to ask for protocol=trash explicitely.
+ // Trashed files aren't supposed to be available for actions.
+ // One might want a servicemenu for trash.desktop itself though.
continue;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic