Some cleanups.
This commit is contained in:
parent
a90e4880d0
commit
d76e5eb345
@ -85,6 +85,18 @@ bool ServiceRoot::markAsReadUnread(RootItem::ReadStatus status) {
|
||||
}
|
||||
}
|
||||
|
||||
QList<QAction*> ServiceRoot::addItemMenu() {
|
||||
return QList<QAction*>();
|
||||
}
|
||||
|
||||
QList<QAction*> ServiceRoot::contextMenu() {
|
||||
return serviceMenu();
|
||||
}
|
||||
|
||||
QList<QAction*> ServiceRoot::serviceMenu() {
|
||||
return QList<QAction*>();
|
||||
}
|
||||
|
||||
QList<Message> ServiceRoot::undeletedMessages() const {
|
||||
QList<Message> messages;
|
||||
const int account_id = accountId();
|
||||
|
@ -60,12 +60,14 @@ class ServiceRoot : public RootItem {
|
||||
// b) Add new category
|
||||
// c) ...
|
||||
// NOTE: Caller does NOT take ownership of created menu!
|
||||
virtual QList<QAction*> addItemMenu() = 0;
|
||||
virtual QList<QAction*> addItemMenu();
|
||||
|
||||
QList<QAction*> contextMenu();
|
||||
|
||||
// Returns list of specific actions to be shown in main window menu
|
||||
// bar in sections "Services -> 'this service'".
|
||||
// NOTE: Caller does NOT take ownership of created menu!
|
||||
virtual QList<QAction*> serviceMenu() = 0;
|
||||
virtual QList<QAction*> serviceMenu();
|
||||
|
||||
// Access to recycle bin of this account if there is any.
|
||||
virtual RecycleBin *recycleBin() const = 0;
|
||||
|
@ -461,10 +461,6 @@ void StandardServiceRoot::exportFeeds() {
|
||||
form.data()->exec();
|
||||
}
|
||||
|
||||
QList<QAction*> StandardServiceRoot::addItemMenu() {
|
||||
return QList<QAction*>();
|
||||
}
|
||||
|
||||
QList<QAction*> StandardServiceRoot::serviceMenu() {
|
||||
if (m_serviceMenu.isEmpty()) {
|
||||
m_actionExportFeeds = new QAction(qApp->icons()->fromTheme("document-export"), tr("Export feeds"), this);
|
||||
@ -479,7 +475,3 @@ QList<QAction*> StandardServiceRoot::serviceMenu() {
|
||||
|
||||
return m_serviceMenu;
|
||||
}
|
||||
|
||||
QList<QAction*> StandardServiceRoot::contextMenu() {
|
||||
return serviceMenu();
|
||||
}
|
||||
|
@ -58,15 +58,9 @@ class StandardServiceRoot : public ServiceRoot {
|
||||
// Access to recycle bin.
|
||||
RecycleBin *recycleBin() const;
|
||||
|
||||
// Return "add feed" and "add category" items.
|
||||
QList<QAction*> addItemMenu();
|
||||
|
||||
// Returns menu to be shown in "Services -> service" menu.
|
||||
QList<QAction*> serviceMenu();
|
||||
|
||||
// Returns context menu.
|
||||
QList<QAction*> contextMenu();
|
||||
|
||||
// Returns context specific menu actions for given feed.
|
||||
QList<QAction*> getContextMenuForFeed(StandardFeed *feed);
|
||||
|
||||
|
@ -33,6 +33,8 @@ FormEditAccount::FormEditAccount(QWidget *parent)
|
||||
setWindowFlags(Qt::MSWindowsFixedSizeDialogHint | Qt::Dialog | Qt::WindowSystemMenuHint);
|
||||
setWindowIcon(qApp->icons()->fromTheme(QSL("application-ttrss")));
|
||||
|
||||
m_ui->m_lblServerSideUpdateInformation->setText(tr("Leaving this option on causes that updates "
|
||||
"of feeds will be probably much slower and may time-out often."));
|
||||
m_ui->m_lblDescription->setText(tr("Note that at least API level %1 is required.").arg(MINIMAL_API_LEVEL));
|
||||
m_ui->m_txtHttpUsername->lineEdit()->setPlaceholderText(tr("HTTP authentication username"));
|
||||
m_ui->m_txtHttpPassword->lineEdit()->setPlaceholderText(tr("HTTP authentication password"));
|
||||
|
@ -33,7 +33,7 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="m_gbAuthentication">
|
||||
<property name="toolTip">
|
||||
<string>Some feeds require authentication, including GMail feeds. BASIC, NTLM-2 and DIGEST-MD5 authentication schemes are supported.</string>
|
||||
@ -84,7 +84,7 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<item row="5" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="m_gbHttpAuthentication">
|
||||
<property name="toolTip">
|
||||
<string>Some feeds require authentication, including GMail feeds. BASIC, NTLM-2 and DIGEST-MD5 authentication schemes are supported.</string>
|
||||
@ -138,14 +138,14 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<item row="6" column="0">
|
||||
<widget class="QPushButton" name="m_btnTestSetup">
|
||||
<property name="text">
|
||||
<string>&Test setup</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<item row="6" column="1">
|
||||
<widget class="LabelWithStatus" name="m_lblTestResult" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
@ -163,9 +163,6 @@
|
||||
<property name="text">
|
||||
<string>Force execution of server-side update when updating feeds from RSS Guard</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
@ -173,6 +170,19 @@
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QLabel" name="m_lblServerSideUpdateInformation">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
@ -130,8 +130,8 @@ void TtRssServiceRoot::addNewFeed(const QString &url) {
|
||||
}
|
||||
|
||||
QScopedPointer<FormEditFeed> form_pointer(new FormEditFeed(this, qApp->mainForm()));
|
||||
form_pointer.data()->execForAdd(url);
|
||||
|
||||
form_pointer.data()->execForAdd(url);
|
||||
qApp->feedUpdateLock()->unlock();
|
||||
}
|
||||
|
||||
@ -169,10 +169,6 @@ QVariant TtRssServiceRoot::data(int column, int role) const {
|
||||
}
|
||||
}
|
||||
|
||||
QList<QAction*> TtRssServiceRoot::addItemMenu() {
|
||||
return QList<QAction*>();
|
||||
}
|
||||
|
||||
RecycleBin *TtRssServiceRoot::recycleBin() const {
|
||||
return m_recycleBin;
|
||||
}
|
||||
@ -188,10 +184,6 @@ QList<QAction*> TtRssServiceRoot::serviceMenu() {
|
||||
return m_serviceMenu;
|
||||
}
|
||||
|
||||
QList<QAction*> TtRssServiceRoot::contextMenu() {
|
||||
return serviceMenu();
|
||||
}
|
||||
|
||||
bool TtRssServiceRoot::onBeforeSetMessagesRead(RootItem *selected_item, const QList<Message> &messages, RootItem::ReadStatus read) {
|
||||
Q_UNUSED(selected_item)
|
||||
|
||||
|
@ -37,25 +37,16 @@ class TtRssServiceRoot : public ServiceRoot {
|
||||
|
||||
void start(bool freshly_activated);
|
||||
void stop();
|
||||
|
||||
QString code() const;
|
||||
|
||||
bool canBeEdited() const;
|
||||
bool canBeDeleted() const;
|
||||
bool editViaGui();
|
||||
bool deleteViaGui();
|
||||
|
||||
bool markAsReadUnread(ReadStatus status);
|
||||
|
||||
bool supportsFeedAdding() const;
|
||||
bool supportsCategoryAdding() const;
|
||||
|
||||
QVariant data(int column, int role) const;
|
||||
|
||||
QList<QAction*> addItemMenu();
|
||||
QList<QAction*> serviceMenu();
|
||||
QList<QAction*> contextMenu();
|
||||
|
||||
RecycleBin *recycleBin() const;
|
||||
|
||||
bool onBeforeSetMessagesRead(RootItem *selected_item, const QList<Message> &messages, ReadStatus read);
|
||||
@ -83,9 +74,20 @@ class TtRssServiceRoot : public ServiceRoot {
|
||||
QStringList customIDsOfMessages(const QList<QPair<Message,Importance> > &changes);
|
||||
QStringList customIDsOfMessages(const QList<Message> &messages);
|
||||
|
||||
// Removes all messages/categories/feeds which are
|
||||
// associated with this account.
|
||||
void removeOldFeedTree(bool including_messages);
|
||||
|
||||
// Removes messages which do not belong to any
|
||||
// existing feed.
|
||||
//
|
||||
// NOTE: This situation may happen if user deletes some feed
|
||||
// from another machine and then performs sync-in on this machine.
|
||||
void removeLeftOverMessages();
|
||||
void cleanAllItems();
|
||||
|
||||
// Takes new tree and adds its feeds/categories/whatever.
|
||||
// Used in syncing.
|
||||
void storeNewFeedTree(RootItem *root);
|
||||
void loadFromDatabase();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user