Probably fixed #121.
This commit is contained in:
parent
5da26eee69
commit
6c36613da1
7 changed files with 30 additions and 5 deletions
BIN
resources/graphics/icons/mini-kfaenza/expand-collapse.png
Normal file
BIN
resources/graphics/icons/mini-kfaenza/expand-collapse.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
|
@ -24,6 +24,7 @@
|
||||||
Fixed:
|
Fixed:
|
||||||
<ul>
|
<ul>
|
||||||
<li>Categories are now not expanded when selected using "Go to next/previous item" in feeds list. (bug #122)</li>
|
<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>
|
<ul>
|
||||||
|
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
|
@ -278,6 +278,7 @@ void FormMain::setupIcons() {
|
||||||
m_ui->m_actionSelectPreviousMessage->setIcon(icon_theme_factory->fromTheme(QSL("go-up")));
|
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_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_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...
|
// Setup icons for underlying components: opened web browsers...
|
||||||
foreach (WebBrowser *browser, WebBrowser::runningWebBrowsers()) {
|
foreach (WebBrowser *browser, WebBrowser::runningWebBrowsers()) {
|
||||||
|
|
|
@ -146,6 +146,7 @@
|
||||||
<addaction name="m_actionFetchFeedMetadata"/>
|
<addaction name="m_actionFetchFeedMetadata"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="m_actionShowOnlyUnreadFeeds"/>
|
<addaction name="m_actionShowOnlyUnreadFeeds"/>
|
||||||
|
<addaction name="m_actionExpandCollapseFeedCategory"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="m_actionSelectNextFeedCategory"/>
|
<addaction name="m_actionSelectNextFeedCategory"/>
|
||||||
<addaction name="m_actionSelectPreviousFeedCategory"/>
|
<addaction name="m_actionSelectPreviousFeedCategory"/>
|
||||||
|
@ -671,6 +672,14 @@
|
||||||
<string notr="true">Ctrl+Shift+F</string>
|
<string notr="true">Ctrl+Shift+F</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="m_actionExpandCollapseFeedCategory">
|
||||||
|
<property name="text">
|
||||||
|
<string>&Expand/collapse selected feed/category</string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string notr="true">E</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
|
|
|
@ -317,6 +317,7 @@ void FeedMessageViewer::updateFeedButtonsAvailability() {
|
||||||
form_main->m_ui->m_actionUpdateSelectedFeeds->setEnabled(!critical_action_running && feed_selected);
|
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_actionViewSelectedItemsNewspaperMode->setEnabled(feed_selected);
|
||||||
form_main->m_ui->m_actionFetchFeedMetadata->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);
|
form_main->m_ui->m_menuAddItem->setEnabled(!critical_action_running);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -388,6 +389,8 @@ void FeedMessageViewer::createConnections() {
|
||||||
SIGNAL(triggered()), m_feedsView, SLOT(markAllFeedsRead()));
|
SIGNAL(triggered()), m_feedsView, SLOT(markAllFeedsRead()));
|
||||||
connect(form_main->m_ui->m_actionMarkSelectedFeedsAsRead,
|
connect(form_main->m_ui->m_actionMarkSelectedFeedsAsRead,
|
||||||
SIGNAL(triggered()), m_feedsView, SLOT(markSelectedFeedsRead()));
|
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()),
|
connect(form_main->m_ui->m_actionFetchFeedMetadata, SIGNAL(triggered()),
|
||||||
m_feedsView, SLOT(fetchMetadataForSelectedFeed()));
|
m_feedsView, SLOT(fetchMetadataForSelectedFeed()));
|
||||||
connect(form_main->m_ui->m_actionMarkSelectedFeedsAsUnread,
|
connect(form_main->m_ui->m_actionMarkSelectedFeedsAsUnread,
|
||||||
|
|
|
@ -143,6 +143,19 @@ void FeedsView::invalidateReadFeedsFilter(bool set_new_value, bool show_unread_o
|
||||||
QTimer::singleShot(0, m_proxyModel, SLOT(invalidateFilter()));
|
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() {
|
void FeedsView::updateAllFeeds() {
|
||||||
emit feedsUpdateRequested(allFeeds());
|
emit feedsUpdateRequested(allFeeds());
|
||||||
}
|
}
|
||||||
|
@ -480,7 +493,6 @@ void FeedsView::selectNextItem() {
|
||||||
|
|
||||||
if (index_next.isValid()) {
|
if (index_next.isValid()) {
|
||||||
setCurrentIndex(index_next);
|
setCurrentIndex(index_next);
|
||||||
selectionModel()->select(index_next, QItemSelectionModel::Select | QItemSelectionModel::Rows);
|
|
||||||
setFocus();
|
setFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -498,7 +510,6 @@ void FeedsView::selectPreviousItem() {
|
||||||
|
|
||||||
if (index_previous.isValid()) {
|
if (index_previous.isValid()) {
|
||||||
setCurrentIndex(index_previous);
|
setCurrentIndex(index_previous);
|
||||||
selectionModel()->select(index_previous, QItemSelectionModel::Select | QItemSelectionModel::Rows);
|
|
||||||
setFocus();
|
setFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -651,7 +662,7 @@ void FeedsView::validateItemAfterDragDrop(const QModelIndex &source_index) {
|
||||||
QModelIndex mapped = m_proxyModel->mapFromSource(source_index);
|
QModelIndex mapped = m_proxyModel->mapFromSource(source_index);
|
||||||
|
|
||||||
if (mapped.isValid()) {
|
if (mapped.isValid()) {
|
||||||
setExpanded(mapped, true);
|
expand(mapped);
|
||||||
setCurrentIndex(mapped);
|
setCurrentIndex(mapped);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,6 +69,8 @@ class FeedsView : public QTreeView {
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void invalidateReadFeedsFilter(bool set_new_value = false, bool show_unread_only = false);
|
void invalidateReadFeedsFilter(bool set_new_value = false, bool show_unread_only = false);
|
||||||
|
void expandCollapseCurrentItem();
|
||||||
|
void fetchMetadataForSelectedFeed();
|
||||||
|
|
||||||
// Feed updating.
|
// Feed updating.
|
||||||
void updateAllFeeds();
|
void updateAllFeeds();
|
||||||
|
@ -82,8 +84,6 @@ class FeedsView : public QTreeView {
|
||||||
void markAllFeedsReadStatus(int read);
|
void markAllFeedsReadStatus(int read);
|
||||||
void markAllFeedsRead();
|
void markAllFeedsRead();
|
||||||
|
|
||||||
void fetchMetadataForSelectedFeed();
|
|
||||||
|
|
||||||
// Newspaper accessors.
|
// Newspaper accessors.
|
||||||
void openSelectedFeedsInNewspaperMode();
|
void openSelectedFeedsInNewspaperMode();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue