<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>307254</bug_id>
          
          <creation_ts>2012-09-23 08:31:15 +0000</creation_ts>
          <short_desc>Right click menu &apos;move to trash&apos; action shown when shift is held and &apos;delete&apos; action is included</short_desc>
          <delta_ts>2013-06-09 09:55:55 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>dolphin</product>
          <component>general</component>
          <version>2.1</version>
          <rep_platform>Ubuntu</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David">dwedelich</reporter>
          <assigned_to name="Dolphin Bug Assignee">dolphin-bugs-null</assigned_to>
          
          
          <cf_commitlink>http://commits.kde.org/kde-baseapps/fda03a10e725ba133a32a032f7f456d839e0d800</cf_commitlink>
          <cf_versionfixedin>4.11.0</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1299718</commentid>
    <comment_count>0</comment_count>
    <who name="David">dwedelich</who>
    <bug_when>2012-09-23 08:31:15 +0000</bug_when>
    <thetext>Holding shift while the right-click menu is displayed turns the &apos;Move to Trash&apos; action into a &apos;Delete&apos; action.  This is all working correctly, and it is a feature that I really appreciate.

The issue only happens when the &apos;Delete&apos; action is added to the context menu through the configuration options (Settings-&gt;Configure Dolphin...-&gt;Services then check &apos;Delete&apos;).  Then, the &apos;Move to Trash&apos; option does not change visually in the right-click menu when shift is held, but clicking &apos;Move to Trash&apos; while shift is held deletes the file rather than moving it to the trash.

As a solution, I see two options:
1. Even when the delete action is in the right click menu, change the &apos;Move to Trash&apos; item to a &apos;Delete&apos; item when shift is held.  This would result in two &apos;Delete&apos; actions being shown if shift is held.
2. When there is already a &apos;Delete&apos; item in the right-click menu, simply remove the &apos;Move to Trash&apos; item when shift is held.

Reproducible: Always

Steps to Reproduce:
1.  Add the &apos;Delete&apos; item to the right click menu (Settings-&gt;Configure Dolphin...-&gt;Services then check &apos;Delete&apos;)

2. Right click on a file (or select several files and then right click)

3. Hold shift button down
Actual Results:  
The &apos;Move to Trash&apos; icon does not change visually, but the behavior changes so that clicking on the &apos;Move to Trash&apos; icon deletes the item instead of moving it to the trash.

Expected Results:  
Either the &apos;Move to Trash&apos; item should change to a &apos;Delete&apos; item when shift is held, or the &apos;Move to Trash&apos; item should be removed when shift is held.

Note that without the &apos;Delete&apos; item added to the menu through the configuration, the &apos;Move to Trash&apos; item correctly changes into a &apos;Delete&apos; item when shift is held.

I&apos;m using KDE 4.9.1 in pre-release Kubuntu 12.10 (quantal) on an ASUS Eee 1215b.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1319308</commentid>
    <comment_count>1</comment_count>
    <who name="Frank Reininghaus">frank78ac</who>
    <bug_when>2012-11-29 07:52:34 +0000</bug_when>
    <thetext>Thanks for the bug report, I can confirm the problem. DolphinContextMenu does not update the text if both actions are shown (which is good), but unfortunately, also DolphinViewActionHandler::slotTrashActivated() tries to be clever and deletes the item(s) if shift is pressed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1319311</commentid>
    <comment_count>2</comment_count>
    <who name="Frank Reininghaus">frank78ac</who>
    <bug_when>2012-11-29 08:07:03 +0000</bug_when>
    <thetext>Suggested fix at https://git.reviewboard.kde.org/r/107509/.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1375214</commentid>
    <comment_count>3</comment_count>
    <who name="Frank Reininghaus">frank78ac</who>
    <bug_when>2013-06-09 09:55:55 +0000</bug_when>
    <thetext>Git commit fda03a10e725ba133a32a032f7f456d839e0d800 by Frank Reininghaus.
Committed on 09/06/2013 at 11:53.
Pushed by freininghaus into branch &apos;master&apos;.

Do not delete files when Shift-clicking &quot;Trash&quot;

Thanks to Dawit Alemayehu for making this fix possible with commit
8e023ae9e5051cb7b81af86a178e37c1f2c5da94 !
FIXED-IN: 4.11.0

M  +1    -8    dolphin/src/views/dolphinviewactionhandler.cpp

http://commits.kde.org/kde-baseapps/fda03a10e725ba133a32a032f7f456d839e0d800</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>