mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
avoid need for activities lib
use KRecentFilesAction like Kate and others to signal used files/dirs could later be used to plug-in a recently used menu, too, if ever wanted avoids that this dependency could be missed and the functionality is not there, too
This commit is contained in:
parent
76c0795458
commit
638a0663a1
|
@ -91,12 +91,6 @@ endif()
|
||||||
find_package(KF6 ${KF6_MIN_VERSION} OPTIONAL_COMPONENTS
|
find_package(KF6 ${KF6_MIN_VERSION} OPTIONAL_COMPONENTS
|
||||||
DocTools
|
DocTools
|
||||||
)
|
)
|
||||||
find_package(PlasmaActivities)
|
|
||||||
set_package_properties(PlasmaActivities PROPERTIES DESCRIPTION "PlasmaActivities libraries"
|
|
||||||
URL "https://www.kde.org"
|
|
||||||
TYPE OPTIONAL
|
|
||||||
PURPOSE "For tracking which folders are frequently accessed on a Plasma desktop"
|
|
||||||
)
|
|
||||||
|
|
||||||
find_package(Phonon4Qt6 CONFIG REQUIRED)
|
find_package(Phonon4Qt6 CONFIG REQUIRED)
|
||||||
|
|
||||||
|
@ -130,10 +124,6 @@ set_package_properties(KF6FileMetaData PROPERTIES
|
||||||
PURPOSE "For accessing file metadata labels"
|
PURPOSE "For accessing file metadata labels"
|
||||||
)
|
)
|
||||||
|
|
||||||
if (PlasmaActivities_FOUND)
|
|
||||||
set(HAVE_PLASMA_ACTIVITIES TRUE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (KF6Baloo_FOUND AND KF6BalooWidgets_FOUND AND KF6FileMetaData_FOUND)
|
if (KF6Baloo_FOUND AND KF6BalooWidgets_FOUND AND KF6FileMetaData_FOUND)
|
||||||
message(STATUS "Baloo packages are found")
|
message(STATUS "Baloo packages are found")
|
||||||
set(HAVE_BALOO TRUE)
|
set(HAVE_BALOO TRUE)
|
||||||
|
|
|
@ -455,13 +455,6 @@ target_link_libraries(dolphinstatic
|
||||||
Phonon::phonon4qt6
|
Phonon::phonon4qt6
|
||||||
)
|
)
|
||||||
|
|
||||||
if (HAVE_PLASMA_ACTIVITIES)
|
|
||||||
target_link_libraries(
|
|
||||||
dolphinstatic
|
|
||||||
Plasma::Activities
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(HAVE_PACKAGEKIT)
|
if(HAVE_PACKAGEKIT)
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
dolphinstatic
|
dolphinstatic
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/** Set whether to build Dolphin with support for these technologies or not. */
|
/** Set whether to build Dolphin with support for these technologies or not. */
|
||||||
#cmakedefine01 HAVE_BALOO
|
#cmakedefine01 HAVE_BALOO
|
||||||
#cmakedefine01 HAVE_PLASMA_ACTIVITIES
|
|
||||||
#cmakedefine01 HAVE_KUSERFEEDBACK
|
#cmakedefine01 HAVE_KUSERFEEDBACK
|
||||||
#cmakedefine01 HAVE_PACKAGEKIT
|
#cmakedefine01 HAVE_PACKAGEKIT
|
||||||
#cmakedefine01 HAVE_TERMINAL
|
#cmakedefine01 HAVE_TERMINAL
|
||||||
|
|
|
@ -53,6 +53,7 @@
|
||||||
#include <KMessageBox>
|
#include <KMessageBox>
|
||||||
#include <KProtocolInfo>
|
#include <KProtocolInfo>
|
||||||
#include <KProtocolManager>
|
#include <KProtocolManager>
|
||||||
|
#include <KRecentFilesAction>
|
||||||
#include <KShell>
|
#include <KShell>
|
||||||
#include <KShortcutsDialog>
|
#include <KShortcutsDialog>
|
||||||
#include <KStandardAction>
|
#include <KStandardAction>
|
||||||
|
@ -365,6 +366,9 @@ void DolphinMainWindow::changeUrl(const QUrl &url)
|
||||||
updateViewActions();
|
updateViewActions();
|
||||||
updateGoActions();
|
updateGoActions();
|
||||||
|
|
||||||
|
// will signal used urls to activities manager, too
|
||||||
|
m_recentFiles->addUrl(url);
|
||||||
|
|
||||||
Q_EMIT urlChanged(url);
|
Q_EMIT urlChanged(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2157,6 +2161,8 @@ void DolphinMainWindow::setupActions()
|
||||||
connect(openInSplitViewAction, &QAction::triggered, this, [this]() {
|
connect(openInSplitViewAction, &QAction::triggered, this, [this]() {
|
||||||
openInSplitView(QUrl());
|
openInSplitView(QUrl());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
m_recentFiles = new KRecentFilesAction(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DolphinMainWindow::setupDockWidgets()
|
void DolphinMainWindow::setupDockWidgets()
|
||||||
|
|
|
@ -42,6 +42,7 @@ class KFileItem;
|
||||||
class KFileItemList;
|
class KFileItemList;
|
||||||
class KJob;
|
class KJob;
|
||||||
class KNewFileMenu;
|
class KNewFileMenu;
|
||||||
|
class KRecentFilesAction;
|
||||||
class KToolBarPopupAction;
|
class KToolBarPopupAction;
|
||||||
class QToolButton;
|
class QToolButton;
|
||||||
class PlacesPanel;
|
class PlacesPanel;
|
||||||
|
@ -759,6 +760,8 @@ private:
|
||||||
|
|
||||||
KIO::CommandLauncherJob *m_job;
|
KIO::CommandLauncherJob *m_job;
|
||||||
|
|
||||||
|
KRecentFilesAction *m_recentFiles = nullptr;
|
||||||
|
|
||||||
friend class DolphinMainWindowTest;
|
friend class DolphinMainWindowTest;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -21,9 +21,6 @@
|
||||||
#include "statusbar/dolphinstatusbar.h"
|
#include "statusbar/dolphinstatusbar.h"
|
||||||
|
|
||||||
#include <KActionCollection>
|
#include <KActionCollection>
|
||||||
#if HAVE_PLASMA_ACTIVITIES
|
|
||||||
#include <PlasmaActivities/ResourceInstance>
|
|
||||||
#endif
|
|
||||||
#include <KApplicationTrader>
|
#include <KApplicationTrader>
|
||||||
#include <KFileItemActions>
|
#include <KFileItemActions>
|
||||||
#include <KFilePlacesModel>
|
#include <KFilePlacesModel>
|
||||||
|
@ -570,10 +567,6 @@ void DolphinViewContainer::setUrl(const QUrl &newUrl)
|
||||||
if (newUrl != m_urlNavigator->locationUrl()) {
|
if (newUrl != m_urlNavigator->locationUrl()) {
|
||||||
m_urlNavigator->setLocationUrl(newUrl);
|
m_urlNavigator->setLocationUrl(newUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_PLASMA_ACTIVITIES
|
|
||||||
KActivities::ResourceInstance::notifyAccessed(newUrl);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DolphinViewContainer::setFilterBarVisible(bool visible)
|
void DolphinViewContainer::setFilterBarVisible(bool visible)
|
||||||
|
|
Loading…
Reference in a new issue