aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2016-06-02 13:48:33 -0400
committerKen Moore <moorekou@gmail.com>2016-06-02 13:48:33 -0400
commit52577c7f3478194f4709902f0e202f5facfc5f4a (patch)
treef3ee73df1ae668f4c22cc4775bf85f2b409824f9 /src-qt5/core/lumina-desktop
parentMake the RSS reader support both rss version 0.91 in addition to version 2.0 ... (diff)
downloadlumina-52577c7f3478194f4709902f0e202f5facfc5f4a.tar.gz
lumina-52577c7f3478194f4709902f0e202f5facfc5f4a.tar.bz2
lumina-52577c7f3478194f4709902f0e202f5facfc5f4a.zip
A couple minor tweaks to the new RSS stuff. Fix the URL for the PC-BSD blog and such.
Diffstat (limited to 'src-qt5/core/lumina-desktop')
-rw-r--r--src-qt5/core/lumina-desktop/desktop-plugins/rssfeeder/RSSFeedPlugin.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src-qt5/core/lumina-desktop/desktop-plugins/rssfeeder/RSSFeedPlugin.cpp b/src-qt5/core/lumina-desktop/desktop-plugins/rssfeeder/RSSFeedPlugin.cpp
index 4a1149ba..23c1ca01 100644
--- a/src-qt5/core/lumina-desktop/desktop-plugins/rssfeeder/RSSFeedPlugin.cpp
+++ b/src-qt5/core/lumina-desktop/desktop-plugins/rssfeeder/RSSFeedPlugin.cpp
@@ -47,6 +47,8 @@ RSSFeedPlugin::RSSFeedPlugin(QWidget* parent, QString ID) : LDPlugin(parent, ID)
QStringList feeds;
if( !LSession::handle()->DesktopPluginSettings()->contains(setprefix+"currentfeeds") ){
//First-time run of the plugin - automatically load the default feeds
+ feeds = LOS::RSSFeeds();
+ for(int i=0; i<feeds.length(); i++){ feeds[i] = feeds[i].section("::::",1,-1); } //just need url right now
feeds << "http://lumina-desktop.org/?feed=rss2"; //Lumina Desktop blog feed
LSession::handle()->DesktopPluginSettings()->setValue(setprefix+"currentfeeds", feeds);
}else{
@@ -72,10 +74,13 @@ void RSSFeedPlugin::updateOptionsMenu(){
optionsMenu->addAction(LXDG::findIcon("download",""), tr("Update Feeds Now"), this, SLOT(resyncFeeds()) );
presetMenu->clear();
- QAction *tmp = presetMenu->addAction( tr("Lumina Desktop RSS") );
- tmp->setWhatsThis("http://lumina-desktop.org/?feed=rss2");
- //Add any other feeds here as needed (TO-DO)
-
+ QStringList feeds = LOS::RSSFeeds();
+ feeds << tr("Lumina Desktop RSS")+"::::http://lumina-desktop.org/?feed=rss2";
+ feeds.sort();
+ for(int i=0; i<feeds.length(); i++){
+ QAction *tmp = presetMenu->addAction(feeds[i].section("::::",0,0) );
+ tmp->setWhatsThis( feeds[i].section("::::",1,-1) );
+ }
}
void RSSFeedPlugin::checkFeedNotify(){
@@ -84,7 +89,7 @@ void RSSFeedPlugin::checkFeedNotify(){
if( !ui->combo_feed->itemData(i, Qt::WhatsThisRole).toString().isEmpty()){ notify = true; }
}
QString style;
- if(notify){ style = "QComboBox::down-arrow{ background-color: rgba(255,0,0,120); }"; }
+ if(notify){ style = "QComboBox{ background-color: rgba(255,0,0,120); }"; }
ui->combo_feed->setStyleSheet(style);
}
bgstack15