1
0
mirror of https://invent.kde.org/system/dolphin synced 2024-07-04 17:30:55 +00:00

Merge branch 'Applications/19.04'

This commit is contained in:
Nate Graham 2019-03-24 11:31:44 -06:00
commit 3dec3ee092
6 changed files with 22 additions and 53 deletions

View File

@ -151,7 +151,5 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.dolphin.FileManager1.service
install( FILES dolphin.categories DESTINATION ${KDE_INSTALL_CONFDIR} )
install( FILES dolphin.khotkeys DESTINATION ${KDE_INSTALL_DATADIR}/khotkeys )
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)

View File

@ -1,33 +0,0 @@
[Main]
ImportId=dolphin
Version=2
Autostart=true
Disabled=false
[Data]
DataCount=1
[Data_1]
Comment=Global keyboard shortcut to launch Dolphin
Enabled=true
Name=Launch Dolphin
Type=MENUENTRY_SHORTCUT_ACTION_DATA
[Data_1Actions]
ActionsCount=1
[Data_1Actions0]
CommandURL=org.kde.dolphin.desktop
Type=MENUENTRY
[Data_1Conditions]
Comment=
ConditionsCount=0
[Data_1Triggers]
Comment=Simple_action
TriggersCount=1
[Data_1Triggers0]
Key=Meta+E
Type=SHORTCUT

View File

@ -1045,6 +1045,10 @@ void DolphinMainWindow::activeViewChanged(DolphinViewContainer* viewContainer)
oldViewContainer->disconnect(this);
oldViewContainer->view()->disconnect(this);
oldViewContainer->urlNavigator()->disconnect(this);
// except the requestItemInfo so that on hover the information panel can still be updated
connect(oldViewContainer->view(), &DolphinView::requestItemInfo,
this, &DolphinMainWindow::requestItemInfo);
}
connectViewSignals(viewContainer);

View File

@ -75,7 +75,7 @@ protected:
private slots:
/**
* Shows the information for the item of the URL which has been provided by
* InformationPanel::requestItemInfo() and provides default actions.
* InformationPanel::requestDelayedItemInfo() and provides default actions.
*/
void showItemInfo();

View File

@ -106,7 +106,7 @@ void PhononWidget::showEvent(QShowEvent *event)
m_topLayout = new QVBoxLayout(this);
m_topLayout->setContentsMargins(0, 0, 0, 0);
QHBoxLayout *controlsLayout = new QHBoxLayout(this);
QHBoxLayout *controlsLayout = new QHBoxLayout();
controlsLayout->setContentsMargins(0, 0, 0, 0);
controlsLayout->setSpacing(0);

View File

@ -175,6 +175,22 @@ void PlacesPanel::slotItemContextMenuRequested(int index, const QPointF& pos)
const bool isDevice = !item->udi().isEmpty();
const bool isTrash = (item->url().scheme() == QLatin1String("trash"));
if (isTrash) {
emptyTrashAction = menu.addAction(QIcon::fromTheme(QStringLiteral("trash-empty")), i18nc("@action:inmenu", "Empty Trash"));
emptyTrashAction->setEnabled(item->icon() == QLatin1String("user-trash-full"));
menu.addSeparator();
}
QAction* openInNewWindowAction = menu.addAction(QIcon::fromTheme(QStringLiteral("window-new")), i18nc("@item:inmenu", "Open in New Window"));
QAction* openInNewTabAction = menu.addAction(QIcon::fromTheme(QStringLiteral("tab-new")), i18nc("@item:inmenu", "Open in New Tab"));
QAction* propertiesAction = nullptr;
if (item->url().isLocalFile()) {
propertiesAction = menu.addAction(QIcon::fromTheme(QStringLiteral("document-properties")), i18nc("@action:inmenu", "Properties"));
}
if (!isDevice && !isTrash) {
menu.addSeparator();
}
if (isDevice) {
ejectAction = m_model->ejectAction(index);
if (ejectAction) {
@ -205,22 +221,6 @@ void PlacesPanel::slotItemContextMenuRequested(int index, const QPointF& pos)
if (teardownAction || ejectAction || mountAction) {
menu.addSeparator();
}
} else {
if (isTrash) {
emptyTrashAction = menu.addAction(QIcon::fromTheme(QStringLiteral("trash-empty")), i18nc("@action:inmenu", "Empty Trash"));
emptyTrashAction->setEnabled(item->icon() == QLatin1String("user-trash-full"));
menu.addSeparator();
}
}
QAction* openInNewWindowAction = menu.addAction(QIcon::fromTheme(QStringLiteral("window-new")), i18nc("@item:inmenu", "Open in New Window"));
QAction* openInNewTabAction = menu.addAction(QIcon::fromTheme(QStringLiteral("tab-new")), i18nc("@item:inmenu", "Open in New Tab"));
QAction* propertiesAction = nullptr;
if (item->url().isLocalFile()) {
propertiesAction = menu.addAction(QIcon::fromTheme(QStringLiteral("document-properties")), i18nc("@action:inmenu", "Properties"));
}
if (!isDevice && !isTrash) {
menu.addSeparator();
}
if (!isDevice) {