Fixed msg opening.
This commit is contained in:
parent
a86d53ceef
commit
5c1915c98b
@ -7,7 +7,7 @@ Added:
|
|||||||
|
|
||||||
Fixed:
|
Fixed:
|
||||||
<ul>
|
<ul>
|
||||||
<li></li>
|
<li>Double-clickin on message now results in opening source article in mini web browser.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<hr/>
|
<hr/>
|
||||||
|
@ -287,6 +287,7 @@ void FeedMessageViewer::createConnections() {
|
|||||||
connect(m_feedsView, SIGNAL(messageCountsChanged(int,int,bool)), this, SLOT(updateTrayIconStatus(int,int,bool)));
|
connect(m_feedsView, SIGNAL(messageCountsChanged(int,int,bool)), this, SLOT(updateTrayIconStatus(int,int,bool)));
|
||||||
|
|
||||||
// Message openers.
|
// Message openers.
|
||||||
|
connect(m_messagesView, SIGNAL(openLinkMiniBrowser(QString)), m_messagesBrowser, SLOT(navigateToUrl(QString)));
|
||||||
connect(m_messagesView, SIGNAL(openMessagesInNewspaperView(QList<Message>)),
|
connect(m_messagesView, SIGNAL(openMessagesInNewspaperView(QList<Message>)),
|
||||||
form_main->m_ui->m_tabWidget, SLOT(addBrowserWithMessages(QList<Message>)));
|
form_main->m_ui->m_tabWidget, SLOT(addBrowserWithMessages(QList<Message>)));
|
||||||
connect(m_messagesView, SIGNAL(openLinkNewTab(QString)),
|
connect(m_messagesView, SIGNAL(openLinkNewTab(QString)),
|
||||||
@ -311,7 +312,7 @@ void FeedMessageViewer::createConnections() {
|
|||||||
connect(form_main->m_ui->m_actionMarkSelectedMessagesAsUnread,
|
connect(form_main->m_ui->m_actionMarkSelectedMessagesAsUnread,
|
||||||
SIGNAL(triggered()), m_messagesView, SLOT(markSelectedMessagesUnread()));
|
SIGNAL(triggered()), m_messagesView, SLOT(markSelectedMessagesUnread()));
|
||||||
connect(form_main->m_ui->m_actionOpenSelectedSourceArticlesExternally,
|
connect(form_main->m_ui->m_actionOpenSelectedSourceArticlesExternally,
|
||||||
SIGNAL(triggered()), m_messagesView, SLOT(openSelectedSourceArticlesExternally()));
|
SIGNAL(triggered()), m_messagesView, SLOT(openSelectedSourceMessagesExternally()));
|
||||||
connect(form_main->m_ui->m_actionOpenSelectedSourceArticlesInternally,
|
connect(form_main->m_ui->m_actionOpenSelectedSourceArticlesInternally,
|
||||||
SIGNAL(triggered()), m_messagesView, SLOT(openSelectedSourceMessagesInternally()));
|
SIGNAL(triggered()), m_messagesView, SLOT(openSelectedSourceMessagesInternally()));
|
||||||
connect(form_main->m_ui->m_actionOpenSelectedMessagesInternally,
|
connect(form_main->m_ui->m_actionOpenSelectedMessagesInternally,
|
||||||
|
@ -56,9 +56,7 @@ void MessagesView::setSortingEnabled(bool enable) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MessagesView::createConnections() {
|
void MessagesView::createConnections() {
|
||||||
// Make sure that source message is opened
|
connect(this, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(openSelectedSourceMessagesInternallyNoNewTab()));
|
||||||
// in new tab on double click.
|
|
||||||
connect(this, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(openSelectedSourceArticlesExternally()));
|
|
||||||
|
|
||||||
// Adjust columns when layout gets changed.
|
// Adjust columns when layout gets changed.
|
||||||
connect(header(), SIGNAL(geometriesChanged()), this, SLOT(adjustColumns()));
|
connect(header(), SIGNAL(geometriesChanged()), this, SLOT(adjustColumns()));
|
||||||
@ -249,7 +247,7 @@ void MessagesView::loadFeeds(const FeedsSelection &selection) {
|
|||||||
emit currentMessagesRemoved();
|
emit currentMessagesRemoved();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MessagesView::openSelectedSourceArticlesExternally() {
|
void MessagesView::openSelectedSourceMessagesExternally() {
|
||||||
foreach (const QModelIndex &index, selectionModel()->selectedRows()) {
|
foreach (const QModelIndex &index, selectionModel()->selectedRows()) {
|
||||||
QString link = m_sourceModel->messageAt(m_proxyModel->mapToSource(index).row()).m_url;
|
QString link = m_sourceModel->messageAt(m_proxyModel->mapToSource(index).row()).m_url;
|
||||||
|
|
||||||
@ -263,8 +261,10 @@ void MessagesView::openSelectedSourceArticlesExternally() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Finally, mark opened messages as read.
|
// Finally, mark opened messages as read.
|
||||||
|
if (selectionModel()->selectedRows().size() > 1) {
|
||||||
markSelectedMessagesRead();
|
markSelectedMessagesRead();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MessagesView::openSelectedSourceMessagesInternally() {
|
void MessagesView::openSelectedSourceMessagesInternally() {
|
||||||
foreach (const QModelIndex &index, selectionModel()->selectedRows()) {
|
foreach (const QModelIndex &index, selectionModel()->selectedRows()) {
|
||||||
@ -282,8 +282,17 @@ void MessagesView::openSelectedSourceMessagesInternally() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Finally, mark opened messages as read.
|
// Finally, mark opened messages as read.
|
||||||
|
if (selectionModel()->selectedRows().size() > 1) {
|
||||||
markSelectedMessagesRead();
|
markSelectedMessagesRead();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MessagesView::openSelectedSourceMessagesInternallyNoNewTab() {
|
||||||
|
if (selectionModel()->selectedRows().size() == 1) {
|
||||||
|
emit openLinkMiniBrowser(
|
||||||
|
m_sourceModel->messageAt(m_proxyModel->mapToSource(selectionModel()->selectedRows().at(0)).row()).m_url);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MessagesView::openSelectedMessagesInternally() {
|
void MessagesView::openSelectedMessagesInternally() {
|
||||||
QList<Message> messages;
|
QList<Message> messages;
|
||||||
|
@ -63,8 +63,9 @@ class MessagesView : public QTreeView {
|
|||||||
void loadFeeds(const FeedsSelection &selection);
|
void loadFeeds(const FeedsSelection &selection);
|
||||||
|
|
||||||
// Message manipulators.
|
// Message manipulators.
|
||||||
void openSelectedSourceArticlesExternally();
|
void openSelectedSourceMessagesExternally();
|
||||||
void openSelectedSourceMessagesInternally();
|
void openSelectedSourceMessagesInternally();
|
||||||
|
void openSelectedSourceMessagesInternallyNoNewTab();
|
||||||
void openSelectedMessagesInternally();
|
void openSelectedMessagesInternally();
|
||||||
void sendSelectedMessageViaEmail();
|
void sendSelectedMessageViaEmail();
|
||||||
|
|
||||||
@ -110,6 +111,7 @@ class MessagesView : public QTreeView {
|
|||||||
signals:
|
signals:
|
||||||
// Link/message openers.
|
// Link/message openers.
|
||||||
void openLinkNewTab(const QString &link);
|
void openLinkNewTab(const QString &link);
|
||||||
|
void openLinkMiniBrowser(const QString &link);
|
||||||
void openMessagesInNewspaperView(const QList<Message> &messages);
|
void openMessagesInNewspaperView(const QList<Message> &messages);
|
||||||
|
|
||||||
// Notify others about message selections.
|
// Notify others about message selections.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user