mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-13 08:05:55 +01:00
2020-08-11 Fred Gleason <fredg@paravelsystems.com>
* Added 'RDRssSchemas::itemLinksSupported()' and 'RDRssSchemas::itemCommentsSupported()' methods. * Modified the 'Editing Item' dialog in rdcastmanager(1) to conditionally display the 'Link' and 'Comments' controls. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -20210,3 +20210,8 @@
|
|||||||
* Removed the 'RDSettings::customCommandLine()',
|
* Removed the 'RDSettings::customCommandLine()',
|
||||||
'RDSettings::setCustomCommandLine()' and
|
'RDSettings::setCustomCommandLine()' and
|
||||||
' RDSettings::resolvedCustomCommandLine()' methods.
|
' RDSettings::resolvedCustomCommandLine()' methods.
|
||||||
|
2020-08-11 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Added 'RDRssSchemas::itemLinksSupported()' and
|
||||||
|
'RDRssSchemas::itemCommentsSupported()' methods.
|
||||||
|
* Modified the 'Editing Item' dialog in rdcastmanager(1) to
|
||||||
|
conditionally display the 'Link' and 'Comments' controls.
|
||||||
|
|||||||
@@ -113,6 +113,38 @@ RDRssSchemas::RDRssSchemas()
|
|||||||
c_supports_item_categories.push_back(false);
|
c_supports_item_categories.push_back(false);
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Item Link Support
|
||||||
|
//
|
||||||
|
// CustomSchema
|
||||||
|
c_supports_item_links.push_back(true);
|
||||||
|
|
||||||
|
// Rss202Schema
|
||||||
|
c_supports_item_links.push_back(true);
|
||||||
|
|
||||||
|
// AppleSchema
|
||||||
|
c_supports_item_links.push_back(false);
|
||||||
|
|
||||||
|
// AppleSuperfeedSchema
|
||||||
|
c_supports_item_links.push_back(false);
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Item Comments Support
|
||||||
|
//
|
||||||
|
// CustomSchema
|
||||||
|
c_supports_item_comments.push_back(true);
|
||||||
|
|
||||||
|
// Rss202Schema
|
||||||
|
c_supports_item_comments.push_back(true);
|
||||||
|
|
||||||
|
// AppleSchema
|
||||||
|
c_supports_item_comments.push_back(false);
|
||||||
|
|
||||||
|
// AppleSuperfeedSchema
|
||||||
|
c_supports_item_comments.push_back(false);
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Item Templates
|
// Item Templates
|
||||||
//
|
//
|
||||||
@@ -350,6 +382,18 @@ bool RDRssSchemas::supportsItemCategories(RssSchema schema) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool RDRssSchemas::supportsItemLinks(RssSchema schema) const
|
||||||
|
{
|
||||||
|
return c_supports_item_links.at(schema);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool RDRssSchemas::supportsItemComments(RssSchema schema) const
|
||||||
|
{
|
||||||
|
return c_supports_item_comments.at(schema);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
QStringList RDRssSchemas::categories(RDRssSchemas::RssSchema schema) const
|
QStringList RDRssSchemas::categories(RDRssSchemas::RssSchema schema) const
|
||||||
{
|
{
|
||||||
return c_categories.at((int)schema);
|
return c_categories.at((int)schema);
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ class RDRssSchemas
|
|||||||
QString itemTemplate(RssSchema schema) const;
|
QString itemTemplate(RssSchema schema) const;
|
||||||
bool supportsItemImages(RssSchema schema) const;
|
bool supportsItemImages(RssSchema schema) const;
|
||||||
bool supportsItemCategories(RssSchema schema) const;
|
bool supportsItemCategories(RssSchema schema) const;
|
||||||
|
bool supportsItemLinks(RssSchema schema) const;
|
||||||
|
bool supportsItemComments(RssSchema schema) const;
|
||||||
QStringList categories(RssSchema schema) const;
|
QStringList categories(RssSchema schema) const;
|
||||||
QStringList subCategories(RssSchema schema,const QString &category) const;
|
QStringList subCategories(RssSchema schema,const QString &category) const;
|
||||||
|
|
||||||
@@ -53,6 +55,8 @@ class RDRssSchemas
|
|||||||
QStringList c_item_templates;
|
QStringList c_item_templates;
|
||||||
QList<bool> c_supports_item_images;
|
QList<bool> c_supports_item_images;
|
||||||
QList<bool> c_supports_item_categories;
|
QList<bool> c_supports_item_categories;
|
||||||
|
QList<bool> c_supports_item_links;
|
||||||
|
QList<bool> c_supports_item_comments;
|
||||||
QList<QStringList> c_categories;
|
QList<QStringList> c_categories;
|
||||||
QList<QMap<QString,QStringList> > c_sub_categories;
|
QList<QMap<QString,QStringList> > c_sub_categories;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ EditCast::EditCast(unsigned cast_id,QWidget *parent)
|
|||||||
{
|
{
|
||||||
cast_cast=new RDPodcast(rda->config(),cast_id);
|
cast_cast=new RDPodcast(rda->config(),cast_id);
|
||||||
cast_feed=new RDFeed(cast_cast->feedId(),rda->config());
|
cast_feed=new RDFeed(cast_cast->feedId(),rda->config());
|
||||||
|
cast_schema=cast_feed->rssSchema();
|
||||||
cast_status=cast_cast->status();
|
cast_status=cast_cast->status();
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -87,10 +88,29 @@ EditCast::EditCast(unsigned cast_id,QWidget *parent)
|
|||||||
//
|
//
|
||||||
cast_item_link_edit=new QLineEdit(this);
|
cast_item_link_edit=new QLineEdit(this);
|
||||||
cast_item_link_edit->setMaxLength(255);
|
cast_item_link_edit->setMaxLength(255);
|
||||||
|
cast_item_link_edit->
|
||||||
|
setVisible(rda->rssSchemas()->supportsItemLinks(cast_schema));
|
||||||
cast_item_link_label=
|
cast_item_link_label=
|
||||||
new QLabel(cast_item_link_edit,tr("Link URL:"),this);
|
new QLabel(cast_item_link_edit,tr("Link URL:"),this);
|
||||||
cast_item_link_label->setFont(labelFont());
|
cast_item_link_label->setFont(labelFont());
|
||||||
cast_item_link_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
cast_item_link_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||||
|
cast_item_link_label->
|
||||||
|
setVisible(rda->rssSchemas()->supportsItemLinks(cast_schema));
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Item Comments
|
||||||
|
//
|
||||||
|
cast_item_comments_edit=new QLineEdit(this);
|
||||||
|
cast_item_comments_edit->setMaxLength(64);
|
||||||
|
cast_item_comments_edit->
|
||||||
|
setVisible(rda->rssSchemas()->supportsItemComments(cast_schema));
|
||||||
|
cast_item_comments_label=
|
||||||
|
new QLabel(cast_item_comments_edit,tr("Comments URL:"),this);
|
||||||
|
cast_item_comments_label->setFont(labelFont());
|
||||||
|
cast_item_comments_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||||
|
cast_item_comments_label->
|
||||||
|
setVisible(rda->rssSchemas()->supportsItemComments(cast_schema));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Item Description
|
// Item Description
|
||||||
@@ -116,16 +136,6 @@ EditCast::EditCast(unsigned cast_id,QWidget *parent)
|
|||||||
cast_item_image_label->setFont(labelFont());
|
cast_item_image_label->setFont(labelFont());
|
||||||
cast_item_image_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
cast_item_image_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||||
|
|
||||||
//
|
|
||||||
// Item Comments
|
|
||||||
//
|
|
||||||
cast_item_comments_edit=new QLineEdit(this);
|
|
||||||
cast_item_comments_edit->setMaxLength(64);
|
|
||||||
cast_item_comments_label=
|
|
||||||
new QLabel(cast_item_comments_edit,tr("Comments URL:"),this);
|
|
||||||
cast_item_comments_label->setFont(labelFont());
|
|
||||||
cast_item_comments_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Effective DateTime
|
// Effective DateTime
|
||||||
//
|
//
|
||||||
@@ -270,7 +280,7 @@ EditCast::~EditCast()
|
|||||||
|
|
||||||
QSize EditCast::sizeHint() const
|
QSize EditCast::sizeHint() const
|
||||||
{
|
{
|
||||||
return QSize(640,440);
|
return QSize(640,430);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -418,16 +428,20 @@ void EditCast::resizeEvent(QResizeEvent *e)
|
|||||||
//
|
//
|
||||||
// Link URL
|
// Link URL
|
||||||
//
|
//
|
||||||
cast_item_link_edit->setGeometry(135,ypos,size().width()-145,20);
|
if(rda->rssSchemas()->supportsItemLinks(cast_schema)) {
|
||||||
cast_item_link_label->setGeometry(20,ypos,110,20);
|
cast_item_link_edit->setGeometry(135,ypos,size().width()-145,20);
|
||||||
ypos+=22;
|
cast_item_link_label->setGeometry(20,ypos,110,20);
|
||||||
|
ypos+=22;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Comments URL
|
// Comments URL
|
||||||
//
|
//
|
||||||
cast_item_comments_edit->setGeometry(135,ypos,size().width()-145,20);
|
if(rda->rssSchemas()->supportsItemComments(cast_schema)) {
|
||||||
cast_item_comments_label->setGeometry(10,ypos,120,20);
|
cast_item_comments_edit->setGeometry(135,ypos,size().width()-145,20);
|
||||||
ypos+=22;
|
cast_item_comments_label->setGeometry(10,ypos,120,20);
|
||||||
|
ypos+=22;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Description
|
// Description
|
||||||
|
|||||||
@@ -58,8 +58,7 @@ class EditCast : public RDDialog
|
|||||||
private:
|
private:
|
||||||
RDFeed *cast_feed;
|
RDFeed *cast_feed;
|
||||||
RDPodcast *cast_cast;
|
RDPodcast *cast_cast;
|
||||||
// QLabel *cast_item_origin_user_label;
|
RDRssSchemas::RssSchema cast_schema;
|
||||||
// QLineEdit *cast_item_origin_user_edit;
|
|
||||||
QLabel *cast_item_origin_label;
|
QLabel *cast_item_origin_label;
|
||||||
QLineEdit *cast_item_origin_edit;
|
QLineEdit *cast_item_origin_edit;
|
||||||
QLabel *cast_item_title_label;
|
QLabel *cast_item_title_label;
|
||||||
|
|||||||
Reference in New Issue
Block a user