-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108802/
-----------------------------------------------------------

(Updated May 13, 2013, 1:02 p.m.)


Review request for KDE Base Apps, David Faure and Frank Reininghaus.


Changes
-------

Here is the updated diff based on your feedback. 

There is only one slight behavioral change because of the removal of the 
parameter from update that allowed us to simulate the shiftKeyPressed state. I 
do not think this behavior change is worth moving the code that checked for 
Shift key press into the calling code is worth it. Anyhow, the behavior change 
is if a user presses both Shift keys while the context menu is visible, lets 
one of them go and presses it again. The action no longer changes where as 
before it did. To make it clear here is a description of what the behavior was 
previously:

- Press one Shift key, action changes to "Delete"
- Press the second Shift key while still holding down the first Shift key and 
the action goes back "Move to Trash"
- Release the second Shift key, nothing changes.
- Press the second shift key again and the action changes to "Delete".

The difference is that last behavior. With this code change, pressing the 
second Shift key does nothing until you release the first Shift key.


Description
-------

This patch fixes DolphinPart such that the "Delete/Move To Trash" actions are 
automatically toggled if the user presses the Shift key and allows  
https://git.reviewboard.kde.org/r/107509/ to be applied.

The code is completely based on what Dolphin's context menu does. Even though 
this works as planned, I still have reservations about the use of 
KModifierKeyInfo since every key press event from any application is sent to 
the application that connects to its signals. In my code and unlike what is 
done in Dolphin's context menu, I try to mitigate the impact of that by 
ignoring the signal when the part does not have the focus. Still if there is a 
better way to capture key press events at the part level I would like to use 
that instead. Any ideas ?


Diffs (updated)
-----

  dolphin/src/CMakeLists.txt ffb232c 
  dolphin/src/dolphincontextmenu.h 1c65fab 
  dolphin/src/dolphincontextmenu.cpp 89a169f 
  dolphin/src/dolphinpart.h 7881ded 
  dolphin/src/dolphinpart.cpp 627ba79 
  dolphin/src/dolphinremoveaction.h PRE-CREATION 
  dolphin/src/dolphinremoveaction.cpp PRE-CREATION 

Diff: http://git.reviewboard.kde.org/r/108802/diff/


Testing
-------


Thanks,

Dawit Alemayehu

Reply via email to