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
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
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
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
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.
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
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
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
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
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
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
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
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
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
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
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
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.
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
DolphinContextMenu::createPasteAction used to be precise about destination
("Paste To Folder"), while now it's precise about the source (what to paste).
It was decided that this was more useful and consistent anyway.
REVIEW: 120695
This adds a third option to the "in new tab" and "in new window" which opens
the parent folder in the same view
BUG: 298704
FIXED-IN: 4.15
REVIEW: 110133
This removes the remaining unchecked accesses to the clipboard mime
data after commit 7828b057da. According
to a bug report, it can be a null pointer on Wayland.
BUG: 335053
REVIEW: 118649
Middle clicking on Forward/Backward/Home/etc. will no longer open a new
tab since the QAction triggered signal no longer tell us which mouse
button was pressed
This does not work properly yet, there are probably quite a few bad signal/
slot connections due to KUrl -> QUrl. However dolphin starts without
crashing.
Accessibility is not ported since that changed quite a lot from Qt4 -> Qt5
and I have no idea how it is supposed to be used.
This is the first commit for review 117395
Since https://git.reviewboard.kde.org/r/111989/, the "Create New..."
menu in the context menu that appears when right-clicking a folder was
not a child of the DolphinMainWindow any more, but of the context menu
itself. This is the reason why the dialog that asks for a file name
when choosing one of the "Create New..." options disappeared
immediately.
This patch makes sure that the main window is the parent of the
"Create New..." menu again.
BUG: 327783
REVIEW: 113930
Removed all signal-slot-connections related to DolphinNewFileMenu->errorMessage(QString)
in DolphinMainWindow and DolphinContextMenu and replaced it by a better solution.
Now we make use of the already existing DolphinNewFileMenuObserver singleton class to achieve a better
error handling, because every newly created DolphinContextMenu instance registers himself by DolphinNewFileMenuObserver
and we use this to connect the errorMessage(QString) signal of every DolphinContextMenu instance to the errorMessage(QString)
signal of the DolphinNewFileMenuObserver singleton class.
So we need only one connection from DolphinNewFileMenuObserver to DolphinMainWindow (or to DolphinPart) to
collect all error messages thrown by every DolphinNewFileMenu instance.
REVIEW: 112178
When 'browse through archives' is enabled, open archive files
like folders on middle clicking, context menu -> new tab action
and context menu -> new window action.
BUG: 196035
REVIEW: 110487
- Updated both the Dolphin KPart and context menu to use the new
DolphinRemoveAction class to manage "Delete/Move to Trash" actions.
See also https://git.reviewboard.kde.org/r/107509/.
REVIEW: 108802
Finding out whether shift is pressed initially can be done
with qApp->keyboardModifiers(), and finding out that the user is pressing
or release shift can be done with keyPressEvent/keyReleaseEvent.
This required to inherit from KMenu rather than having the KMenu
as a member.
KModifierKeyInfo is only implemented on X11, so this makes the code
more portable. If similar solutions can be found for other users of
KModifierKeyInfo, it will be deprecated in KF5.
REVIEW: 110303
Without this patch, the name of the parent folder was used for the entry
in the Places Panel. Will backport to the KDE/4.9 branch when the RC2
freeze is over.
Thanks to Daniel Kreuter for the patch!
CCBUG: 303157
See bug 188032 for an ongoing discussion. In case if this behavior
is really not wanted by users (the feedback on bugs.kde.org will
show), the review-request
https://git.reviewboard.kde.org/r/104915/ should be merged too
(after adjusting some parts of the code).
- Open the context menu on the mouse-press event, not on the
mouse-release event.
- Provide an explicit position-information and don't use
QCursor::pos(). This fixes the issue that opening a context-menu
by the keyboard opens below the cursor.
- Provide different signals in the KItemListController for
the different context-menu types (item vs. view vs. header).
- Implement turning on/off roles by the header-context-menu.
Dolphin 2.0 will get a new view-engine with the
following improvements:
- Better performance
- Animated transitions
- No clipped filenames due to dynamic item-sizes
- Grouping support for all view-modes
- Non-rectangular selection areas
- Simplified code for better maintenance
More details will be provided in a blog-entry during
the next days.
Please note that the code is in a very
early alpha-stage and although the most tricky parts
have been implemented already very basic things like
drag and drop or selections have not been pushed yet.
Those things are rather trivial to implement but this
still will take some time.
If the user has hidden the menubar and the toolbar there is no way to
get back the menu (at least not without knowing the Ctrl+M shortcut).
Show an entry in the context-menu to bring back the menubar.
Use a similar default UI like in Rekonq and other browsers: Hide the
menubar and add access to all actions by a button in the toolbar.
Of course it is still possible to show the menubar so that the same UI
is given like before.
Most developers seem to prefer
if (ptr) ...
if (!ptr) ...
in comparison to
if (ptr != 0) ...
if (ptr == 0) ...
Adjusted the Dolphin-code to use the "most-prefered style" to make contributors happy.