summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mailit/addatt.cpp34
-rw-r--r--noncore/net/mailit/addatt.h8
-rw-r--r--noncore/net/mailit/addresslist.cpp20
-rw-r--r--noncore/net/mailit/emailclient.cpp2
-rw-r--r--noncore/net/mailit/mailitwindow.cpp4
-rw-r--r--noncore/net/mailit/viewatt.cpp15
-rw-r--r--noncore/net/mailit/writemail.cpp5
-rw-r--r--noncore/unsupported/mailit/addatt.cpp34
-rw-r--r--noncore/unsupported/mailit/addatt.h8
-rw-r--r--noncore/unsupported/mailit/addresslist.cpp20
-rw-r--r--noncore/unsupported/mailit/emailclient.cpp2
-rw-r--r--noncore/unsupported/mailit/mailitwindow.cpp4
-rw-r--r--noncore/unsupported/mailit/viewatt.cpp15
-rw-r--r--noncore/unsupported/mailit/writemail.cpp5
14 files changed, 110 insertions, 66 deletions
diff --git a/noncore/net/mailit/addatt.cpp b/noncore/net/mailit/addatt.cpp
index f279f52..c8be865 100644
--- a/noncore/net/mailit/addatt.cpp
+++ b/noncore/net/mailit/addatt.cpp
@@ -20,2 +20,3 @@
#include <qlayout.h>
+#include <qhbox.h>
#include <qdir.h>
@@ -59,8 +60,8 @@ AddAtt::AddAtt(QWidget *parent, const char *name, WFlags f)
- QGridLayout *top = new QGridLayout(this, 3,1 );
+ QGridLayout *top = new QGridLayout(this, 1,1 );
-
+ QHBox *buttons=new QHBox(this);
/*fileCategoryButton = new QPushButton(this);*/
- attatchButton = new QPushButton("Attatch ->", this);
- removeButton = new QPushButton("Remove", this);
+ attatchButton = new QPushButton("Attatch ->", buttons);
+ removeButton = new QPushButton("Remove", buttons);
@@ -77,10 +78,9 @@ AddAtt::AddAtt(QWidget *parent, const char *name, WFlags f)
- //ofs=new OFileSelector(this,2,0,"/root/Documents");
-
-
- top->addWidget(attatchButton,1,0);
- top->addWidget(removeButton,2,0);
- /*connect(fileCategories, SIGNAL(activated(int)), this,
- SLOT(fileCategorySelected(int)) );*/
+ top->addWidget(buttons,1,0);
+ //buttons->addWidget(attatchButton,0,0);
+ //buttons->addWidget(removeButton,0,1);
+
+ //connect(fileCategories, SIGNAL(activated(int)), this,
+ // SLOT(fileCategorySelected(int)) );*/
connect(attatchButton, SIGNAL(clicked()), this,
@@ -125,13 +125,7 @@ void AddAtt::addAttatchment()
{
- QDialog qd(this,tr("Select attachment"),true);
-
- QGridLayout top(&qd,1,1);
-
- OFileSelector ofs(&qd,1,0,"/root/Documents");
-
- top.addWidget(&ofs,0,0);
+ OFileDialog ofs("Attachments",this,0,0,"/root/Documents");
- qd.showMaximized();
+ ofs.showMaximized();
- if (qd.exec()==QDialog::Accepted)
+ if (ofs.exec()==QDialog::Accepted)
{
diff --git a/noncore/net/mailit/addatt.h b/noncore/net/mailit/addatt.h
index 73062e2..fcf3279 100644
--- a/noncore/net/mailit/addatt.h
+++ b/noncore/net/mailit/addatt.h
@@ -29,3 +29,3 @@
#include <qstringlist.h>
-#include <opie/ofileselector.h>
+#include <opie/ofiledialog.h>
#include <qpe/applnk.h>
@@ -67,8 +67,8 @@ private:
QListView *attView;
- QPushButton *fileCategoryButton, *attatchButton, *removeButton;
+ QPushButton *attatchButton, *removeButton;
QPopupMenu *fileCategories;
bool modified;
- QFileInfo *fi;
+ //QFileInfo *fi;
- OFileSelector* ofs;
+ OFileDialog* ofs;
};
diff --git a/noncore/net/mailit/addresslist.cpp b/noncore/net/mailit/addresslist.cpp
index 1cf2562..43e3830 100644
--- a/noncore/net/mailit/addresslist.cpp
+++ b/noncore/net/mailit/addresslist.cpp
@@ -21,2 +21,4 @@
#include <qtextstream.h>
+#include <opie/ocontactaccess.h>
+#include <opie/ocontact.h>
@@ -118,6 +120,18 @@ void AddressList::read()
{
- QFile f(filename);
+ OContactAccess::List::Iterator it;
+
+ //QFile f(filename);
QString lineEmail, lineName, email, name;
+ OContactAccess m_contactdb("mailit");
+ OContactAccess::List m_list = m_contactdb.sorted( true, 0, 0, 0 );
+ //OContact* oc;
- if (! f.open(IO_ReadOnly) )
+ for ( it = m_list.begin(); it != m_list.end(); ++it )
+ {
+ //oc=(OContact*) it;
+ if ((*it).defaultEmail().length()!=0)
+ addContact((*it).defaultEmail(),(*it).fullName());
+ }
+
+ /*if (! f.open(IO_ReadOnly) )
return;
@@ -136,3 +150,3 @@ void AddressList::read()
}
- f.close();
+ f.close();*/
}
diff --git a/noncore/net/mailit/emailclient.cpp b/noncore/net/mailit/emailclient.cpp
index 9258aac..2943986 100644
--- a/noncore/net/mailit/emailclient.cpp
+++ b/noncore/net/mailit/emailclient.cpp
@@ -150,3 +150,3 @@ void EmailClient::init()
- sendMailButton = new QAction(tr("Send mail"), Resource::loadPixmap("mailit/sendmail"), QString::null, 0, this, 0);
+ sendMailButton = new QAction(tr("Send mail"), Resource::loadPixmap("mailit/sendqueue"), QString::null, 0, this, 0);
connect(sendMailButton, SIGNAL(activated()), this, SLOT(sendQuedMail()) );
diff --git a/noncore/net/mailit/mailitwindow.cpp b/noncore/net/mailit/mailitwindow.cpp
index f9b6de2..fd49c1f 100644
--- a/noncore/net/mailit/mailitwindow.cpp
+++ b/noncore/net/mailit/mailitwindow.cpp
@@ -29,2 +29,3 @@ MailItWindow::MailItWindow(QWidget *parent, const char *name, WFlags fl)
+ qWarning("***Starting writeMail");
emailClient = new EmailClient(views, "client");
@@ -32,2 +33,3 @@ MailItWindow::MailItWindow(QWidget *parent, const char *name, WFlags fl)
readMail = new ReadMail(views, "reading");
+ qWarning("***Finished readMail");
@@ -59,2 +61,4 @@ MailItWindow::MailItWindow(QWidget *parent, const char *name, WFlags fl)
viewingMail = FALSE;
+
+ qWarning("***Finished MailitWindow");
}
diff --git a/noncore/net/mailit/viewatt.cpp b/noncore/net/mailit/viewatt.cpp
index 86f119f..b6f5015 100644
--- a/noncore/net/mailit/viewatt.cpp
+++ b/noncore/net/mailit/viewatt.cpp
@@ -22,2 +22,3 @@
#include <qpe/applnk.h>
+#include <qpe/mimetype.h>
@@ -45,2 +46,4 @@ void ViewAtt::update(Email *mailIn, bool inbox)
+
+
listView->clear();
@@ -62,2 +65,9 @@ void ViewAtt::update(Email *mailIn, bool inbox)
+ const QString& mtypeDef=(const QString&) ePtr->contentType+"/"+ePtr->contentAttribute;
+
+ MimeType mt(mtypeDef);
+
+ item->setPixmap(0, mt.pixmap());
+
+ /*
if (ePtr->contentType == "TEXT") {
@@ -65,4 +75,3 @@ void ViewAtt::update(Email *mailIn, bool inbox)
actions->addTo(bar);
- item->setPixmap(0, Resource::loadPixmap("txt"));
- }
+ }
if (ePtr->contentType == "AUDIO") {
@@ -76,3 +85,3 @@ void ViewAtt::update(Email *mailIn, bool inbox)
item->setPixmap(0, Resource::loadPixmap("pixmap"));
- }
+ }*/
}
diff --git a/noncore/net/mailit/writemail.cpp b/noncore/net/mailit/writemail.cpp
index 70332a9..a45cfd2 100644
--- a/noncore/net/mailit/writemail.cpp
+++ b/noncore/net/mailit/writemail.cpp
@@ -47,3 +47,3 @@ void WriteMail::setAddressList(AddressList *list)
for (cPtr = cListPtr->first(); cPtr != 0; cPtr = cListPtr->next() ) {
- item = new QListViewItem(addressView, cPtr->email, cPtr->name);
+ item = new QListViewItem(addressView, cPtr->name, cPtr->email);
}
@@ -112,6 +112,7 @@ void WriteMail::init()
grid->addMultiCellWidget( emailInput, 2, 2, 0, 2);
+
addressView = new QListView( widget, "addressView");
- addressView->addColumn("Email");
addressView->addColumn("Name");
+ addressView->addColumn("EMail");
addressView->setAllColumnsShowFocus(TRUE);
diff --git a/noncore/unsupported/mailit/addatt.cpp b/noncore/unsupported/mailit/addatt.cpp
index f279f52..c8be865 100644
--- a/noncore/unsupported/mailit/addatt.cpp
+++ b/noncore/unsupported/mailit/addatt.cpp
@@ -20,2 +20,3 @@
#include <qlayout.h>
+#include <qhbox.h>
#include <qdir.h>
@@ -59,8 +60,8 @@ AddAtt::AddAtt(QWidget *parent, const char *name, WFlags f)
- QGridLayout *top = new QGridLayout(this, 3,1 );
+ QGridLayout *top = new QGridLayout(this, 1,1 );
-
+ QHBox *buttons=new QHBox(this);
/*fileCategoryButton = new QPushButton(this);*/
- attatchButton = new QPushButton("Attatch ->", this);
- removeButton = new QPushButton("Remove", this);
+ attatchButton = new QPushButton("Attatch ->", buttons);
+ removeButton = new QPushButton("Remove", buttons);
@@ -77,10 +78,9 @@ AddAtt::AddAtt(QWidget *parent, const char *name, WFlags f)
- //ofs=new OFileSelector(this,2,0,"/root/Documents");
-
-
- top->addWidget(attatchButton,1,0);
- top->addWidget(removeButton,2,0);
- /*connect(fileCategories, SIGNAL(activated(int)), this,
- SLOT(fileCategorySelected(int)) );*/
+ top->addWidget(buttons,1,0);
+ //buttons->addWidget(attatchButton,0,0);
+ //buttons->addWidget(removeButton,0,1);
+
+ //connect(fileCategories, SIGNAL(activated(int)), this,
+ // SLOT(fileCategorySelected(int)) );*/
connect(attatchButton, SIGNAL(clicked()), this,
@@ -125,13 +125,7 @@ void AddAtt::addAttatchment()
{
- QDialog qd(this,tr("Select attachment"),true);
-
- QGridLayout top(&qd,1,1);
-
- OFileSelector ofs(&qd,1,0,"/root/Documents");
-
- top.addWidget(&ofs,0,0);
+ OFileDialog ofs("Attachments",this,0,0,"/root/Documents");
- qd.showMaximized();
+ ofs.showMaximized();
- if (qd.exec()==QDialog::Accepted)
+ if (ofs.exec()==QDialog::Accepted)
{
diff --git a/noncore/unsupported/mailit/addatt.h b/noncore/unsupported/mailit/addatt.h
index 73062e2..fcf3279 100644
--- a/noncore/unsupported/mailit/addatt.h
+++ b/noncore/unsupported/mailit/addatt.h
@@ -29,3 +29,3 @@
#include <qstringlist.h>
-#include <opie/ofileselector.h>
+#include <opie/ofiledialog.h>
#include <qpe/applnk.h>
@@ -67,8 +67,8 @@ private:
QListView *attView;
- QPushButton *fileCategoryButton, *attatchButton, *removeButton;
+ QPushButton *attatchButton, *removeButton;
QPopupMenu *fileCategories;
bool modified;
- QFileInfo *fi;
+ //QFileInfo *fi;
- OFileSelector* ofs;
+ OFileDialog* ofs;
};
diff --git a/noncore/unsupported/mailit/addresslist.cpp b/noncore/unsupported/mailit/addresslist.cpp
index 1cf2562..43e3830 100644
--- a/noncore/unsupported/mailit/addresslist.cpp
+++ b/noncore/unsupported/mailit/addresslist.cpp
@@ -21,2 +21,4 @@
#include <qtextstream.h>
+#include <opie/ocontactaccess.h>
+#include <opie/ocontact.h>
@@ -118,6 +120,18 @@ void AddressList::read()
{
- QFile f(filename);
+ OContactAccess::List::Iterator it;
+
+ //QFile f(filename);
QString lineEmail, lineName, email, name;
+ OContactAccess m_contactdb("mailit");
+ OContactAccess::List m_list = m_contactdb.sorted( true, 0, 0, 0 );
+ //OContact* oc;
- if (! f.open(IO_ReadOnly) )
+ for ( it = m_list.begin(); it != m_list.end(); ++it )
+ {
+ //oc=(OContact*) it;
+ if ((*it).defaultEmail().length()!=0)
+ addContact((*it).defaultEmail(),(*it).fullName());
+ }
+
+ /*if (! f.open(IO_ReadOnly) )
return;
@@ -136,3 +150,3 @@ void AddressList::read()
}
- f.close();
+ f.close();*/
}
diff --git a/noncore/unsupported/mailit/emailclient.cpp b/noncore/unsupported/mailit/emailclient.cpp
index 9258aac..2943986 100644
--- a/noncore/unsupported/mailit/emailclient.cpp
+++ b/noncore/unsupported/mailit/emailclient.cpp
@@ -150,3 +150,3 @@ void EmailClient::init()
- sendMailButton = new QAction(tr("Send mail"), Resource::loadPixmap("mailit/sendmail"), QString::null, 0, this, 0);
+ sendMailButton = new QAction(tr("Send mail"), Resource::loadPixmap("mailit/sendqueue"), QString::null, 0, this, 0);
connect(sendMailButton, SIGNAL(activated()), this, SLOT(sendQuedMail()) );
diff --git a/noncore/unsupported/mailit/mailitwindow.cpp b/noncore/unsupported/mailit/mailitwindow.cpp
index f9b6de2..fd49c1f 100644
--- a/noncore/unsupported/mailit/mailitwindow.cpp
+++ b/noncore/unsupported/mailit/mailitwindow.cpp
@@ -29,2 +29,3 @@ MailItWindow::MailItWindow(QWidget *parent, const char *name, WFlags fl)
+ qWarning("***Starting writeMail");
emailClient = new EmailClient(views, "client");
@@ -32,2 +33,3 @@ MailItWindow::MailItWindow(QWidget *parent, const char *name, WFlags fl)
readMail = new ReadMail(views, "reading");
+ qWarning("***Finished readMail");
@@ -59,2 +61,4 @@ MailItWindow::MailItWindow(QWidget *parent, const char *name, WFlags fl)
viewingMail = FALSE;
+
+ qWarning("***Finished MailitWindow");
}
diff --git a/noncore/unsupported/mailit/viewatt.cpp b/noncore/unsupported/mailit/viewatt.cpp
index 86f119f..b6f5015 100644
--- a/noncore/unsupported/mailit/viewatt.cpp
+++ b/noncore/unsupported/mailit/viewatt.cpp
@@ -22,2 +22,3 @@
#include <qpe/applnk.h>
+#include <qpe/mimetype.h>
@@ -45,2 +46,4 @@ void ViewAtt::update(Email *mailIn, bool inbox)
+
+
listView->clear();
@@ -62,2 +65,9 @@ void ViewAtt::update(Email *mailIn, bool inbox)
+ const QString& mtypeDef=(const QString&) ePtr->contentType+"/"+ePtr->contentAttribute;
+
+ MimeType mt(mtypeDef);
+
+ item->setPixmap(0, mt.pixmap());
+
+ /*
if (ePtr->contentType == "TEXT") {
@@ -65,4 +75,3 @@ void ViewAtt::update(Email *mailIn, bool inbox)
actions->addTo(bar);
- item->setPixmap(0, Resource::loadPixmap("txt"));
- }
+ }
if (ePtr->contentType == "AUDIO") {
@@ -76,3 +85,3 @@ void ViewAtt::update(Email *mailIn, bool inbox)
item->setPixmap(0, Resource::loadPixmap("pixmap"));
- }
+ }*/
}
diff --git a/noncore/unsupported/mailit/writemail.cpp b/noncore/unsupported/mailit/writemail.cpp
index 70332a9..a45cfd2 100644
--- a/noncore/unsupported/mailit/writemail.cpp
+++ b/noncore/unsupported/mailit/writemail.cpp
@@ -47,3 +47,3 @@ void WriteMail::setAddressList(AddressList *list)
for (cPtr = cListPtr->first(); cPtr != 0; cPtr = cListPtr->next() ) {
- item = new QListViewItem(addressView, cPtr->email, cPtr->name);
+ item = new QListViewItem(addressView, cPtr->name, cPtr->email);
}
@@ -112,6 +112,7 @@ void WriteMail::init()
grid->addMultiCellWidget( emailInput, 2, 2, 0, 2);
+
addressView = new QListView( widget, "addressView");
- addressView->addColumn("Email");
addressView->addColumn("Name");
+ addressView->addColumn("EMail");
addressView->setAllColumnsShowFocus(TRUE);