mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 09:50:12 +00:00
Merge branch 'Applications/17.04'
This commit is contained in:
commit
0c8ef2977e
|
@ -1453,6 +1453,8 @@ void DolphinMainWindow::connectViewSignals(DolphinViewContainer* container)
|
|||
this, static_cast<void(DolphinMainWindow::*)()>(&DolphinMainWindow::goBack));
|
||||
connect(view, &DolphinView::goForwardRequested,
|
||||
this, static_cast<void(DolphinMainWindow::*)()>(&DolphinMainWindow::goForward));
|
||||
connect(view, &DolphinView::urlActivated,
|
||||
this, &DolphinMainWindow::handleUrl);
|
||||
|
||||
const KUrlNavigator* navigator = container->urlNavigator();
|
||||
connect(navigator, &KUrlNavigator::urlChanged,
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
|
||||
<kpartgui name="dolphinpart" version="11" translationDomain="dolphin">
|
||||
<kpartgui name="dolphinpart" version="12" translationDomain="dolphin">
|
||||
<MenuBar>
|
||||
<Menu name="edit"><text>&Edit</text>
|
||||
<Action name="new_menu"/>
|
||||
<Separator/>
|
||||
<Action name="rename"/>
|
||||
<Action name="move_to_trash" />
|
||||
<Action name="delete"/>
|
||||
<Action name="deletefile"/>
|
||||
<Action name="editMimeType"/>
|
||||
<Action name="properties"/>
|
||||
<Separator/>
|
||||
|
@ -53,14 +53,14 @@
|
|||
<State name="has_selection" >
|
||||
<enable>
|
||||
<Action name="move_to_trash" />
|
||||
<Action name="delete" />
|
||||
<Action name="deletefile" />
|
||||
</enable>
|
||||
</State>
|
||||
<State name="has_no_selection" >
|
||||
<disable>
|
||||
<Action name="rename" />
|
||||
<Action name="move_to_trash" />
|
||||
<Action name="delete" />
|
||||
<Action name="deletefile" />
|
||||
</disable>
|
||||
</State>
|
||||
</kpartgui>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
|
||||
<kpartgui name="dolphin" version="14">
|
||||
<kpartgui name="dolphin" version="15">
|
||||
<MenuBar>
|
||||
<Menu name="file">
|
||||
<Action name="new_menu" />
|
||||
|
@ -10,7 +10,7 @@
|
|||
<Separator/>
|
||||
<Action name="rename" />
|
||||
<Action name="move_to_trash" />
|
||||
<Action name="delete" />
|
||||
<Action name="deletefile" />
|
||||
<Separator/>
|
||||
<Action name="properties" />
|
||||
</Menu>
|
||||
|
@ -58,7 +58,7 @@
|
|||
<Action name="edit_copy" />
|
||||
<Action name="rename" />
|
||||
<Action name="move_to_trash" />
|
||||
<Action name="delete" />
|
||||
<Action name="deletefile" />
|
||||
<Action name="invert_selection" />
|
||||
<Separator/>
|
||||
<Action name="go_back" />
|
||||
|
@ -71,7 +71,7 @@
|
|||
<Action name="edit_copy" />
|
||||
<Action name="rename" />
|
||||
<Action name="move_to_trash" />
|
||||
<Action name="delete" />
|
||||
<Action name="deletefile" />
|
||||
<Action name="invert_selection" />
|
||||
</enable>
|
||||
</State>
|
||||
|
@ -81,7 +81,7 @@
|
|||
<Action name="edit_copy" />
|
||||
<Action name="rename" />
|
||||
<Action name="move_to_trash" />
|
||||
<Action name="delete" />
|
||||
<Action name="deletefile" />
|
||||
<Action name="delete_shortcut" />
|
||||
<Action name="invert_selection" />
|
||||
</disable>
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
#include <QTime>
|
||||
#include <QMap>
|
||||
#include <QCollator>
|
||||
|
||||
struct KBalooRolesProviderSingleton
|
||||
{
|
||||
|
@ -159,7 +160,11 @@ KBalooRolesProvider::KBalooRolesProvider() :
|
|||
|
||||
QString KBalooRolesProvider::tagsFromValues(const QStringList& values) const
|
||||
{
|
||||
return values.join(QStringLiteral(", "));
|
||||
QStringList alphabeticalOrderTags = values;
|
||||
QCollator coll;
|
||||
coll.setNumericMode(true);
|
||||
std::sort(alphabeticalOrderTags.begin(), alphabeticalOrderTags.end(), [&](const QString& s1, const QString& s2){ return coll.compare(s1, s2) < 0; });
|
||||
return alphabeticalOrderTags.join(QStringLiteral(", "));
|
||||
}
|
||||
|
||||
QString KBalooRolesProvider::orientationFromValue(int value) const
|
||||
|
|
|
@ -62,6 +62,7 @@ protected:
|
|||
private:
|
||||
/**
|
||||
* @return User visible string for the given tag-values.
|
||||
* The tag-values are sorted in alphabetical order.
|
||||
*/
|
||||
QString tagsFromValues(const QStringList& values) const;
|
||||
|
||||
|
|
|
@ -182,6 +182,7 @@ DolphinView::DolphinView(const QUrl& url, QWidget* parent) :
|
|||
this, &DolphinView::slotSelectionChanged);
|
||||
|
||||
m_toolTipManager = new ToolTipManager(this);
|
||||
connect(m_toolTipManager, &ToolTipManager::urlActivated, this, &DolphinView::urlActivated);
|
||||
|
||||
m_versionControlObserver = new VersionControlObserver(this);
|
||||
m_versionControlObserver->setModel(m_model);
|
||||
|
|
|
@ -544,6 +544,12 @@ signals:
|
|||
*/
|
||||
void toggleActiveViewRequested();
|
||||
|
||||
/**
|
||||
* Is emitted when the user clicks a tag or a link
|
||||
* in the metadata widget of a tooltip.
|
||||
*/
|
||||
void urlActivated(const QUrl& url);
|
||||
|
||||
protected:
|
||||
/** Changes the zoom level if Control is pressed during a wheel event. */
|
||||
virtual void wheelEvent(QWheelEvent* event) Q_DECL_OVERRIDE;
|
||||
|
|
|
@ -67,10 +67,14 @@ DolphinFileMetaDataWidget::DolphinFileMetaDataWidget(QWidget* parent) :
|
|||
m_fileMetaDataWidget = new KFileMetaDataWidget(this);
|
||||
connect(m_fileMetaDataWidget, &KFileMetaDataWidget::metaDataRequestFinished,
|
||||
this, &DolphinFileMetaDataWidget::metaDataRequestFinished);
|
||||
connect(m_fileMetaDataWidget, &KFileMetaDataWidget::urlActivated,
|
||||
this, &DolphinFileMetaDataWidget::urlActivated);
|
||||
#else
|
||||
m_fileMetaDataWidget = new Baloo::FileMetaDataWidget(this);
|
||||
connect(m_fileMetaDataWidget, &Baloo::FileMetaDataWidget::metaDataRequestFinished,
|
||||
this, &DolphinFileMetaDataWidget::metaDataRequestFinished);
|
||||
connect(m_fileMetaDataWidget, &Baloo::FileMetaDataWidget::urlActivated,
|
||||
this, &DolphinFileMetaDataWidget::urlActivated);
|
||||
#endif
|
||||
m_fileMetaDataWidget->setForegroundRole(QPalette::ToolTipText);
|
||||
m_fileMetaDataWidget->setReadOnly(true);
|
||||
|
|
|
@ -69,6 +69,12 @@ signals:
|
|||
*/
|
||||
void metaDataRequestFinished(const KFileItemList& items);
|
||||
|
||||
/**
|
||||
* Is emitted when the user clicks a tag or a link
|
||||
* in the metadata widget.
|
||||
*/
|
||||
void urlActivated(const QUrl& url);
|
||||
|
||||
private:
|
||||
QLabel* m_preview;
|
||||
QLabel* m_name;
|
||||
|
|
|
@ -86,6 +86,8 @@ void ToolTipManager::showToolTip(const KFileItem& item, const QRectF& itemRect,
|
|||
m_fileMetaDataWidget = new DolphinFileMetaDataWidget();
|
||||
connect(m_fileMetaDataWidget, &DolphinFileMetaDataWidget::metaDataRequestFinished,
|
||||
this, &ToolTipManager::slotMetaDataRequestFinished);
|
||||
connect(m_fileMetaDataWidget, &DolphinFileMetaDataWidget::urlActivated,
|
||||
this, &ToolTipManager::urlActivated);
|
||||
|
||||
m_contentRetrievalTimer->start();
|
||||
m_showToolTipTimer->start();
|
||||
|
|
|
@ -58,6 +58,13 @@ public:
|
|||
*/
|
||||
void hideToolTip();
|
||||
|
||||
signals:
|
||||
/**
|
||||
* Is emitted when the user clicks a tag or a link
|
||||
* in the metadata widget.
|
||||
*/
|
||||
void urlActivated(const QUrl& url);
|
||||
|
||||
private slots:
|
||||
void startContentRetrieval();
|
||||
void setPreviewPix(const KFileItem& item, const QPixmap& pix);
|
||||
|
|
Loading…
Reference in a new issue