Summary: | cannot delete file inside tar archive | ||
---|---|---|---|
Product: | [Applications] dolphin | Reporter: | Ivan D Vasin <ivan> |
Component: | general | Assignee: | Dolphin Bug Assignee <dolphin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | frank78ac |
Priority: | NOR | Keywords: | investigated, regression, reproducible |
Version: | 2.0 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kde-baseapps/4cd231838dc84b0fd17431374e9b1b42f55c2c4b | Version Fixed In: | 4.11 |
Description
Ivan D Vasin
2012-02-13 19:09:06 UTC
Thanks for the bug report, I can reproduce the issue. Seems to be a regression - in earlier versions, the 'delete' action was greyed out (because it's really not intended that items can be removed from an archive inside Dolphin). Hm, I cannot reproduce it with 4.8.3 + master. @Frank: Would be great if you could also try it again in your environment with the recent versions to be sure. Thanks :-) I still can reproduce this in a 4.8 branch checkout (updated today), but not in master and neither in the 4.8.2 packages by openSuse. Strange. Resetting assignee to default as per bug #305719 I just check this using KDE SC 4.9 . The "Delete" action (now provided as a service) is grayed out when showing the context menu on some file within the archive. However, I notice another problem. If the delete service is disabled, the "Move to Trash" action is active in the context menu. It should be still grayed out. Thanks Jekyll for finding out this important detail! This pointed me to the piece of code which contains the bug. It seems that this is due to the use of "m_removeAction" in DolphinContextMenu, an action which is used if "Show delete" is disabled. In DolphinContextMenu::updateRemoveAction(), the text, shortcut, etc. of this action is either set to "move to trash" or "delete" depending on if Shift is pressed or not. The missing piece is to set the "enabled" state of that action properly. Hm, just adding m_removeAction->setEnabled(action->isEnabled()); in DolphinContextMenu::updateRemoveAction() indeed fixes the problem, but causes a new bug: When right-clicking a writable file for the first time, the "Move to trash" action is disabled, but it's enabled when opening the context menu again after that. It seems that the context menu is initialised before DolphinMainWindow::updateEditActions() had a chance to find out if the location is writable or not. Looks like I have to find a better solution. Git commit 4cd231838dc84b0fd17431374e9b1b42f55c2c4b by Emmanuel Pescosta. Committed on 22/06/2013 at 12:04. Pushed by emmanuelp into branch 'master'. Update the "Move to Trash" action's and the "Delete" action's enabled state in the context menu for read only files/folders (also archives). FIXED-IN: 4.11 REVIEW: 111160 M +2 -1 dolphin/src/dolphinremoveaction.cpp M +6 -0 dolphin/src/views/dolphinview.cpp http://commits.kde.org/kde-baseapps/4cd231838dc84b0fd17431374e9b1b42f55c2c4b |