Bug 101839 - "Move to trash" is unavailable in list view when in media IOslave
Summary: "Move to trash" is unavailable in list view when in media IOslave
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-18 21:04 UTC by starbase218
Modified: 2005-03-18 23:06 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description starbase218 2005-03-18 21:04:01 UTC
Version:            (using KDE KDE 3.4.0)
Installed from:    Unlisted Binary Package
OS:                OpenBSD

The action "Move to trash" is greyed out in the context menu in media:/ locations when and any of the list views is used. The action is available in icon view mode or when using regular URL's.
Comment 1 groot 2005-03-18 21:31:29 UTC
Confirmed on FreeBSD. I use, say, "media:/ar0s1a" and set the view mode to plain Icon View; RMB on the file COPYRIGHT shows I can move it to trash. Switch view mode to List Info View, RMB on same file shows move to trash as a disabled action.
Comment 2 starbase218 2005-03-18 21:35:02 UTC
Correction: I'm not running OpenBSD, but Kubuntu 5.4. I must have accidentally selected OpenBSD because I used backspace, which I had mapped to the Back button in khotkeys.
Comment 3 Pascal Létourneau 2005-03-18 23:06:00 UTC
CVS commit by pletourn: 

Enable the trash action inside media:/
BUG:101839


  M +6 -5      konq_listview.cc   1.223.2.1


--- kdebase/konqueror/listview/konq_listview.cc  #1.223:1.223.2.1
@@ -56,7 +56,5 @@ KonqListViewFactory::KonqListViewFactory
 KonqListViewFactory::~KonqListViewFactory()
 {
-  if ( s_instance )
     delete s_instance;
-  if ( s_defaultViewProps )
     delete s_defaultViewProps;
 
@@ -118,4 +116,5 @@ void ListViewBrowserExtension::updateAct
   int canCopy = 0;
   int canDel = 0;
+  int canTrash = 0;
   bool bInTrash = false;
   KFileItemList lstItems = m_listView->selectedFileItems();
@@ -129,9 +128,11 @@ void ListViewBrowserExtension::updateAct
     if (  KProtocolInfo::supportsDeleting(  url ) )
       canDel++;
+    if ( !item->localPath().isEmpty() )
+      canTrash++;
   }
 
   emit enableAction( "copy", canCopy > 0 );
   emit enableAction( "cut", canDel > 0 );
-  emit enableAction( "trash", canDel > 0 && !bInTrash && m_listView->url().isLocalFile() );
+  emit enableAction( "trash", canDel > 0 && !bInTrash && canDel == canTrash );
   emit enableAction( "del", canDel > 0 );
   emit enableAction( "properties", lstItems.count() > 0 && KPropertiesDialog::canDisplay( lstItems ) );