Merge branch 'master' of bitbucket.org:skunkos/rssguard

This commit is contained in:
Martin Rotter 2015-08-25 15:42:06 +02:00
commit 84e3253342
18 changed files with 88 additions and 18 deletions

View File

@ -17,6 +17,10 @@ You can [support RSS Guard with tiny amounts of money via PayPal](https://www.pa
[![Support RSS Guard now.](http://manlybeachrunningclub.com/wp-content/uploads/2015/01/paypal-donate-button115.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XMWPLPK893VH4)
People who donated:
* Zdenek S. (Sweden).
- - -
Feeds & Videos
-----

View File

@ -1772,6 +1772,10 @@ Automatický update: %5</translation>
<source>&amp;Fetch feed metadata</source>
<translation type="unfinished"/>
</message>
<message>
<source>&amp;Expand/collapse selected feed/category</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>FormRestoreDatabaseSettings</name>

View File

@ -1761,6 +1761,10 @@ Auto-update status: %5</source>
<source>&amp;Fetch feed metadata</source>
<translation type="unfinished"/>
</message>
<message>
<source>&amp;Expand/collapse selected feed/category</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>FormRestoreDatabaseSettings</name>

View File

@ -1761,6 +1761,10 @@ Auto-update status: %5</source>
<source>&amp;Fetch feed metadata</source>
<translation type="unfinished"/>
</message>
<message>
<source>&amp;Expand/collapse selected feed/category</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>FormRestoreDatabaseSettings</name>

View File

@ -1790,6 +1790,10 @@ Auto-update status: %5</source>
<source>&amp;Fetch feed metadata</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Expand/collapse selected feed/category</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FormRestoreDatabaseSettings</name>

View File

@ -1761,6 +1761,10 @@ Auto-update status: %5</source>
<source>&amp;Fetch feed metadata</source>
<translation type="unfinished"/>
</message>
<message>
<source>&amp;Expand/collapse selected feed/category</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>FormRestoreDatabaseSettings</name>

View File

@ -1761,6 +1761,10 @@ Auto-update status: %5</source>
<source>&amp;Fetch feed metadata</source>
<translation type="unfinished"/>
</message>
<message>
<source>&amp;Expand/collapse selected feed/category</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>FormRestoreDatabaseSettings</name>

View File

@ -1761,6 +1761,10 @@ Auto-update status: %5</source>
<source>&amp;Fetch feed metadata</source>
<translation type="unfinished"/>
</message>
<message>
<source>&amp;Expand/collapse selected feed/category</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>FormRestoreDatabaseSettings</name>

View File

@ -463,11 +463,11 @@ Auto-update status: 55 </translation>
</message>
<message>
<source>Metadata not fetched</source>
<translation type="unfinished"/>
<translation>Metadata niet opgehaald</translation>
</message>
<message>
<source>Metadata was not fetched because: %1</source>
<translation type="unfinished"/>
<translation>Metadate niet opgehaald omdat: %1</translation>
</message>
</context>
<context>
@ -654,7 +654,7 @@ Auto-update status: 55 </translation>
</message>
<message>
<source>Context menu for categories</source>
<translation type="unfinished"/>
<translation>Contextmenu voor categorieën</translation>
</message>
</context>
<context>
@ -1771,6 +1771,10 @@ Exporteer feeds die je wilt van het geselecteerde bestand.</translation>
</message>
<message>
<source>&amp;Fetch feed metadata</source>
<translation>&amp;Ophalen van de feed metadata</translation>
</message>
<message>
<source>&amp;Expand/collapse selected feed/category</source>
<translation type="unfinished"/>
</message>
</context>

View File

@ -462,11 +462,11 @@ Uppdateringsstatus: %5</translation>
</message>
<message>
<source>Metadata not fetched</source>
<translation type="unfinished"/>
<translation>Metadata hämtades inte</translation>
</message>
<message>
<source>Metadata was not fetched because: %1</source>
<translation type="unfinished"/>
<translation>Metadata hämtades inte grund av: %1</translation>
</message>
</context>
<context>
@ -653,7 +653,7 @@ Uppdateringsstatus: %5</translation>
</message>
<message>
<source>Context menu for categories</source>
<translation type="unfinished"/>
<translation>Kontextmeny för kategorier</translation>
</message>
</context>
<context>
@ -1769,6 +1769,10 @@ Uppdateringsstatus: %5</translation>
</message>
<message>
<source>&amp;Fetch feed metadata</source>
<translation>&amp;Hämta flödesmetadata</translation>
</message>
<message>
<source>&amp;Expand/collapse selected feed/category</source>
<translation type="unfinished"/>
</message>
</context>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -23,6 +23,8 @@
Fixed:
<ul>
<li>Categories are now not expanded when selected using "Go to next/previous item" in feeds list. (bug #122)</li>
<li>Added action to expand/collapse currently selected item in feeds list. (enhancement #121)</li>
<ul>
<hr/>

View File

@ -278,6 +278,7 @@ void FormMain::setupIcons() {
m_ui->m_actionSelectPreviousMessage->setIcon(icon_theme_factory->fromTheme(QSL("go-up")));
m_ui->m_actionShowOnlyUnreadFeeds->setIcon(icon_theme_factory->fromTheme(QSL("mail-mark-unread")));
m_ui->m_actionFetchFeedMetadata->setIcon(icon_theme_factory->fromTheme(QSL("download-manager")));
m_ui->m_actionExpandCollapseFeedCategory->setIcon(icon_theme_factory->fromTheme(QSL("expand-collapse")));
// Setup icons for underlying components: opened web browsers...
foreach (WebBrowser *browser, WebBrowser::runningWebBrowsers()) {

View File

@ -146,6 +146,7 @@
<addaction name="m_actionFetchFeedMetadata"/>
<addaction name="separator"/>
<addaction name="m_actionShowOnlyUnreadFeeds"/>
<addaction name="m_actionExpandCollapseFeedCategory"/>
<addaction name="separator"/>
<addaction name="m_actionSelectNextFeedCategory"/>
<addaction name="m_actionSelectPreviousFeedCategory"/>
@ -671,6 +672,14 @@
<string notr="true">Ctrl+Shift+F</string>
</property>
</action>
<action name="m_actionExpandCollapseFeedCategory">
<property name="text">
<string>&amp;Expand/collapse selected feed/category</string>
</property>
<property name="shortcut">
<string notr="true">E</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>

View File

@ -324,6 +324,7 @@ void FeedMessageViewer::updateFeedButtonsAvailability() {
form_main->m_ui->m_actionUpdateSelectedFeeds->setEnabled(!critical_action_running && feed_selected);
form_main->m_ui->m_actionViewSelectedItemsNewspaperMode->setEnabled(feed_selected);
form_main->m_ui->m_actionFetchFeedMetadata->setEnabled(feed_selected);
form_main->m_ui->m_actionExpandCollapseFeedCategory->setEnabled(feed_selected);
form_main->m_ui->m_menuAddItem->setEnabled(!critical_action_running);
}
@ -395,6 +396,8 @@ void FeedMessageViewer::createConnections() {
SIGNAL(triggered()), m_feedsView, SLOT(markAllFeedsRead()));
connect(form_main->m_ui->m_actionMarkSelectedFeedsAsRead,
SIGNAL(triggered()), m_feedsView, SLOT(markSelectedFeedsRead()));
connect(form_main->m_ui->m_actionExpandCollapseFeedCategory,
SIGNAL(triggered()), m_feedsView, SLOT(expandCollapseCurrentItem()));
connect(form_main->m_ui->m_actionFetchFeedMetadata, SIGNAL(triggered()),
m_feedsView, SLOT(fetchMetadataForSelectedFeed()));
connect(form_main->m_ui->m_actionMarkSelectedFeedsAsUnread,

View File

@ -143,6 +143,19 @@ void FeedsView::invalidateReadFeedsFilter(bool set_new_value, bool show_unread_o
QTimer::singleShot(0, m_proxyModel, SLOT(invalidateFilter()));
}
void FeedsView::expandCollapseCurrentItem() {
if (selectionModel()->selectedRows().size() == 1) {
QModelIndex index = selectionModel()->selectedRows().at(0);
if (!index.child(0, 0).isValid() && index.parent().isValid()) {
setCurrentIndex(index.parent());
index = index.parent();
}
isExpanded(index) ? collapse(index) : expand(index);
}
}
void FeedsView::updateAllFeeds() {
emit feedsUpdateRequested(allFeeds());
}
@ -469,15 +482,17 @@ void FeedsView::updateCountsOfParticularFeed(Feed *feed, bool update_total_too)
}
void FeedsView::selectNextItem() {
// NOTE: Bug #122 requested to not expand in here.
/*
if (!isExpanded(currentIndex())) {
expand(currentIndex());
}
*/
QModelIndex index_next = moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier);
if (index_next.isValid()) {
setCurrentIndex(index_next);
selectionModel()->select(index_next, QItemSelectionModel::Select | QItemSelectionModel::Rows);
setFocus();
}
}
@ -485,15 +500,16 @@ void FeedsView::selectNextItem() {
void FeedsView::selectPreviousItem() {
QModelIndex index_previous = moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier);
// NOTE: Bug #122 requested to not expand in here.
/*
if (!isExpanded(index_previous)) {
expand(index_previous);
}
index_previous = moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier);
}
*/
if (index_previous.isValid()) {
setCurrentIndex(index_previous);
selectionModel()->select(index_previous, QItemSelectionModel::Select | QItemSelectionModel::Rows);
setFocus();
}
}
@ -646,7 +662,7 @@ void FeedsView::validateItemAfterDragDrop(const QModelIndex &source_index) {
QModelIndex mapped = m_proxyModel->mapFromSource(source_index);
if (mapped.isValid()) {
setExpanded(mapped, true);
expand(mapped);
setCurrentIndex(mapped);
}
}

View File

@ -69,6 +69,8 @@ class FeedsView : public QTreeView {
public slots:
void invalidateReadFeedsFilter(bool set_new_value = false, bool show_unread_only = false);
void expandCollapseCurrentItem();
void fetchMetadataForSelectedFeed();
// Feed updating.
void updateAllFeeds();
@ -82,8 +84,6 @@ class FeedsView : public QTreeView {
void markAllFeedsReadStatus(int read);
void markAllFeedsRead();
void fetchMetadataForSelectedFeed();
// Newspaper accessors.
void openSelectedFeedsInNewspaperMode();

View File

@ -256,10 +256,9 @@ void MessagesView::openSelectedSourceMessagesExternally() {
QString link = m_sourceModel->messageAt(m_proxyModel->mapToSource(index).row()).m_url;
if (!WebFactory::instance()->openUrlInExternalBrowser(link)) {
MessageBox::show(this,
QMessageBox::Critical,
tr("Problem with starting external web browser"),
tr("External web browser could not be started."));
qApp->showGuiMessage(tr("Problem with starting external web browser"),
tr("External web browser could not be started."),
QSystemTrayIcon::Critical);
return;
}
}