[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/base/plasma/applets/lionmail/emailnotifier
From:       Sebastian Kügler <sebas () kde ! org>
Date:       2010-08-27 22:21:52
Message-ID: 20100827222152.1EFC3AC857 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1168928 by sebas:

share session id across collections

 M  +9 -3      emaillist.cpp  
 M  +1 -0      emaillist.h  
 M  +4 -1      emailnotifier.cpp  


--- trunk/playground/base/plasma/applets/lionmail/emailnotifier/emaillist.cpp \
#1168927:1168928 @@ -93,8 +93,9 @@
         //m_session = new Session( QByteArray( "PlasmaEmailNotifier-" ) + \
QByteArray::number( qrand() ), this );  
     }
-    Session* session = new Session(QByteArray( "PlasmaEmailNotifier-" ) + \
                QByteArray::number( qrand() ), this);
-
+    if (!m_session) {
+        m_session = new Session(QByteArray( "PlasmaEmailNotifier-" ) + \
QByteArray::number( qrand() ), this); +    }
     /*
     Monitor *monitor = new Monitor( this );
     monitor->setMimeTypeMonitored("message/rfc822");
@@ -114,7 +115,7 @@
     changeRecorder->itemFetchScope().fetchPayloadPart(MessagePart::Envelope);
     changeRecorder->collectionFetchScope().setIncludeUnsubscribed(false);
     changeRecorder->setMimeTypeMonitored("message/rfc822");
-    changeRecorder->setSession(session);
+    changeRecorder->setSession(m_session);
 
     Akonadi::EntityTreeModel* model = new Akonadi::EntityTreeModel(changeRecorder, \
                this);
     //m_model->setItemPopulationStrategy( EntityTreeModel::NoItemPopulation );
@@ -127,6 +128,11 @@
     kDebug() << "Model created and connected. :) Now holding models for col-ids:" << \
m_etms.keys() << m_etms.values();  }
 
+void EmailList::clear()
+{
+
+}
+
 void EmailList::removeCollection(const quint64 collectionId)
 {
     kDebug() << "removing collection (not implemented):" << collectionId;
--- trunk/playground/base/plasma/applets/lionmail/emailnotifier/emaillist.h \
#1168927:1168928 @@ -62,6 +62,7 @@
         virtual QString statusText();
         virtual void addCollection(const quint64 collectionId);
         virtual void removeCollection(const quint64 collectionId);
+        virtual void clear();
 
         void setShowImportant(bool show);
         QList<quint64> collectionIds();
--- trunk/playground/base/plasma/applets/lionmail/emailnotifier/emailnotifier.cpp \
#1168927:1168928 @@ -229,8 +229,10 @@
         m_dialog->unreadEmailList()->setShowImportant(d == ShowMerged);
         kDebug() << "showing important messages in unread list" << (m_showImportant \
== ShowMerged);  
+        if (m_showImportant == ShowSeparately) {
         // TODO: create important tab
     }
+    }
     cg.writeEntry("showImportant", (int)(d));
 
     // HTML display
@@ -249,7 +251,8 @@
         m_newCollectionIds << _id;
 
         // .. remove me
-        Akonadi::Collection col = \
itemindex.data(EntityTreeModel::CollectionRole).value<Akonadi::Collection>(); +       \
Akonadi::Collection col = itemindex.data( +                                    \
EntityTreeModel::CollectionRole).value<Akonadi::Collection>();  kDebug() << \
"========" << col.name() << col.resource();  
     }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic