Commit graph

5720 commits

Author SHA1 Message Date
Nate Graham 48c082767e Fix adding "Create New..." menu to toolbar
Summary:
Access the object by its existing name rather than renaming it.

BUG: 405780
FIXED-IN: 19.04.1

Test Plan:
- Add {nav Create New} item to toolbar; it now works
- Verify that {nav Create New} menu and toolbar items are disabled when in the trash
- All tests still pass

Reviewers: elvisangelaccio, broulik, #dolphin, cfeck

Reviewed By: cfeck

Subscribers: cfeck, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D20664
2019-04-18 13:17:00 -06:00
l10n daemon script 924c883edc GIT_SILENT made messages (after extraction) 2019-04-12 07:49:57 +02:00
Nate Graham 14f0cd52f6 Don't show "Open With" menu items for empty directories
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
2019-04-09 20:19:17 -06:00
Christoph Feck dbc5e57192 GIT_SILENT Upgrade KDE Applications version to 19.04.0. 2019-04-08 13:59:05 +02:00
Elvis Angelaccio 30a335cbcf [DolphinMainWindowTest] Fix testNewFileMenuEnabled
The newFileMenu enabled status is updated whenever the KDirLister emits
the `completed` signal: use QTRY_COMPARE so that we can wait for it.
2019-04-07 22:42:50 +02:00
Christoph Feck ff40714773 GIT_SILENT Upgrade KDE Applications version to 19.03.90. 2019-03-31 14:00:39 +02:00
Tigran Gabrielyan 1eaf5d3e03 Move Safely Remove down in places context menu
Summary: BUG: 405620

Reviewers: #dolphin, ngraham, elvisangelaccio

Reviewed By: #dolphin, ngraham, elvisangelaccio

Subscribers: elvisangelaccio, ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19950
2019-03-24 11:31:13 -06:00
Méven Car d7277e47a6 When hovering over a file on the not-focus view panel, the information panel gets updated
Test Plan:
 - In Dolphin with two views (split view) and with the information panels
 - Hover over a file on the not selected view
 - > the information panel show information about this file

No other changes in behavior

Reviewers: #dolphin, elvisangelaccio, ngraham

Reviewed By: #dolphin, ngraham

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19936
2019-03-24 18:38:42 +01:00
Méven Car 35f1fd5c15 [InformationPanel] Hide the video when the preview is disabled, avoid computing the preview when it is disabled
Summary:
Bug symptom : {F6698879}

Fix the bugs and allow to avoid launching a PreviewJob with all files even when the preview is disabled.

Test Plan:
 # In dolphin with an information panel with preview on
 # launch the video preview
 # Disable the preview

  ->bug 1: the video player control is still visible (this bug fix this)

 # re-enable preview

 -> bug 2: the video stays visible and the preview is displayed above (this bug fix this)

Reviewers: #dolphin, elvisangelaccio, ngraham

Reviewed By: #dolphin, elvisangelaccio, ngraham

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19844
2019-03-24 18:34:32 +01:00
Elvis Angelaccio 3fe6547197 Revert "Create a global launch shortcut (Meta+E)"
This reverts commit 58084cf7da.

Plasma considers khotkeys deprecated, so we shouldn't add new users
making the migration even harder.
Dolphin should use the `X-KDE-Shortcuts` desktop entry instead.

More details in David's comment: https://phabricator.kde.org/D19831#437096
2019-03-24 12:07:24 +01:00
Elvis Angelaccio 0b9cb0f7d9 [PhononWidget] Fix layout warning
`controlsLayout` should not be a direct child of the widget, since it
already has `m_topLayout` as layout.

This fixes the following warning:

    QLayout: Attempting to add QLayout "" to PhononWidget "", which already has a layout
2019-03-24 11:55:12 +01:00
Elvis Angelaccio bff373d598 Fix PlacesItemModelTest::testDefaultViewProperties()
The test was assuming that global view properties are off by default,
which is no longer true after d6c086ad04.
2019-03-20 21:36:31 +01:00
Tigran Gabrielyan 303cd17444 Fix rearranging items in places panel with hidden items
Summary:
`m_sourceModel->movePlace` is called using index from the view model.
This becomes an issue when there are hidden places items.

This change calls `m_sourceModel->movePlace` using the corresponding mapped source index.

BUG: 399430
FIXED-IN: 19.04.0

Test Plan:
  # Create at least 4 Places items
  # Hide first item
  # Drag the now first visible item between second and third item

Actual: The item does not move
Expected: The first visible item should now be second visible item in the list

Reviewers: #dolphin, ngraham

Reviewed By: #dolphin, ngraham

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19901
2019-03-20 17:46:15 +01:00
Elvis Angelaccio 5b463d82fe Bring back KActivities support
Summary: This code has been unused since the KF5 port.

Reviewers: #dolphin, #plasma

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D18273
2019-03-18 21:18:04 +01:00
Nate Graham 58084cf7da Create a global launch shortcut (Meta+E)
Summary:
This patch adds a global shortcut ({key Meta E}) to launch Dolphin, just like Konsole has.

FEATURE: 405302
FIXED-IN: 19.04.0

Test Plan:
1. Apply patch and reboot, or create and log into a new user
2. Hit {key Meta E}
3. Dolphin opens!

Reviewers: #dolphin, #vdg, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: hallas, elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19831
2019-03-17 16:12:18 -06:00
Méven Car bf314f2dff When the previewed video stops playing (because of the user or because the media playback has ended), show the regular preview only if the preview setting is on.
Summary:
Bug result after test plan :

{F6698812}

Test Plan:
In dolphin with the information panel
Select a video
Play the video
Disable the preview through the context menu (the video stays playing and visible and this will get fixed in a subsequent review)
Stop the video -> the video preview reappears when it should not

Reviewers: elvisangelaccio

Reviewed By: elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19843
2019-03-17 21:22:54 +01:00
Méven Car 1ff74854ec Fix a todo: InformationPanelContent::configureSettings code is moved to InformationPanel::contextMenuEvent
Summary:
Fix a TODO : InformationPanelContent::configureSettings code is moved to InformationPanel::contextMenuEvent
Adding necessary accessors and changing visibility of one slot.

Test Plan:
1 compile
2 in dolphin right on the information panel
3 toggle preview
4 from the same context menu, click configure, metadadata settings appears
5 toggle "condensed date" if available

Reviewers: elvisangelaccio, #dolphin

Reviewed By: elvisangelaccio, #dolphin

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19832
2019-03-17 19:29:53 +01:00
David Hallas 508dc815c7 Fix "Add Network Folder" tooltip icon does not show on Breeze, shows correctly on Breeze Dark
Summary:
Fix "Add Network Folder" tooltip icon does not show on Breeze, shows correctly
on Breeze Dark. The fix is taken from D19596.

Test Plan:
Open Dolphin with the Breeze theme
Hover the mouse over the "Add Network Folder"
The icon is black on black

BUG: 404858

Reviewers: #dolphin, elvisangelaccio, ngraham

Reviewed By: #dolphin, elvisangelaccio, ngraham

Subscribers: broulik, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19738
2019-03-17 19:11:37 +01:00
David Hallas f0a65179d8 Fix crash at shutdown after showing a tooltip
Summary:
Fix crash at shutdown after showing a tooltip. The commit
94d7e1471e introduced a crash that occurs
when closing Dolphin after Dolphin has showed a tooltip. This happens
because the ToolTipManager::showToolTip function calls the
KToopTipWidget::showBelow function passing in the pointer to the
DolphinFileMetaDataWidget. But this also passes the ownership of the
pointer to the KToopTipWidget as long as a new tooltip is not shown. The
problem is that at shutdown, the KToopTipWidget instance will be
destoyed first and therefore also destroy the DolphinFileMetaDataWidget
instance (which the ToolTipManager still owns through the
QScopedPointer) causing it to be deleted twice. The fix for this is
simply to swap the order of these two members so that the
DolphinFileMetaDataWidget is destroyed first by the QScopedPointer
thereby removing it from the KToopTipWidget if it has been set as it's
parent.

Test Plan:
Open Dolphin
Show a Tool Tip
Close Dolphin

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19737
2019-03-17 18:10:11 +01:00
Elvis Angelaccio d6c086ad04 Make global view properties the default setting
Summary:
Automatic creation of .directory files is one of the most
complained about things in dolphin.

These days applications are supposed to store application-specific data
within $XDG_DATA_HOME. Long-term that's the proper solution for this
issue, but for now we can at least flip the default so that we no longer
create .directory files out of the box.

A tooltip is also added as a kind of warning for the users who want to
change the setting. Ideally a proper warning should be shown using a
KMessageWidget or KMessageBox, but neither play too well with the
setting dialog workflow used by dolphin.

CCBUG: 322922

Reviewers: #dolphin, #vdg, ngraham

