Logo Search packages:      
Sourcecode: akregator version File versions

void View::slotArticleSelected ( MyArticle  article  )  [slot]

the article selection has changed

Definition at line 1216 of file akregator_view.cpp.

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

Referenced by View().

{
    
    if (m_viewMode == CombinedView) 
        return; 

    Feed *feed = article.feed();
    if (!feed) 
        return;

    KToggleAction* ka = static_cast<KToggleAction*> (m_part->actionCollection()->action("article_toggle_keep"));
    if (ka)
        ka->setChecked( article.keep() );
    
    if (article.status() != MyArticle::Read)
    {
        article.setStatus(MyArticle::Read);
        //item->repaint();
        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);
    }
    m_articleViewer->slotShowArticle( article );
}


Generated by  Doxygen 1.6.0   Back to index