From 48635e6343601457bb1ae1e1a489ebce81266fab Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Mon, 8 Apr 2019 12:16:10 +0900 Subject: Added trash size limit property page link to trash folder right click popup menu and trash applet panel. Added a new konqueror side bar button to directly display the contents of the trash bin. This relates to bug 1923. Signed-off-by: Michele Calgaro --- tdeioslave/trash/ktrashpropsdlgplugin.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'tdeioslave/trash/ktrashpropsdlgplugin.cpp') diff --git a/tdeioslave/trash/ktrashpropsdlgplugin.cpp b/tdeioslave/trash/ktrashpropsdlgplugin.cpp index 87a70ae45..1677c282a 100644 --- a/tdeioslave/trash/ktrashpropsdlgplugin.cpp +++ b/tdeioslave/trash/ktrashpropsdlgplugin.cpp @@ -55,14 +55,17 @@ KTrashPropsDlgPlugin::KTrashPropsDlgPlugin( KPropertiesDialog *dialog, const cha return; KFileItem *item = dialog->items().first(); + KURL itemUrl = item->url(); + if (!(itemUrl.protocol() == "trash" && item->name() == ".")) + { + // Check for a desktop file in case the protocol is not "trash" + if (!KPropsDlgPlugin::isDesktopFile(item)) + return; - if ( !KPropsDlgPlugin::isDesktopFile( item ) ) - return; - - KDesktopFile deskFile( item->url().path(), true /* readonly */ ); - - if ( deskFile.readURL() != "trash:/" ) - return; + KDesktopFile deskFile( itemUrl.path(), true /* readonly */ ); + if ( deskFile.readURL() != "trash:/" ) + return; + } TDEGlobal::locale()->insertCatalogue( "tdeio_trash" ); -- cgit v1.2.3