Reviewed By: #dolphin, #vdg, ngraham

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19661
2019-03-17 16:43:20 +01:00
Albert Astals Cid 13ae434646 GIT_SILENT Upgrade KDE Applications version to 19.03.80. 2019-03-16 21:54:08 +01:00
Yuri Chornoivan 519a5e2700 Update screenshot 2019-03-13 12:53:12 +02:00
Méven Car 40896c02d9 Correctly position context menu of the information panel under wayland with a secondary screen
Summary:
According to my testing this bug occurs because Qcursor::pos() does not work as expected under wayland on a secondary screen, then it returns inaccurate data.
This could hide bugs elsewhere.

BUG: 404799
FIXED-IN: 19.04.0

Test Plan:
Under Wayland test the context menu on both screens.
Do the same under Xorg.

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, ngraham, nicolasfella, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19535
2019-03-12 09:25:31 -06:00
David Hallas 94d7e1471e Fixes leak of DolphinFileMetaDataWidget in ToolTipManager
Summary:
Fixes leak of DolphinFileMetaDataWidget in ToolTipManager. The
destructor of ToolTipManager failed to delete the m_fileMetaDataWidget
member. This is seen at shutdown but also when you close a tab that has
displayed a tooltip.

Test Plan:
Compile Dolphin with address sanitizer
Open Dolphin
Show a tooltip
Close Dolphin

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19485
2019-03-10 17:41:42 +01:00
Elvis Angelaccio 9f2bb143b5 [FoldersPanel] Stop ignoring positions from the controller
This fixes the position of Folder panel's context menus on multi-screens
on Wayland, because `QCursor::pos()` is not reliable on those setups.
2019-03-10 12:45:43 +01:00
Elvis Angelaccio 3c9efb362a [FoldersPanel] Don't show 'Limit to Home Directory' in the view context menu
The `viewContextMenuRequested` signal is emitted without a valid
KFileItem, so `m_fileItem` will always be null in `TreeViewContextMenu::open()`.
2019-03-10 12:37:25 +01:00
Elvis Angelaccio b7e84ed42f Fix clazy-fully-qualified-moc-types warning
Slot arguments should be fully-qualified.
2019-03-10 11:34:40 +01:00
Laurent Montel 1aeea4a6ab port to std::stable_sort 2019-03-10 10:51:27 +01:00
Elvis Angelaccio 1a32594617 Fix context for QDateTime::toString() translations
Summary:
The documentation of QDateTime::toString() says that:

    Any sequence of characters that are enclosed in single
    quotes will be treated as text and not be used as an expression.

This means that translators cannot replace single quotes with other
characters such as «...». This is now described in the context of the
affected strings.

We also check that the translated string contains exactly 2 single
quotes, and we use the untraslated string otherwise.

BUG: 401382

Reviewers: lueck, aacid, cfeck

Subscribers: ltoscano, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D18769
2019-03-09 12:34:36 +01:00
David Hallas e602e532c0 New tab placed after current tab when middle-clicking
Summary:
New tabs should be placed after the currently active tab when using
middle click.

Test Plan:
Open new tab from the places panel using middle click, verify that the
Open new tab from the folders panel using middle click, verify that the
tab is opened after the current tab
Open new tab by middle clicking on the Back button, verify that the tab
is opened after the current tab
Open new tab by middle clicking on the Forward button, verify that the tab
is opened after the current tab

FEATURE: 403690

Reviewers: #dolphin, ngraham, elvisangelaccio

Reviewed By: #dolphin, ngraham, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19201
2019-03-09 12:11:58 +01:00
Yuri Chornoivan 4ae68e8445 Sync docs with code (screenshot of Behavior page is still unsynced) 2019-03-09 08:56:46 +02:00
Simon Depiets c148eff8ca Improve wording of split view/pane settings
Summary:
I found these strings very hard to understand then translate without looking into the code because the use of "view" refers to both "the split view" and "the left pane and the right pane of the split view".

This patch attempts to explicitly mention panes when needed.

Reviewers: #dolphin, angeloevertonjr, ngraham

Reviewed By: #dolphin, ngraham

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19579
2019-03-06 10:46:54 +08:00
Alexander Stippich 7a57be9812 Use new display string function from KFileMetaData
Summary:
Delete all the custom formatting functions
and use the ones provided from KFileMetaData.

Reviewers: #dolphin, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: bcooksley, elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19105
2019-03-01 12:02:03 +01:00
Laurent Montel 4315e5c938 remove deprecated methods 2019-02-27 08:59:18 +01:00
Nate Graham 1c6240964b Give the "Sort by" menu an appropriate icon 2019-02-24 14:09:53 -07:00
David Hallas d2783df310 Fixes memory leak of KItemListHeader
Summary:
Fixes memory leak of KItemListHeader
The KItemListHeader passed the listView parent object to the QObject
base class, but that pointer seems to always be nullptr causing the
KItemListHeader to not be memory managed by anything. Instead simple
use the listView as parent pointer.

