[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/pim/mailody
From: Tom Albers <tomalbers () kde ! nl>
Date: 2008-01-03 17:18:55
Message-ID: 1199380735.880533.24701.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 756737 by toma:
Move the imap lib to the resource, disable all imapmanager references in mailody, \
these should all be replaced by akonadi calls.
M +2 -2 CMakeLists.txt
M +9 -0 akonadi_resource/CMakeLists.txt
A akonadi_resource/README libimap/README#756723
A akonadi_resource/db.cpp libimap/db.cpp#756723 [License: GPL (v2+)]
A akonadi_resource/db.h libimap/db.h#756723 [License: GPL (v2+)]
A akonadi_resource/imap_export.h libimap/imap_export.h#756723 \
[License: LGPL (v2+)] A akonadi_resource/imaplib.cpp \
libimap/imaplib.cpp#756723 [License: GPL (v2+)] A \
akonadi_resource/imaplib.h libimap/imaplib.h#756723 [License: GPL (v2+)] A \
akonadi_resource/socket.cpp libimap/socket.cpp#756723 [License: GPL (v2+)] A \
akonadi_resource/socket.h libimap/socket.h#756723 [License: GPL (v2+)] D \
libimap (directory) M +0 -1 src/CMakeLists.txt
M +2 -1 src/composer.cpp
M +4 -3 src/mailboxlistview.cpp
M +13 -12 src/mainwindow.cpp
M +16 -1 src/messagedata.cpp
M +2 -1 src/sendmessage.cpp
--- trunk/playground/pim/mailody/CMakeLists.txt #756736:756737
@@ -7,11 +7,11 @@
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
include_directories ( ${KDE4_INCLUDES} ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}
-${CMAKE_SOURCE_DIR}/libkdepim/ ${CMAKE_SOURCE_DIR}/libimap/
+${CMAKE_SOURCE_DIR}/libkdepim/
${CMAKE_CURRENT_DIR}akonadi/ ${CMAKE_CURRENT_DIR}akonadi/libakonadi/
${CMAKE_CURRENT_BINARY_DIR}/akonadi/ ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/libkdepim/ ${CMAKE_CURRENT_SOURCE_DIR}/maildir/
-${CMAKE_CURRENT_SOURCE_DIR}/libimap/)
+)
#------------------------------ akonadi stufff
--- trunk/playground/pim/mailody/akonadi_resource/CMakeLists.txt #756736:756737
@@ -1,3 +1,12 @@
+set(imap_LIB_SRCS imaplib.cpp db.cpp socket.cpp)
+
+kde4_add_library(imap SHARED ${imap_LIB_SRCS})
+
+target_link_libraries(imap ${QT_AND_KDECORE_LIBS} ${QT_QTSQL_LIBRARY} \
${KDE4_KDE3SUPPORT_LIBS} ${KDE4_KIMAP_LIBS}) +
+set_target_properties(imap PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION \
${GENERIC_LIB_SOVERSION} ) +install(TARGETS imap DESTINATION ${LIB_INSTALL_DIR})
+
include_directories(
${CMAKE_SOURCE_DIR}/akonadi
${CMAKE_SOURCE_DIR}/akonadi/libakonadi
--- trunk/playground/pim/mailody/src/CMakeLists.txt #756736:756737
@@ -30,7 +30,6 @@
addresslabel.cpp
composertextedit.cpp
mailodybaselistview.cpp
-imapmanager.cpp
mainwindow.cpp
)
--- trunk/playground/pim/mailody/src/composer.cpp #756736:756737
@@ -29,7 +29,6 @@
#include "global.h"
#include "database.h"
#include "messagedata.h"
-#include "imapmanager.h"
#include "sendmessage.h"
// Qt
@@ -1004,10 +1003,12 @@
if (cmsg.isEmpty())
return;
+/* TODO PORT To Akonadi
ImapManager* im = ImapManager::instance();
im->saveMessage(m_mailbox, cmsg, flags);
connect(im, SIGNAL(saveDone()), SLOT(slotDone()));
+*/
}
void Composer::slotFixedFont( bool toggle )
--- trunk/playground/pim/mailody/src/mailboxlistview.cpp #756736:756737
@@ -18,7 +18,6 @@
*/
#include "mailboxlistview.h"
-#include "imapmanager.h"
#include "tooltip.h"
#include <QTimer>
@@ -65,7 +64,7 @@
QStringList movable = appData.split(",");
QString destbox = static_cast<MailBoxListViewItem*>(parent)->fullName();
- ImapManager* im = ImapManager::instance();
+ //TODO: port to akonadi ImapManager* im = ImapManager::instance();
QString text;
QStringList::Iterator it = movable.begin();
@@ -86,13 +85,15 @@
continue;
}
- im->moveMessage(origbox, uid.toInt(), destbox);
+ // TODO: port to akonadi im->moveMessage(origbox, uid.toInt(), destbox);
origBoxesUsed.append(origbox);
}
+/* TODO: port to akoandi
for (int i = 0; i < origBoxesUsed.size(); ++i)
im->checkMail(origBoxesUsed.at(i));
im->checkMail(destbox);
+*/
QTimer::singleShot(500, this, SIGNAL(refresh()));
--- trunk/playground/pim/mailody/src/mainwindow.cpp #756736:756737
@@ -22,7 +22,6 @@
// Own
#include "mainwindow.h"
#include "mainwindowadaptor.h"
-#include "imapmanager.h"
#include "messagedata.h"
#include "headerwidget.h"
#include "headerview.h"
@@ -31,6 +30,7 @@
#include "tooltip.h"
#include "global.h"
#include "composer.h"
+#include "database.h"
// akonadi
#include <../akonadi/libakonadi/control.h>
@@ -106,7 +106,8 @@
QString hp = configGeneral.readEntry("homePage", "http://www.mailody.net");
m_db = Database::dbinstance();
- m_imapmanager = new ImapManager(this,"imapanddb");
+/*
+ TODO: m_imapmanager = new ImapManager(this,"imapanddb");
connect(m_imapmanager, SIGNAL(showSettings()), SLOT(slotSetup()));
connect(m_imapmanager, SIGNAL(loginOk()), SLOT(slotCheckMail()));
@@ -133,6 +134,7 @@
SLOT(slotUpdateStatusBarRestoreMouse(const QString&)));
connect(m_imapmanager, SIGNAL(statusReady()),
SLOT(slotClearStatusBar()));
+*/
QDockWidget* mailboxDock = new QDockWidget(i18n("Folders"), this);
mailboxDock->setObjectName("mailboxDock");
@@ -590,7 +592,6 @@
configToggle.sync();
delete m_db;
- delete m_imapmanager;
}
bool MainWindow::queryClose()
@@ -909,7 +910,7 @@
// << m_db->hasFlag(r->uid(), r->mb(), tag) << endl;
if (!m_db->hasFlag(r->uid(), r->mb(), tag))
{
- m_imapmanager->addFlag(r->mb(), r->uid(), tag);
+ //X m_imapmanager->addFlag(r->mb(), r->uid(), tag);
m_headerView->reset();
}
@@ -947,7 +948,7 @@
// << m_db->hasFlag(r->uid(), r->mb(), tag) << endl;
if (m_db->hasFlag(r->uid(), r->mb(), tag))
{
- m_imapmanager->removeFlag(r->mb(), r->uid(), tag);
+ //X m_imapmanager->removeFlag(r->mb(), r->uid(), tag);
m_headerView->reset();
}
@@ -1484,7 +1485,7 @@
}
else if (choice == markasread && mb)
{
- m_imapmanager->addFlag(mb->fullName(), "\\Seen");
+ //X m_imapmanager->addFlag(mb->fullName(), "\\Seen");
//TODO: PORT m_headerView->triggerUpdate();
mb->updateUnseen(0);
}
@@ -1512,7 +1513,7 @@
folderName = mb->fullName() + sep + folderName;
}
// kDebug(50002) << ok << folderName << endl;
- m_imapmanager->createMailBox(folderName);
+ //X m_imapmanager->createMailBox(folderName);
}
}
else if (choice == renamefolder)
@@ -1541,7 +1542,7 @@
folderName = choppedFolderName + sep + folderName;
// kDebug(50002) << ok << folderName << endl;
- m_imapmanager->renameMailBox(mb->fullName(), folderName);
+ //X m_imapmanager->renameMailBox(mb->fullName(), folderName);
}
}
else if (choice == deletefolder)
@@ -1560,7 +1561,7 @@
if (i != KMessageBox::Continue)
return;
}
- m_imapmanager->deleteMailBox(mb->fullName());
+ //X m_imapmanager->deleteMailBox(mb->fullName());
}
}
@@ -1797,7 +1798,7 @@
composer->addAttachment(KUrl(ita.key()),ita.value());
const QString flg = "\\Deleted";
- m_imapmanager->addFlag(msg->mb(), msg->uid(), flg);
+ //X m_imapmanager->addFlag(msg->mb(), msg->uid(), flg);
composer->setDirty();
composer->show();
}
@@ -2048,7 +2049,7 @@
QStringList::Iterator it = checkMail.begin();
while (it != checkMail.end())
{
- m_imapmanager->checkMail(*it);
+ //X m_imapmanager->checkMail(*it);
++it;
}
}
@@ -2224,7 +2225,7 @@
}
slotUpdateStatusBar(i18n("Connecting"));
- m_imapmanager->startConnection();
+ //X m_imapmanager->startConnection();
}
void MainWindow::slotConnected()
--- trunk/playground/pim/mailody/src/messagedata.cpp #756736:756737
@@ -20,7 +20,6 @@
// Own
#include "messagedata.h"
#include "global.h"
-#include "imapmanager.h"
// KDE
#include <kdebug.h>
@@ -40,8 +39,10 @@
: QObject(parent), m_block(false), m_delete(false), m_xmsp(0)
{
setObjectName( name );
+/* TODO: port to akonadi
m_datamanager = ImapManager::instance();
m_headers << m_datamanager->getHeaders( mb, uid );
+*/
initialise();
}
@@ -51,7 +52,9 @@
m_headers(headers), m_xmsp(0)
{
setObjectName( name );
+/* TODO: port to akonadi
m_datamanager = ImapManager::instance();
+*/
initialise();
}
@@ -110,17 +113,21 @@
{
kDebug(50002) << endl;
m_bodyType = i;
+/* TODO: PORT to akonadi
connect(m_datamanager,
SIGNAL(message(const QString&, int, const QString&)),
SLOT(slotBodyReady(const QString&, int, const QString&)));
m_datamanager->getMessage(m_mb, m_uid);
+*/
}
void MessageData::slotBodyReady(const QString& mb, int uid, const QString& body)
{
+/* TODO: PORT to akonadi
disconnect(m_datamanager,
SIGNAL(message(const QString&, int, const QString&)),
this, SLOT(slotBodyReady(const QString&, int, const QString&)));
+*/
kDebug(50002) /* << body */ << endl;
@@ -128,7 +135,9 @@
return;
m_attachments.clear();
+/* TODO: PORT to akonadi
m_datamanager->addFlag(m_mb, m_uid, "\\Seen");
+*/
Message* m = new Message();
m->setContent(KMime::CRLFtoLF(body.trimmed().toLatin1()));
@@ -283,17 +292,23 @@
bool MessageData::isDeleted() const
{
+/* TODO: PORT to akonadi
return m_datamanager->hasFlag(m_mb, m_uid, "\\Deleted");
+*/
}
bool MessageData::isNew() const
{
+/* TODO: PORT to akonadi
return !m_datamanager->hasFlag(m_mb, m_uid, "\\Seen");
+*/
}
bool MessageData::hasUserTag( int i ) const
{
+/* TODO: PORT to akonadi
return m_datamanager->hasFlag(m_mb, m_uid, "$Label" + QString::number(i));
+*/
}
void MessageData::setBlocked( bool block )
--- trunk/playground/pim/mailody/src/sendmessage.cpp #756736:756737
@@ -24,7 +24,6 @@
#include "setup.h"
#include "database.h"
#include "global.h"
-#include "imapmanager.h"
// Qt
#include <QApplication>
@@ -341,11 +340,13 @@
if (cmsg.isEmpty())
return;
+/* TODO: akonadi port
if (Global::imapConnectionPossible())
{
ImapManager* im = ImapManager::instance();
im->saveMessage(folder, cmsg);
}
+*/
const KPIMIdentities::Identity& ident =
Global::identityManager()->identityForUoid( identity );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic