summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/mail/addresspicker.cpp11
-rw-r--r--noncore/net/mail/mail.pro4
2 files changed, 8 insertions, 7 deletions
diff --git a/noncore/net/mail/addresspicker.cpp b/noncore/net/mail/addresspicker.cpp
index c6dec35..f4f4cea 100644
--- a/noncore/net/mail/addresspicker.cpp
+++ b/noncore/net/mail/addresspicker.cpp
@@ -1,95 +1,96 @@
#include <qpushbutton.h>
#include <qmessagebox.h>
#include <qtextstream.h>
#include <qlistbox.h>
#include <qfile.h>
#include <qpe/resource.h>
-#include <opie/ocontactaccess.h>
-#include <opie/ocontact.h>
+#include <opie2/ocontactaccess.h>
+#include <opie2/ocontact.h>
#include <stdlib.h>
#include "composemail.h"
AddressPicker::AddressPicker( QWidget *parent, const char *name, bool modal, WFlags flags )
: AddressPickerUI( parent, name, modal, flags )
{
okButton->setIconSet( Resource::loadPixmap( "enter" ) );
cancelButton->setIconSet( Resource::loadPixmap( "editdelete" ) );
connect(okButton, SIGNAL(clicked()), SLOT(accept()));
connect(cancelButton, SIGNAL(clicked()), SLOT(close()));
- OContactAccess::List::Iterator it;
+ Opie::OContactAccess::List::Iterator it;
QString lineEmail, lineName, contactLine;
/* what name has to set here???? */
- OContactAccess m_contactdb("opiemail");
+ Opie::OContactAccess m_contactdb("opiemail");
+
QStringList mails;
QString pre,suf;
- OContactAccess::List m_list = m_contactdb.sorted( true, 0, 0, 0 );
+ Opie::OContactAccess::List m_list = m_contactdb.sorted( true, 0, 0, 0 );
for ( it = m_list.begin(); it != m_list.end(); ++it ) {
if ((*it).defaultEmail().length()!=0) {
mails = (*it).emailList();
if ((*it).fileAs().length()>0) {
pre = "\""+(*it).firstName()+" "+(*it).lastName()+"\" <";
suf = ">";
} else {
pre = "";
suf = "";
}
QStringList::ConstIterator sit = mails.begin();
for (;sit!=mails.end();++sit) {
contactLine=pre+(*sit)+suf;
addressList->insertItem(contactLine);
}
}
}
if ( addressList->count() <= 0 ) {
#if 0
// makes this realy sense??
addressList->insertItem(
tr( "There are no entries in the addressbook." ) );
#endif
addressList->setEnabled( false );
okButton->setEnabled( false );
} else {
// addressList->sort();
}
}
void AddressPicker::accept()
{
QListBoxItem *item = addressList->firstItem();
QString names;
while ( item ) {
if ( item->selected() )
names += item->text() + ", ";
item = item->next();
}
names.replace( names.length() - 2, 2, "" );
if ( names.isEmpty() ) {
QMessageBox::information(this, tr("Error"), tr("<p>You have to select"
" at least one address entry.</p>"), tr("Ok"));
return;
}
selectedNames = names;
QDialog::accept();
}
QString AddressPicker::getNames()
{
QString names = 0;
AddressPicker picker(0, 0, true);
picker.showMaximized();
picker.show();
int ret = picker.exec();
if ( QDialog::Accepted == ret ) {
return picker.selectedNames;
}
diff --git a/noncore/net/mail/mail.pro b/noncore/net/mail/mail.pro
index d3d2ab1..7e0de2b 100644
--- a/noncore/net/mail/mail.pro
+++ b/noncore/net/mail/mail.pro
@@ -1,61 +1,61 @@
CONFIG += qt warn_on debug quick-app
HEADERS = defines.h \
editaccounts.h \
composemail.h \
accountview.h \
accountitem.h \
mainwindow.h \
viewmail.h \
viewmailbase.h \
opiemail.h \
mailistviewitem.h \
settingsdialog.h \
statuswidget.h \
newmaildir.h \
selectstore.h \
selectsmtp.h
SOURCES = main.cpp \
opiemail.cpp \
mainwindow.cpp \
accountview.cpp \
accountitem.cpp \
composemail.cpp \
addresspicker.cpp \
editaccounts.cpp \
viewmail.cpp \
viewmailbase.cpp \
mailistviewitem.cpp \
settingsdialog.cpp \
statuswidget.cpp \
newmaildir.cpp \
selectstore.cpp \
selectsmtp.cpp
INTERFACES = editaccountsui.ui \
selectmailtypeui.ui \
imapconfigui.ui \
pop3configui.ui \
nntpconfigui.ui \
smtpconfigui.ui \
addresspickerui.ui \
composemailui.ui \
settingsdialogui.ui \
statuswidgetui.ui \
newmaildirui.ui \
selectstoreui.ui
INCLUDEPATH += $(OPIEDIR)/include
CONFTEST = $$system( echo $CONFIG_TARGET_MACOSX )
contains( CONFTEST, y ){
- LIBS += -lqpe -lopieui2 -lopiecore2 -lopie -lmailwrapper -liconv
+ LIBS += -lqpe -lopieui2 -lopiecore2 -lopiepim2 -lopiedb2 -lmailwrapper -liconv
}else{
- LIBS += -lqpe -lopieui2 -lopiecore2 -lopie -lmailwrapper
+ LIBS += -lqpe -lopieui2 -lopiecore2 -lopiepim2 -lopiedb2 -lmailwrapper
}
TARGET = opiemail
include ( $(OPIEDIR)/include.pro )