Logo Search packages:      
Sourcecode: akregator version File versions

void View::slotSetSelectedArticleNew (  )  [slot]

marks the currently selected article as new

Definition at line 1498 of file akregator_view.cpp.

References Akregator::MyArticle::feed(), m_articles, Akregator::MyArticle::setStatus(), Akregator::Feed::setUnread(), Akregator::MyArticle::status(), and Akregator::Feed::unread().

{
    ArticleListItem* ali = m_articles->selectedItem();

    if (!ali)
        return;

    MyArticle article = ali->article();
    Feed* feed = article.feed();
    if (article.status() != MyArticle::New)
    {
        article.setStatus(MyArticle::New);
        int unread = feed->unread();
        unread++;
        m_articles->setReceiveUpdates(false);
        feed->setUnread(unread);
        m_articles->setReceiveUpdates(true, false);
        
        // TODO: schedule this save.. don't want to save a huge file for one change
        Archive::save(feed);
    }

}


Generated by  Doxygen 1.6.0   Back to index