Diffstat (limited to 'noncore/net/mail/addresspicker.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/addresspicker.cpp | 54 |
1 files changed, 34 insertions, 20 deletions
diff --git a/noncore/net/mail/addresspicker.cpp b/noncore/net/mail/addresspicker.cpp index f4f4cea..8cdabde 100644 --- a/noncore/net/mail/addresspicker.cpp +++ b/noncore/net/mail/addresspicker.cpp @@ -1 +1,11 @@ + +#include "composemail.h" + +/* OPIE */ +#include <opie2/ocontactaccess.h> +#include <opie2/ocontact.h> +#include <qpe/resource.h> +#include <qpe/qpeapplication.h> + +/* QT */ #include <qpushbutton.h> @@ -6,11 +16,5 @@ -#include <qpe/resource.h> -#include <opie2/ocontactaccess.h> -#include <opie2/ocontact.h> - - +/* STD */ #include <stdlib.h> -#include "composemail.h" - AddressPicker::AddressPicker( QWidget *parent, const char *name, bool modal, WFlags flags ) @@ -32,9 +36,14 @@ AddressPicker::AddressPicker( QWidget *parent, const char *name, bool modal, WFl 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) { + for ( it = m_list.begin(); it != m_list.end(); ++it ) + { + if ((*it).defaultEmail().length()!=0) + { mails = (*it).emailList(); - if ((*it).fileAs().length()>0) { + if ((*it).fileAs().length()>0) + { pre = "\""+(*it).firstName()+" "+(*it).lastName()+"\" <"; suf = ">"; - } else { + } + else + { pre = ""; @@ -43,3 +52,4 @@ AddressPicker::AddressPicker( QWidget *parent, const char *name, bool modal, WFl QStringList::ConstIterator sit = mails.begin(); - for (;sit!=mails.end();++sit) { + for (;sit!=mails.end();++sit) + { contactLine=pre+(*sit)+suf; @@ -49,3 +59,4 @@ AddressPicker::AddressPicker( QWidget *parent, const char *name, bool modal, WFl } - if ( addressList->count() <= 0 ) { + if ( addressList->count() <= 0 ) + { #if 0 @@ -57,3 +68,5 @@ AddressPicker::AddressPicker( QWidget *parent, const char *name, bool modal, WFl okButton->setEnabled( false ); - } else { + } + else + { // addressList->sort(); @@ -67,3 +80,4 @@ void AddressPicker::accept() - while ( item ) { + while ( item ) + { if ( item->selected() ) @@ -74,3 +88,4 @@ void AddressPicker::accept() - if ( names.isEmpty() ) { + if ( names.isEmpty() ) + { QMessageBox::information(this, tr("Error"), tr("<p>You have to select" @@ -89,7 +104,6 @@ QString AddressPicker::getNames() AddressPicker picker(0, 0, true); - picker.showMaximized(); - picker.show(); - int ret = picker.exec(); - if ( QDialog::Accepted == ret ) { + int ret = QPEApplication::execDialog( &picker ); + if ( QDialog::Accepted == ret ) + { return picker.selectedNames; |