┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphincontextmenu.cpp
AgeCommit message (Collapse)Author
2019-06-07[DolphinContextMenu] Restore check for whether place already existsKai Uwe Broulik
Now that we have a places singleton it adds no real overhead. Differential Revision: https://phabricator.kde.org/D21600
2019-04-09Don't show "Open With" menu items for empty directoriesNate Graham
Summary: Any app that registers itself as able to open directories generally can't do anything useful with an empty directory. So, don't show the {nav Open With} menu items for them. Test Plan: Before: {F6759793} After: {F6759794} The {nav Open With} items still appear for non-empty directories. Reviewers: #dolphin, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: trmdi, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D20396
2018-12-10Add an icon for "restore" actionShubham Jangra
Summary: Before: {F6469103} After: {F6469104} Test Plan: 1. Go to Trash 2. Right click any item. Reviewers: ngraham Reviewed By: ngraham Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D17490
2018-12-10Revert backShubham Jangra
2018-12-10Add an icon for "restore" actionShubham Jangra
Summary: Before: {F6469103} After: {F6469104} Test Plan: 1. Go to Trash 2. Right click any item. Reviewers: ngraham Reviewed By: ngraham Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D17490
2018-12-06[context menu] Restore separator above 'Properties' that went missingNate Graham
2018-11-19Show the Delete context menu entry even when disabledThomas Surrel
Summary: This is consistent with the HIG, and the 'Rename' entry in the context menu already behaves like that. Test Plan: Right click on /home. The context menu should contained the 'Delete' entry, but it should be disabled. Reviewers: #dolphin, #vdg, ngraham Reviewed By: #dolphin, #vdg, ngraham Subscribers: ngraham, romangg, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D17012
2018-09-05[DolphinContextMenu] Use the view's already existing root KFileItemKai Uwe Broulik
Saves creating a new KFileItem from scratch which stats the file. Only when the root item isn't available (as can happen when you're currently looking at an non-existing directory) will it create a new KFileItem Differential Revision: https://phabricator.kde.org/D15266
2018-07-18Fixes small memory leak in DolphinContextMenuDavid Hallas
Summary: When DolphinContextMenu::baseFileItem is called a KFileItem is allocated and stored in DolphinContextMenu::m_baseFileItem, which is of type KFileItem*, but the destructor failed to delete this. Test Plan: This leak was found using Address Sanitizer Reviewers: broulik, elvisangelaccio Reviewed By: broulik, elvisangelaccio Subscribers: ngraham, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D14178
2018-06-02Add 'Sort By' and 'View Mode' into Dolphin file context menusNerdopolis Turfwalker
Summary: This adds the 'Sort By' and 'View Mode' options into the context menu of Dolphin within the file browser. I keep looking for these option (especially sort by) in the Context Menu, and keep forgetting to go to the menu. It also makes the order of "View Mode" and "Sort By" options consistent in the control menu Test Plan: Made sure that the options appeared when right clicking on an empty space. Reviewers: #dolphin, ngraham, elvisangelaccio Reviewed By: #dolphin, ngraham, elvisangelaccio Subscribers: question, markg, elvisangelaccio, mmustac, rkflx, ngraham, kfm-devel, #dolphin Tags: #dolphin Differential Revision: https://phabricator.kde.org/D12911
2018-05-20Bring back 'New Window' action in viewport context menuElvis Angelaccio
This fixes a regression introduced by ec12391a1b. We don't use anymore the custom `new_window` action, but we use the standard `file_new` action instead.
2018-05-14Re-add "Open With" items to context menu for files in search viewNathaniel Graham
2018-04-22Move "Open" actions to the top of the context menu for filesNathaniel Graham
Summary: This patch moves the "Open", "Open With", and "Open in" items to the top of the context menu to reap the following benefits: - Move the "Open" and "Open With" items closer to the top since they're commonly used items, and right now they're buried in the middle of the menu - Group related functionality - Consistency with other common platforms (macOS Finder and Windows Explorer both have these items at the top of the context menu) For folders, the "Open With" entries are moved higher, but not all the way to the top, since the "open in New tab/folder" entries are more useful. Test Plan: Tested all menu items in the context menu for files, folders, and links; all still work. Context menu for single file: {F5806809} Context menu for multiple files: {F5806810} Context menu for single folder: {F5806811} Context menu for multiple folders: {F5806812} Context menu for symlink to folder: {F5806815} Reviewers: #dolphin, #vdg, elvisangelaccio, abetts Reviewed By: #dolphin, #vdg, elvisangelaccio, abetts Subscribers: markg, abetts, elvisangelaccio Differential Revision: https://phabricator.kde.org/D11884
2018-03-22Merge branch 'Applications/18.04'Nathaniel Graham
2018-03-22Fix missing entries in context menu for linksNathaniel Graham
Summary: https://cgit.kde.org/dolphin.git/commit/?id=86f4fcb8cd574f6d886627fc5e01c9edfc84e977 introduced a regression: the context menu for links no longer shows various items that were gated behind being a directory. However, a link can be both a link and a directory, from KIO's perspective. This patch resolves the issue. Test Plan: - Context menus for files, folders, and file links are unchanged. - The missing context menu items for folder links have returned: {F5761809} I should have tested that patch better, and for that I apologize and offer to fix this regression here. I will endeavor to up my reviewing game. Reviewers: rominf, michaelh, #dolphin, rkflx Reviewed By: rominf, rkflx Subscribers: rkflx Differential Revision: https://phabricator.kde.org/D11562
2018-03-21[DolphinContextMenu] Fix excluding ourself from Open With menuKai Uwe Broulik
The desktop file name changed to org.kde.dolphin a long time ago. To avoid this breaking again, just use qApp->desktopFileName() BUG: 391997 Differential Revision: https://phabricator.kde.org/D11540
2018-03-18Add "Show Target" into symlink context menu and file menuRoman Inflianskas
Summary: Add "Show Target" into symlink context menu and file menu FEATURE: 215069 Reviewers: ngraham, elvisangelaccio Reviewed By: ngraham, elvisangelaccio Subscribers: rkflx, ngraham, elvisangelaccio, markg, #dolphin Differential Revision: https://phabricator.kde.org/D10990
2018-03-14Add "Open symlink destination folder" into symlink's context menuRoman Inflianskas
Summary: This is not complete. I'm wondering about "Open symlink destination folder in new tab/window". Feature wants also "Copy symlink destination". I dislike this, because then it's good to have "Cut symlink destination" and that's too much. FEATURE: 215069 Reviewers: #dolphin, ngraham Reviewed By: #dolphin, ngraham Subscribers: rkflx, ngraham, elvisangelaccio, markg, #dolphin Differential Revision: https://phabricator.kde.org/D10990
2018-03-11Add Trash (empty, isEmpty, emptinessChanged)Roman Inflianskas
Summary: Add `Trash` class to handle all trash operations. Reviewers: elvisangelaccio, markg, ngraham Reviewed By: elvisangelaccio, markg, ngraham Subscribers: ngraham, markg, rkflx, elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D11012
2018-03-10Fix some compile warningsRoman Inflianskas
Reviewers: markg, elvisangelaccio Reviewed By: markg, elvisangelaccio Subscribers: chehrlic, rkflx, elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D10995
2018-03-05Revert "Fix some compile warnings"Elvis Angelaccio
This reverts commit 533f050855a50212bba7be57a1590f9ce743e26d. D10995 has not been approved.
2018-03-04Remove unused #includeRoman Inflianskas
Summary: I used CLion inspection to hunt all unused #include Reviewers: #dolphin, elvisangelaccio, markg Reviewed By: #dolphin, elvisangelaccio, markg Subscribers: bcooksley, markg, elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D10985
2018-03-04Fix some compile warningsRoman Inflianskas
Reviewers: #dolphin, markg Reviewed By: markg Subscribers: elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D10995
2017-12-14Use Kio::KPlacesModel as source model for PlacesItemModelRenato Araujo Oliveira Filho
Summary: Use Kio::KPlacesModel as source model for PlacesItemModel avoiding duplicated code. Depends on D8862 Depends on D8332 Depends on D8434 Depends on D8348 Depends on D8630 Test Plan: Unit test created Reviewers: elvisangelaccio, emmanuelp, mlaurent, mwolff Reviewed By: elvisangelaccio, mlaurent, mwolff Subscribers: mwolff, mlaurent, anthonyfieroni, nicolasfella, ngraham, #dolphin Differential Revision: https://phabricator.kde.org/D8855
2017-11-21Modernize: Use nullptr everywhereKevin Funk
2017-11-03Use nullptr + add explicit keywordMontel Laurent
Test Plan: compile Reviewers: #dolphin, broulik Reviewed By: broulik Subscribers: #dolphin Differential Revision: https://phabricator.kde.org/D8637
2017-11-01Make Saved Search feature discoverableNathaniel Graham
Summary: FEATURE: 269332 Make Dolphin's Saved Search feature discoverable by adding a button inside the search field. The button only becomes enabled when there is a valid search term. When pushed, it saves the search to the Places panel, providing a visible-by-default way to do this to complement the existing implementation that is only visible in the context menu. Also harmonized the label text so that it's consistent no matter how you create a saved search (button or context menu) Test Plan: Tested in KDE Neon. Works great: {F5449508} Reviewers: #dolphin, broulik, dfaure, markg, emateli, elvisangelaccio Reviewed By: #dolphin, markg, emateli, elvisangelaccio Subscribers: anthonyfieroni, markg, emateli, elvisangelaccio, cfeck, #dolphin Tags: #dolphin Differential Revision: https://phabricator.kde.org/D8454
2017-09-07Fix DolphinRemoveAction Shift toggling on WaylandElvis Angelaccio
QGuiApplication::queryKeyboardModifiers() does not work on Wayland [1]. We don't need it in the first place, since we already know (thanks to the key events) whether Shift has been pressed or released. So we can just pass this information to DolphinRemoveAction::update(). BUG: 354301 [1]: https://bugreports.qt.io/browse/QTBUG-62786 Differential Revision: https://phabricator.kde.org/D7519
2017-08-09Port to KStandardAction::RenameFileElvis Angelaccio
It was introduced in kconfig(widgets) 5.25. Using the standard action results in less code and no need to hardcode the F2 shortcut. Differential Revision: https://phabricator.kde.org/D6777
2017-07-27Port to KStandardAction::MoveToTrashElvis Angelaccio
It was introduced in kconfig(widgets) 5.25. Using the standard action results in less code and no need to hardcode the Del shortcut. Test Plan: - Change shortcut in System Settings -> Shortcuts -> Standard Shortcuts - Make sure the new shortcut is used by dolphin. Differential Revision: https://phabricator.kde.org/D6778
2017-06-06Drop unnecessary methodElvis Angelaccio
2017-03-13Port to KStandardAction::DeleteFileElvis Angelaccio
Summary: It was introduced in kconfig 5.25 and it properly handles the shift+del shortcut (together with kxmlgui >= 5.30). This allows us to drop the custom delete shortcut as well as the shift+del workaround in DolphinMainWindow. Test Plan: Shift+Del still deletes files, without the 'ambiguous shortcut' warning dialog. Reviewers: emmanuelp Differential Revision: https://phabricator.kde.org/D5010
2017-02-05Drop another obsolete version checkElvis Angelaccio
We now require Frameworks >= 5.30
2017-01-18Port away from deprecated KIO::Job::ui()Elvis Angelaccio
It's equivalent to KJob::uiDelegate() from kcoreaddons.
2017-01-03Explicitly pass iconNameForUrl when creating new places entryKai Uwe Broulik
Once KIO::iconNameForUrl returns special icons for standard paths (e.g. Video folder) this will ensure when adding such a folder to places it will automatically get the proper icon. Since KIO already depends on KBookmarks it can't depend the other way round, otherwise this would have been fixed in KBookmarks directly. Differential Revision: https://phabricator.kde.org/D3896
2016-10-02Popupmenu: use KIO 5.27's new addPluginActionsTo methodDavid Faure
REVIEW: 129085
2016-09-10Don't load twice kfileitemaction plugins with json metadataElvis Angelaccio
2016-09-10Fix logic for loading kfileitemaction pluginsElvis Angelaccio
Since dolphin is now loading also plugins with json metadata, it is wrong to return here, as those plugins could be missed.
2016-08-23Filter json-only KFileItemAction plugins by mimetypeElvis Angelaccio
Commit d48b733 introduced support for kfileitemaction plugins with json metadata, but forgot to filter them by the commonMimeType (like KMimeTypeTrader::query() does with old-style plugins). So we need to load a plugin only when commonMimeType is equal to (or child of) one of the mimetypes supported by the plugin.
2016-06-18Look for kfileitemaction plugins in the expected subfolderElvis Angelaccio
For a rationale, see https://git.reviewboard.kde.org/r/128225/
2016-06-08Load KFileItemAction plugins with json metadataElvis Angelaccio
REVIEW: 128088
2016-03-16[CLAZY] Fixed all level 1 and level 2 warnings with small exceptionsArtur Puzio
REVIEW: 126771
2016-02-10DolphinContextMenu: Do not check if the clicked folder is in the PlacesFrank Reininghaus
This prevents that the setup of the PlacesItemModel queries Solid for the available devices, which can take some time. Places can be added multiple times now using the context menu, but this has always been possible with drag and drop anyway. See https://forum.kde.org/viewtopic.php?f=223&t=130617 for a dicsussion on this topic. REVIEW: 126904
2015-03-21Save bookmarks when adding them via the context menu.Emmanuel Pescosta
CCBUG: 345347 REVIEW: 123080
2015-02-04Port KonqCopyToMenu to KFileCopyToMenuEmmanuel Pescosta
2015-01-28use addActions instead of doing addAction in a loopEmmanuel Pescosta
2014-12-25Remove unused libkonq includesDavid Faure
2014-12-14get rid of KFileItemActionPluginEmmanuel Pescosta
2014-12-14port away from deprecated KFileItem(mode_t mode, mode_t permissions, const ↵Emmanuel Pescosta
QUrl &url, bool delayedMimeTypes = false);
2014-11-02Many cleanups in KonqOperationsDavid Faure