Test Plan: This leak was found using Address Sanitizer

Reviewers: elvisangelaccio

Reviewed By: elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D14453
2019-02-24 18:22:55 +01:00
l10n daemon script 16edd9ccec GIT_SILENT made messages (after extraction) 2019-02-24 02:53:48 +01:00
l10n daemon script 33581c60c7 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-02-22 05:30:16 +01:00
Yuri Chornoivan ed82cca0c0 Update screenshots and some minor bits in docs 2019-02-18 17:36:07 +02:00
David Hallas c72fdaa773 Fix crash during shutdown
Summary:
Fix crash during shutdown. The root cause is that when Dolphin in stopped as
part of an activity, the KItemListViewAccessible destructor is called after
QApplication::exec has returned causing Qt to already having cleaned up the
QAccessibleInterface instances kept in KItemListViewAccessible. Instead of
storing the pointers to QAccessibleInterface we store the QAccessible::Id so
that we can use the QAccessible::deleteAccessibleInterface function for
deleting the instances.

BUG: 402784

Test Plan:
I wasn't able to reproduce the crash in the first place, but I have just
opened and closed Dolphin a few times and verified the the QAccessibleInterface
instances are correctly cleaned up.

Reviewers: #dolphin, elvisangelaccio, ngraham

Reviewed By: #dolphin, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19083
2019-02-18 08:58:11 +01:00
Nate Graham 6e88d7cef0 Merge branch 'Applications/18.12' 2019-02-17 14:07:49 -07:00
Nate Graham cf2da56c5e Word-wrap KMessageWidget text
Summary:
Word-wrap KMessageWidget text to prevent the window from being widened
when the text is very long.

CCBUG: 404232

Only `CCBUG: ` because word wrap only works where QLabel detects a word boundary;
it will not wrap a string with no spaces or other word boundaries (e.g.
"aaaaaaaaaaaaaaaaaaaa...")

Test Plan:
- Create a new text file with a 300-character name that has spaces in it
- In the KMessageWidget's error message, the file name is wrapped at the word
boundaries

Reviewers: #dolphin, #frameworks, cfeck, elvisangelaccio

Reviewed By: #dolphin, cfeck, elvisangelaccio

Subscribers: elvisangelaccio, cfeck, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D18968
2019-02-17 14:07:28 -07:00
Yuri Chornoivan a17a826e24 Add new option to close the inactive split view to the docs 2019-02-17 11:59:34 +02:00
David Hallas 17af8ae0ad New tab should be placed after the current tab
Summary:
When opening a new using the context menu the new tab should be placed
after the currently open tab, not at the end of the tab list.

BUG: 403690

Test Plan:
Open multiple tabs and select a different tab than the last one.
Open a new tab using the context menu and see that it opens after the currently
selected tab.
Open a tab using Ctrl+T and see that it opens at the end.

Reviewers: #dolphin, ngraham, elvisangelaccio

Reviewed By: #dolphin, ngraham, elvisangelaccio

Subscribers: elvisangelaccio, ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D18945
2019-02-16 16:51:44 +01:00
Angelo Oliveira Jr 92368c1e4d Add option to choose which view to close
Summary:
This Diff make configurable which view will close when toggling off
the split view mode, if it's the active one or the inactive one.

A new checkbox was added to the Dolphin configuration window,
and defaults to the original behavior.

FEATURE: 312834
FIXED-IN: 19.03.80

Test Plan: {F6535432}

Reviewers: ngraham, #dolphin, elvisangelaccio

Reviewed By: ngraham, #dolphin

Subscribers: elvisangelaccio, cfeck, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D18040
2019-02-16 16:09:27 +01:00
l10n daemon script 36da6c7e32 GIT_SILENT made messages (after extraction) 2019-02-13 07:36:24 +01:00
l10n daemon script 037a394ec7 GIT_SILENT made messages (after extraction) 2019-02-13 02:57:24 +01:00
Kai Uwe Broulik d5744305f6 Merge branch 'Applications/18.12' 2019-02-08 09:02:00 +01:00
Kai Uwe Broulik 585cc994e6 [DolphinView] Use correct color group
Use the inactive color group when the window is inactive and update when window state changes.

CCBUG: 404053

Differential Revision: https://phabricator.kde.org/D18811
2019-02-08 09:01:38 +01:00
Kai Uwe Broulik 9da33680ad Merge branch 'Applications/18.12' 2019-02-06 16:24:01 +01:00