do not allow tag operations on some accounts

This commit is contained in:
Martin Rotter 2021-02-18 14:25:29 +01:00
parent 391c969ebf
commit 105bc40030
5 changed files with 12 additions and 1 deletions

View File

@ -54,7 +54,8 @@ QList<QAction*> LabelsNode::contextMenuFeedsList() {
}
void LabelsNode::createLabel() {
if ((getParentServiceRoot()->supportedLabelOperations() & ServiceRoot::LabelOperation::Adding) == ServiceRoot::LabelOperation::Adding) {
if ((getParentServiceRoot()->supportedLabelOperations() & ServiceRoot::LabelOperation::Adding) ==
ServiceRoot::LabelOperation::Adding) {
FormAddEditLabel frm(qApp->mainFormWidget());
Label* new_lbl = frm.execForAdd();

View File

@ -190,6 +190,10 @@ void FeedlyServiceRoot::saveAllCachedData(bool ignore_errors) {
}
}
ServiceRoot::LabelOperation FeedlyServiceRoot::supportedLabelOperations() const {
return LabelOperation(0);
}
void FeedlyServiceRoot::updateTitle() {
setTitle(QString("%1 (Feedly)").arg(TextFactory::extractUsernameFromEmail(m_network->username())));
}

View File

@ -22,6 +22,7 @@ class FeedlyServiceRoot : public ServiceRoot, public CacheForServiceRoot {
virtual void start(bool freshly_activated);
virtual QString code() const;
virtual void saveAllCachedData(bool ignore_errors);
virtual LabelOperation supportedLabelOperations() const;
FeedlyNetwork* network() const;

View File

@ -140,6 +140,10 @@ void GreaderServiceRoot::saveAllCachedData(bool ignore_errors) {
}
}
ServiceRoot::LabelOperation GreaderServiceRoot::supportedLabelOperations() const {
return LabelOperation(0);
}
void GreaderServiceRoot::updateTitleIcon() {
setTitle(QString("%1 (%2)").arg(TextFactory::extractUsernameFromEmail(m_network->username()),
m_network->serviceToString(m_network->service())));

View File

@ -30,6 +30,7 @@ class GreaderServiceRoot : public ServiceRoot, public CacheForServiceRoot {
virtual void start(bool freshly_activated);
virtual QString code() const;
virtual void saveAllCachedData(bool ignore_errors);
virtual LabelOperation supportedLabelOperations() const;
GreaderNetwork* network() const;