diff options
Diffstat (limited to 'src/panels')
| -rw-r--r-- | src/panels/folders/folderspanel.cpp | 4 | ||||
| -rw-r--r-- | src/panels/folders/treeviewcontextmenu.cpp | 2 | ||||
| -rw-r--r-- | src/panels/information/informationpanel.cpp | 18 | ||||
| -rw-r--r-- | src/panels/information/informationpanelcontent.cpp | 5 | ||||
| -rw-r--r-- | src/panels/information/phononwidget.cpp | 4 | ||||
| -rw-r--r-- | src/panels/places/placesitemlistgroupheader.cpp | 3 | ||||
| -rw-r--r-- | src/panels/places/placespanel.cpp | 8 | ||||
| -rw-r--r-- | src/panels/terminal/terminalpanel.cpp | 6 | ||||
| -rw-r--r-- | src/panels/terminal/terminalpanel.h | 1 |
9 files changed, 29 insertions, 22 deletions
diff --git a/src/panels/folders/folderspanel.cpp b/src/panels/folders/folderspanel.cpp index 01f338461..2e7e4dc28 100644 --- a/src/panels/folders/folderspanel.cpp +++ b/src/panels/folders/folderspanel.cpp @@ -30,13 +30,13 @@ #include "kitemviews/kitemlistselectionmanager.h" #include "treeviewcontextmenu.h" #include "views/draganddrophelper.h" -#include "views/renamedialog.h" #include <KJobWidgets> #include <KJobUiDelegate> #include <KIO/CopyJob> #include <KIO/DropJob> #include <KIO/FileUndoManager> +#include <KIO/RenameFileDialog> #include <QApplication> #include <QBoxLayout> @@ -104,7 +104,7 @@ void FoldersPanel::rename(const KFileItem& item) const int index = m_model->index(item); m_controller->view()->editRole(index, "text"); } else { - RenameDialog* dialog = new RenameDialog(this, KFileItemList() << item); + KIO::RenameFileDialog* dialog = new KIO::RenameFileDialog(KFileItemList({item}), this); dialog->open(); } } diff --git a/src/panels/folders/treeviewcontextmenu.cpp b/src/panels/folders/treeviewcontextmenu.cpp index df9b9d62e..6c4adf883 100644 --- a/src/panels/folders/treeviewcontextmenu.cpp +++ b/src/panels/folders/treeviewcontextmenu.cpp @@ -173,7 +173,7 @@ void TreeViewContextMenu::populateMimeData(QMimeData* mimeData, bool cut) kdeUrls.append(m_fileItem.url()); QList<QUrl> mostLocalUrls; bool dummy; - mostLocalUrls.append(m_fileItem.mostLocalUrl(dummy)); + mostLocalUrls.append(m_fileItem.mostLocalUrl(&dummy)); KIO::setClipboardDataCut(mimeData, cut); KUrlMimeData::setUrls(kdeUrls, mostLocalUrls, mimeData); } diff --git a/src/panels/information/informationpanel.cpp b/src/panels/information/informationpanel.cpp index e6c3bf32a..23e7f1922 100644 --- a/src/panels/information/informationpanel.cpp +++ b/src/panels/information/informationpanel.cpp @@ -290,8 +290,8 @@ void InformationPanel::reset() void InformationPanel::slotFileRenamed(const QString& source, const QString& dest) { - if (m_shownUrl == QUrl::fromLocalFile(source)) { - m_shownUrl = QUrl::fromLocalFile(dest); + if (m_shownUrl == QUrl::fromUserInput(source)) { + m_shownUrl = QUrl::fromUserInput(dest); m_fileItem = KFileItem(m_shownUrl); if ((m_selection.count() == 1) && (m_selection[0].url() == QUrl::fromLocalFile(source))) { @@ -308,10 +308,10 @@ void InformationPanel::slotFileRenamed(const QString& source, const QString& des void InformationPanel::slotFilesAdded(const QString& directory) { - if (m_shownUrl == QUrl::fromLocalFile(directory)) { + if (m_shownUrl == QUrl::fromUserInput(directory)) { // If the 'trash' icon changes because the trash has been emptied or got filled, // the signal filesAdded("trash:/") will be emitted. - KFileItem item(QUrl::fromLocalFile(directory)); + KFileItem item(QUrl::fromUserInput(directory)); requestDelayedItemInfo(item); } } @@ -319,7 +319,7 @@ void InformationPanel::slotFilesAdded(const QString& directory) void InformationPanel::slotFilesChanged(const QStringList& files) { for (const QString& fileName : files) { - if (m_shownUrl == QUrl::fromLocalFile(fileName)) { + if (m_shownUrl == QUrl::fromUserInput(fileName)) { showItemInfo(); break; } @@ -329,7 +329,7 @@ void InformationPanel::slotFilesChanged(const QStringList& files) void InformationPanel::slotFilesRemoved(const QStringList& files) { for (const QString& fileName : files) { - if (m_shownUrl == QUrl::fromLocalFile(fileName)) { + if (m_shownUrl == QUrl::fromUserInput(fileName)) { // the currently shown item has been removed, show // the parent directory as fallback markUrlAsInvalid(); @@ -340,15 +340,15 @@ void InformationPanel::slotFilesRemoved(const QStringList& files) void InformationPanel::slotEnteredDirectory(const QString& directory) { - if (m_shownUrl == QUrl::fromLocalFile(directory)) { - KFileItem item(QUrl::fromLocalFile(directory)); + if (m_shownUrl == QUrl::fromUserInput(directory)) { + KFileItem item(QUrl::fromUserInput(directory)); requestDelayedItemInfo(item); } } void InformationPanel::slotLeftDirectory(const QString& directory) { - if (m_shownUrl == QUrl::fromLocalFile(directory)) { + if (m_shownUrl == QUrl::fromUserInput(directory)) { // The signal 'leftDirectory' is also emitted when a media // has been unmounted. In this case no directory change will be // done in Dolphin, but the Information Panel must be updated to diff --git a/src/panels/information/informationpanelcontent.cpp b/src/panels/information/informationpanelcontent.cpp index 417ca709c..5c1b7ae22 100644 --- a/src/panels/information/informationpanelcontent.cpp +++ b/src/panels/information/informationpanelcontent.cpp @@ -166,12 +166,13 @@ InformationPanelContent::~InformationPanelContent() void InformationPanelContent::showItem(const KFileItem& item) { - if (item != m_item) { + // compares item entries, comparing items only compares urls + if (m_item.entry() != item.entry()) { m_item = item; - m_preview->stopAnimatedImage(); refreshMetaData(); } + refreshPreview(); } diff --git a/src/panels/information/phononwidget.cpp b/src/panels/information/phononwidget.cpp index 6911f79bd..f815b4bd0 100644 --- a/src/panels/information/phononwidget.cpp +++ b/src/panels/information/phononwidget.cpp @@ -20,7 +20,6 @@ #include "phononwidget.h" -#include <KIconLoader> #include <KLocalizedString> #include <Phonon/AudioOutput> #include <Phonon/MediaObject> @@ -28,6 +27,7 @@ #include <Phonon/VideoWidget> #include <QShowEvent> +#include <QStyle> #include <QToolButton> #include <QVBoxLayout> @@ -161,7 +161,7 @@ void PhononWidget::showEvent(QShowEvent *event) m_topLayout->addLayout(controlsLayout); - const int smallIconSize = IconSize(KIconLoader::Small); + const int smallIconSize = style()->pixelMetric(QStyle::PM_SmallIconSize); const QSize buttonSize(smallIconSize, smallIconSize); m_playButton->setToolTip(i18n("play")); diff --git a/src/panels/places/placesitemlistgroupheader.cpp b/src/panels/places/placesitemlistgroupheader.cpp index 884859d5b..dbd055f36 100644 --- a/src/panels/places/placesitemlistgroupheader.cpp +++ b/src/panels/places/placesitemlistgroupheader.cpp @@ -1,8 +1,7 @@ /*************************************************************************** * Copyright (C) 2012 by Peter Penz <[email protected]> * * * - * Based on the Itemviews NG project from Trolltech Labs: * - * http://qt.gitorious.org/qt-labs/itemviews-ng * + * Based on the Itemviews NG project from Trolltech Labs * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * diff --git a/src/panels/places/placespanel.cpp b/src/panels/places/placespanel.cpp index 8469399a7..34361a5a7 100644 --- a/src/panels/places/placespanel.cpp +++ b/src/panels/places/placespanel.cpp @@ -309,10 +309,10 @@ void PlacesPanel::slotViewContextMenuRequested(const QPointF& pos) const int iconSizeCount = 4; static const IconSizeInfo iconSizes[iconSizeCount] = { - {KIconLoader::SizeSmall, I18N_NOOP2_NOSTRIP("Small icon size", "Small (%1x%2)")}, - {KIconLoader::SizeSmallMedium, I18N_NOOP2_NOSTRIP("Medium icon size", "Medium (%1x%2)")}, - {KIconLoader::SizeMedium, I18N_NOOP2_NOSTRIP("Large icon size", "Large (%1x%2)")}, - {KIconLoader::SizeLarge, I18N_NOOP2_NOSTRIP("Huge icon size", "Huge (%1x%2)")} + {KIconLoader::SizeSmall, I18NC_NOOP("Small icon size", "Small (%1x%2)")}, + {KIconLoader::SizeSmallMedium, I18NC_NOOP("Medium icon size", "Medium (%1x%2)")}, + {KIconLoader::SizeMedium, I18NC_NOOP("Large icon size", "Large (%1x%2)")}, + {KIconLoader::SizeLarge, I18NC_NOOP("Huge icon size", "Huge (%1x%2)")} }; QHash<QAction*, int> iconSizeActionMap; diff --git a/src/panels/terminal/terminalpanel.cpp b/src/panels/terminal/terminalpanel.cpp index 86974d200..861afebee 100644 --- a/src/panels/terminal/terminalpanel.cpp +++ b/src/panels/terminal/terminalpanel.cpp @@ -147,6 +147,7 @@ void TerminalPanel::showEvent(QShowEvent* event) if (m_konsolePart) { connect(m_konsolePart, &KParts::ReadOnlyPart::destroyed, this, &TerminalPanel::terminalExited); m_terminalWidget = m_konsolePart->widget(); + setFocusProxy(m_terminalWidget); m_layout->addWidget(m_terminalWidget); if (m_konsolePartMissingMessage) { m_layout->removeWidget(m_konsolePartMissingMessage); @@ -263,3 +264,8 @@ void TerminalPanel::slotKonsolePartCurrentDirectoryChanged(const QString& dir) const QUrl url(QUrl::fromLocalFile(dir)); emit changeUrl(url); } + +bool TerminalPanel::terminalHasFocus() const +{ + return m_terminalWidget->hasFocus(); +} diff --git a/src/panels/terminal/terminalpanel.h b/src/panels/terminal/terminalpanel.h index f5d66e548..6ab205fe3 100644 --- a/src/panels/terminal/terminalpanel.h +++ b/src/panels/terminal/terminalpanel.h @@ -56,6 +56,7 @@ public: void goHome(); QString currentWorkingDirectory(); bool isHiddenInVisibleWindow() const; + bool terminalHasFocus() const; bool hasProgramRunning() const; QString runningProgramName() const; |
