Fixed #146.
This commit is contained in:
parent
4affb202d9
commit
91e9dd2a46
6 changed files with 40 additions and 1 deletions
|
@ -1,6 +1,9 @@
|
||||||
3.0.2
|
3.0.2
|
||||||
—————
|
—————
|
||||||
|
|
||||||
|
Added:
|
||||||
|
▪ Added generic "Add new feed" action, which can be accessed via "Feeds & messages" menu. (issue #146)
|
||||||
|
|
||||||
Changed:
|
Changed:
|
||||||
▪ Some GUI refinements and fixes.
|
▪ Some GUI refinements and fixes.
|
||||||
▪ Added more logging entries.
|
▪ Added more logging entries.
|
||||||
|
|
|
@ -108,7 +108,7 @@ QList<QAction*> FormMain::allActions() {
|
||||||
actions << m_ui->m_actionSwitchStatusBar;
|
actions << m_ui->m_actionSwitchStatusBar;
|
||||||
actions << m_ui->m_actionSwitchMessageListOrientation;
|
actions << m_ui->m_actionSwitchMessageListOrientation;
|
||||||
|
|
||||||
// Add web browser actions
|
// Add web browser actions.
|
||||||
actions << m_ui->m_actionAddBrowser;
|
actions << m_ui->m_actionAddBrowser;
|
||||||
actions << m_ui->m_actionCloseCurrentTab;
|
actions << m_ui->m_actionCloseCurrentTab;
|
||||||
actions << m_ui->m_actionCloseAllTabs;
|
actions << m_ui->m_actionCloseAllTabs;
|
||||||
|
@ -132,6 +132,9 @@ QList<QAction*> FormMain::allActions() {
|
||||||
actions << m_ui->m_actionEditSelectedItem;
|
actions << m_ui->m_actionEditSelectedItem;
|
||||||
actions << m_ui->m_actionDeleteSelectedItem;
|
actions << m_ui->m_actionDeleteSelectedItem;
|
||||||
actions << m_ui->m_actionServiceAdd;
|
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_actionViewSelectedItemsNewspaperMode;
|
||||||
actions << m_ui->m_actionSelectNextItem;
|
actions << m_ui->m_actionSelectNextItem;
|
||||||
actions << m_ui->m_actionSelectPreviousItem;
|
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_actionServiceAdd->setIcon(icon_theme_factory->fromTheme(QSL("item-new")));
|
||||||
m_ui->m_actionServiceEdit->setIcon(icon_theme_factory->fromTheme(QSL("item-edit")));
|
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_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...
|
// Setup icons for underlying components: opened web browsers...
|
||||||
foreach (WebBrowser *browser, WebBrowser::runningWebBrowsers()) {
|
foreach (WebBrowser *browser, WebBrowser::runningWebBrowsers()) {
|
||||||
|
|
|
@ -137,6 +137,7 @@
|
||||||
<addaction name="m_actionUpdateSelectedItems"/>
|
<addaction name="m_actionUpdateSelectedItems"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="m_menuAddItem"/>
|
<addaction name="m_menuAddItem"/>
|
||||||
|
<addaction name="m_actionAddFeedIntoSelectedAccount"/>
|
||||||
<addaction name="m_actionEditSelectedItem"/>
|
<addaction name="m_actionEditSelectedItem"/>
|
||||||
<addaction name="m_actionDeleteSelectedItem"/>
|
<addaction name="m_actionDeleteSelectedItem"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
|
@ -781,6 +782,14 @@
|
||||||
<string notr="true"/>
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</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>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
|
|
|
@ -213,6 +213,7 @@ void FeedMessageViewer::updateFeedButtonsAvailability() {
|
||||||
|
|
||||||
form_main->m_ui->m_actionServiceDelete->setEnabled(service_selected);
|
form_main->m_ui->m_actionServiceDelete->setEnabled(service_selected);
|
||||||
form_main->m_ui->m_actionServiceEdit->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_menuAddItem->setEnabled(!critical_action_running);
|
||||||
form_main->m_ui->m_menuAccounts->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>)));
|
form_main->m_ui->m_tabWidget, SLOT(addBrowserWithMessages(QList<Message>)));
|
||||||
|
|
||||||
// Toolbar forwardings.
|
// Toolbar forwardings.
|
||||||
|
connect(form_main->m_ui->m_actionAddFeedIntoSelectedAccount, SIGNAL(triggered()),
|
||||||
|
m_feedsView, SLOT(addFeedIntoSelectedAccount()));
|
||||||
connect(form_main->m_ui->m_actionCleanupDatabase,
|
connect(form_main->m_ui->m_actionCleanupDatabase,
|
||||||
SIGNAL(triggered()), this, SLOT(showDbCleanupAssistant()));
|
SIGNAL(triggered()), this, SLOT(showDbCleanupAssistant()));
|
||||||
connect(form_main->m_ui->m_actionSwitchImportanceOfSelectedMessages,
|
connect(form_main->m_ui->m_actionSwitchImportanceOfSelectedMessages,
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include "gui/styleditemdelegatewithoutfocus.h"
|
#include "gui/styleditemdelegatewithoutfocus.h"
|
||||||
#include "gui/dialogs/formmain.h"
|
#include "gui/dialogs/formmain.h"
|
||||||
#include "services/abstract/feed.h"
|
#include "services/abstract/feed.h"
|
||||||
|
#include "services/abstract/serviceroot.h"
|
||||||
#include "services/standard/standardcategory.h"
|
#include "services/standard/standardcategory.h"
|
||||||
#include "services/standard/standardfeed.h"
|
#include "services/standard/standardfeed.h"
|
||||||
#include "services/standard/gui/formstandardcategorydetails.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()));
|
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() {
|
void FeedsView::expandCollapseCurrentItem() {
|
||||||
if (selectionModel()->selectedRows().size() == 1) {
|
if (selectionModel()->selectedRows().size() == 1) {
|
||||||
QModelIndex index = selectionModel()->selectedRows().at(0);
|
QModelIndex index = selectionModel()->selectedRows().at(0);
|
||||||
|
|
|
@ -62,6 +62,7 @@ class FeedsView : public QTreeView {
|
||||||
void loadExpandedStates();
|
void loadExpandedStates();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
void addFeedIntoSelectedAccount();
|
||||||
void expandCollapseCurrentItem();
|
void expandCollapseCurrentItem();
|
||||||
|
|
||||||
// Feed updating.
|
// Feed updating.
|
||||||
|
|
Loading…
Add table
Reference in a new issue