Fixed #146.
This commit is contained in:
parent
4affb202d9
commit
91e9dd2a46
@ -1,6 +1,9 @@
|
||||
3.0.2
|
||||
—————
|
||||
|
||||
Added:
|
||||
▪ Added generic "Add new feed" action, which can be accessed via "Feeds & messages" menu. (issue #146)
|
||||
|
||||
Changed:
|
||||
▪ Some GUI refinements and fixes.
|
||||
▪ Added more logging entries.
|
||||
|
@ -108,7 +108,7 @@ QList<QAction*> FormMain::allActions() {
|
||||
actions << m_ui->m_actionSwitchStatusBar;
|
||||
actions << m_ui->m_actionSwitchMessageListOrientation;
|
||||
|
||||
// Add web browser actions
|
||||
// Add web browser actions.
|
||||
actions << m_ui->m_actionAddBrowser;
|
||||
actions << m_ui->m_actionCloseCurrentTab;
|
||||
actions << m_ui->m_actionCloseAllTabs;
|
||||
@ -132,6 +132,9 @@ QList<QAction*> FormMain::allActions() {
|
||||
actions << m_ui->m_actionEditSelectedItem;
|
||||
actions << m_ui->m_actionDeleteSelectedItem;
|
||||
actions << m_ui->m_actionServiceAdd;
|
||||
actions << m_ui->m_actionServiceEdit;
|
||||
actions << m_ui->m_actionServiceDelete;
|
||||
actions << m_ui->m_actionAddFeedIntoSelectedAccount;
|
||||
actions << m_ui->m_actionViewSelectedItemsNewspaperMode;
|
||||
actions << m_ui->m_actionSelectNextItem;
|
||||
actions << m_ui->m_actionSelectPreviousItem;
|
||||
@ -383,6 +386,7 @@ void FormMain::setupIcons() {
|
||||
m_ui->m_actionServiceAdd->setIcon(icon_theme_factory->fromTheme(QSL("item-new")));
|
||||
m_ui->m_actionServiceEdit->setIcon(icon_theme_factory->fromTheme(QSL("item-edit")));
|
||||
m_ui->m_actionServiceDelete->setIcon(icon_theme_factory->fromTheme(QSL("item-remove")));
|
||||
m_ui->m_actionAddFeedIntoSelectedAccount->setIcon(icon_theme_factory->fromTheme(QSL("item-new")));
|
||||
|
||||
// Setup icons for underlying components: opened web browsers...
|
||||
foreach (WebBrowser *browser, WebBrowser::runningWebBrowsers()) {
|
||||
|
@ -137,6 +137,7 @@
|
||||
<addaction name="m_actionUpdateSelectedItems"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="m_menuAddItem"/>
|
||||
<addaction name="m_actionAddFeedIntoSelectedAccount"/>
|
||||
<addaction name="m_actionEditSelectedItem"/>
|
||||
<addaction name="m_actionDeleteSelectedItem"/>
|
||||
<addaction name="separator"/>
|
||||
@ -781,6 +782,14 @@
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
</action>
|
||||
<action name="m_actionAddFeedIntoSelectedAccount">
|
||||
<property name="text">
|
||||
<string>Add new feed into selected account</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
@ -213,6 +213,7 @@ void FeedMessageViewer::updateFeedButtonsAvailability() {
|
||||
|
||||
form_main->m_ui->m_actionServiceDelete->setEnabled(service_selected);
|
||||
form_main->m_ui->m_actionServiceEdit->setEnabled(service_selected);
|
||||
form_main->m_ui->m_actionAddFeedIntoSelectedAccount->setEnabled(service_selected);
|
||||
|
||||
form_main->m_ui->m_menuAddItem->setEnabled(!critical_action_running);
|
||||
form_main->m_ui->m_menuAccounts->setEnabled(!critical_action_running);
|
||||
@ -254,6 +255,8 @@ void FeedMessageViewer::createConnections() {
|
||||
form_main->m_ui->m_tabWidget, SLOT(addBrowserWithMessages(QList<Message>)));
|
||||
|
||||
// Toolbar forwardings.
|
||||
connect(form_main->m_ui->m_actionAddFeedIntoSelectedAccount, SIGNAL(triggered()),
|
||||
m_feedsView, SLOT(addFeedIntoSelectedAccount()));
|
||||
connect(form_main->m_ui->m_actionCleanupDatabase,
|
||||
SIGNAL(triggered()), this, SLOT(showDbCleanupAssistant()));
|
||||
connect(form_main->m_ui->m_actionSwitchImportanceOfSelectedMessages,
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "gui/styleditemdelegatewithoutfocus.h"
|
||||
#include "gui/dialogs/formmain.h"
|
||||
#include "services/abstract/feed.h"
|
||||
#include "services/abstract/serviceroot.h"
|
||||
#include "services/standard/standardcategory.h"
|
||||
#include "services/standard/standardfeed.h"
|
||||
#include "services/standard/gui/formstandardcategorydetails.h"
|
||||
@ -133,6 +134,24 @@ void FeedsView::loadExpandedStates() {
|
||||
static_cast<Qt::SortOrder>(qApp->settings()->value(GROUP(GUI), SETTING(GUI::DefaultSortOrderFeeds)).toInt()));
|
||||
}
|
||||
|
||||
void FeedsView::addFeedIntoSelectedAccount() {
|
||||
RootItem *selected = selectedItem();
|
||||
|
||||
if (selected->kind() == RootItemKind::ServiceRoot) {
|
||||
ServiceRoot *root = selected->toServiceRoot();
|
||||
|
||||
if (root->supportsFeedAddingByUrl()) {
|
||||
root->addFeedByUrl();
|
||||
}
|
||||
else {
|
||||
qApp->showGuiMessage(tr("Not supported"),
|
||||
tr("Selected account does not support adding of new feeds."),
|
||||
QSystemTrayIcon::Warning,
|
||||
qApp->mainForm(), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FeedsView::expandCollapseCurrentItem() {
|
||||
if (selectionModel()->selectedRows().size() == 1) {
|
||||
QModelIndex index = selectionModel()->selectedRows().at(0);
|
||||
|
@ -62,6 +62,7 @@ class FeedsView : public QTreeView {
|
||||
void loadExpandedStates();
|
||||
|
||||
public slots:
|
||||
void addFeedIntoSelectedAccount();
|
||||
void expandCollapseCurrentItem();
|
||||
|
||||
// Feed updating.
|
||||
|
Loading…
x
Reference in New Issue
Block a user