From kde-commits Fri Jun 03 13:54:30 2005 From: =?utf-8?q?K=C3=A9vin=20Ottens?= Date: Fri, 03 Jun 2005 13:54:30 +0000 To: kde-commits Subject: KDE/kdebase/libkonq Message-Id: <1117806870.424389.11532.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=111780689812297 SVN commit 421585 by ervin: Now the context menu used in system:/ or media:/ is on par with what you would obtain if you use it for file:/. Moreover it permit to empty the trashbin from system:/. This commit also fix BR95662 (which was only adressing system:/ root). "approved by dfaure"(tm) BUG:95662 M +11 -5 konq_popupmenu.cc --- trunk/KDE/kdebase/libkonq/konq_popupmenu.cc #421584:421585 @@ -343,7 +343,9 @@ bool isDirectory = S_ISDIR(mode); bool bTrashIncluded = false; bool mediaFiles = false; - bool isLocal = m_lstItems.first()->isLocalFile(); + bool isLocal = m_lstItems.first()->isLocalFile() + || m_lstItems.first()->url().protocol()=="media" + || m_lstItems.first()->url().protocol()=="system"; bool isTrashLink = false; m_lstPopupURLs.clear(); int id = 0; @@ -384,7 +386,8 @@ if ( mimeTypeList.findIndex( (*it)->mimetype() ) == -1 ) mimeTypeList << (*it)->mimetype(); - if ( isLocal && !url.isLocalFile() ) + if ( isLocal && !url.isLocalFile() + && url.protocol()!="media" && url.protocol()!="system") isLocal = false; if ( !bTrashIncluded && @@ -421,10 +424,13 @@ KSimpleConfig cfg( firstPopupURL.path(), true ); cfg.setDesktopGroup(); isTrashLink = ( cfg.readEntry("Type") == "Link" && cfg.readEntry("URL") == "trash:/" ); - if ( isTrashLink ) { - sDeleting = false; - } + } else { + isTrashLink = (firstPopupURL==KURL("system:/trash")); } + + if ( isTrashLink ) { + sDeleting = false; + } } const bool isSingleLocal = m_lstItems.count() == 1 && isLocal;