[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenetwork/knode
From: Christian Gebauer <gebauer () kde ! org>
Date: 2002-12-12 0:12:15
[Download RAW message or body]
CVS commit by gebauer:
patch from Matthew Sutton <matthew@msutton.demon.co.uk>:
we can now show the number of unread articles in closed threads
M +2 -0 knconfig.cpp 1.64
M +3 -0 knconfig.h 1.63
M +4 -0 knconfigwidgets.cpp 1.87
M +12 -0 knhdrviewitem.cpp 1.26
M +1 -0 knhdrviewitem.h 1.14
M +15 -0 knlistview.cpp 1.45
M +1 -0 knlistview.h 1.28
--- kdenetwork/knode/knconfig.cpp #1.63:1.64
@@ -588,4 +588,5 @@ KNConfig::ReadNewsGeneral::ReadNewsGener
s_howLines=conf->readBoolEntry("showLines3", true);
s_howScore=conf->readBoolEntry("showScore3", true);
+ s_howUnread=conf->readBoolEntry("showUnread", true);
s_howThreads = conf->readBoolEntry("showThreads", true);
a_utoCheckPgpSigs = conf->readBoolEntry("autoCheckPgpSigs",false);
@@ -622,4 +623,5 @@ void KNConfig::ReadNewsGeneral::save()
conf->writeEntry("showLines3", s_howLines);
conf->writeEntry("showScore3", s_howScore);
+ conf->writeEntry("showUnread", s_howUnread);
conf->writeEntry("showThreads", s_howThreads);
conf->writeEntry("autoCheckPgpSigs", a_utoCheckPgpSigs);
--- kdenetwork/knode/knconfig.h #1.62:1.63
@@ -484,4 +484,5 @@ class ReadNewsGeneral : public Base {
bool showLines() { return s_howLines; }
bool showScore() { return s_howScore; }
+ bool showUnread() { return s_howUnread; }
int collCacheSize() { return c_ollCacheSize; }
@@ -503,4 +504,5 @@ class ReadNewsGeneral : public Base {
s_howLines,
s_howScore,
+ s_howUnread,
s_howThreads,
a_utoCheckPgpSigs;
@@ -530,4 +532,5 @@ class ReadNewsGeneralWidget : public Bas
*d_efaultExpandCB,
*l_inesCB,
+ *u_nreadCB,
*s_coreCB;
KIntSpinBox *m_arkSecs,
--- kdenetwork/knode/knconfigwidgets.cpp #1.86:1.87
@@ -894,4 +894,5 @@ KNConfig::ReadNewsGeneralWidget::ReadNew
s_coreCB=new QCheckBox(i18n("Show article &score"), lgb);
l_inesCB=new QCheckBox(i18n("Show &line count"), lgb);
+ u_nreadCB=new QCheckBox(i18n("Show unread count in &thread"), lgb);
c_ollCacheSize=new KIntSpinBox(0, 99999, 1, 1, 10, cgb);
@@ -927,4 +928,5 @@ KNConfig::ReadNewsGeneralWidget::ReadNew
lgbL->addWidget(s_coreCB);
lgbL->addWidget(l_inesCB);
+ lgbL->addWidget(u_nreadCB);
cgbL->addRowSpacing(0, fontMetrics().lineSpacing()-4);
@@ -949,4 +951,5 @@ KNConfig::ReadNewsGeneralWidget::ReadNew
l_inesCB->setChecked(d->s_howLines);
s_coreCB->setChecked(d->s_howScore);
+ u_nreadCB->setChecked(d->s_howUnread);
c_ollCacheSize->setValue(d->c_ollCacheSize);
a_rtCacheSize->setValue(d->a_rtCacheSize);
@@ -974,4 +977,5 @@ void KNConfig::ReadNewsGeneralWidget::ap
d_ata->s_howLines=l_inesCB->isChecked();
d_ata->s_howScore=s_coreCB->isChecked();
+ d_ata->s_howUnread=u_nreadCB->isChecked();
d_ata->c_ollCacheSize=c_ollCacheSize->value();
d_ata->a_rtCacheSize=a_rtCacheSize->value();
--- kdenetwork/knode/knhdrviewitem.cpp #1.25:1.26
@@ -67,4 +67,16 @@ QDragObject* KNHdrViewItem::dragObject()
+int KNHdrViewItem::countUnreadInThread()
+{
+ int count = 0;
+ if(knGlobals.cfgManager->readNewsGeneral()->showUnread()) {
+ if(art->type()==KMime::Base::ATremote) {
+ count = static_cast<KNRemoteArticle*>(art)->unreadFollowUps();
+ }
+ }
+ return count;
+}
+
+
bool KNHdrViewItem::greyOut()
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic