author | groucho <groucho> | 2003-04-24 11:19:11 (UTC) |
---|---|---|
committer | groucho <groucho> | 2003-04-24 11:19:11 (UTC) |
commit | 9671975e21266e3bfa6f3c793a3278b67cea34b7 (patch) (side-by-side diff) | |
tree | 876c77939cfd0e00fc844b1b5af09b2978564a6d /noncore/net/mailit/writemail.cpp | |
parent | 51e782b9658de61dc02579e115a9c62f396609a3 (diff) | |
download | opie-9671975e21266e3bfa6f3c793a3278b67cea34b7.zip opie-9671975e21266e3bfa6f3c793a3278b67cea34b7.tar.gz opie-9671975e21266e3bfa6f3c793a3278b67cea34b7.tar.bz2 |
- reworked size filtering
- started reworking offline download
- better tab focus switching
- Hello "Whats this" capability
- Fixed parsing of To: header files (no more Delivered-To: and Reply-To: matches)
- Good bye Settings.txt, hello Config Objects and encrypted passwords
- Translation improvements (added trs)
- Parser optimizations
Diffstat (limited to 'noncore/net/mailit/writemail.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mailit/writemail.cpp | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/noncore/net/mailit/writemail.cpp b/noncore/net/mailit/writemail.cpp index a9dcb02..0336c83 100644 --- a/noncore/net/mailit/writemail.cpp +++ b/noncore/net/mailit/writemail.cpp @@ -18,6 +18,7 @@ ** **********************************************************************/ #include <qmessagebox.h> +#include <qwhatsthis.h> #include "writemail.h" #include <qpe/resource.h> @@ -27,7 +28,7 @@ WriteMail::WriteMail( QWidget* parent, const char* name, WFlags fl ) showingAddressList = FALSE; init(); - addAtt = new AddAtt(0, "Add Attatchments"); + addAtt = new AddAtt(0, "Add Attachments"); } WriteMail::~WriteMail() @@ -64,19 +65,22 @@ void WriteMail::init() menu->insertItem( tr( "&Add" ), addMenu); bar = new QToolBar(this); - attatchButton = new QAction(tr("Attatchment"), Resource::loadPixmap("mailit/attach"), QString::null, 0, this, 0); - attatchButton->addTo(bar); - attatchButton->addTo(addMenu); - connect( attatchButton, SIGNAL( activated() ), this, SLOT( attatchFile() ) ); + attachButton = new QAction(tr("Attachment"), Resource::loadPixmap("mailit/attach"), QString::null, 0, this, 0); + attachButton->addTo(bar); + attachButton->addTo(addMenu); + connect( attachButton, SIGNAL( activated() ), this, SLOT( attachFile() ) ); + attachButton->setWhatsThis(tr("Click here to attach files to your mail")); confirmButton = new QAction(tr("Enque mail"), Resource::loadPixmap("OKButton"), QString::null, 0, this, 0); confirmButton->addTo(bar); confirmButton->addTo(mailMenu); connect( confirmButton, SIGNAL( activated() ), this, SLOT( accept() ) ); + confirmButton->setWhatsThis(tr("This button puts your mail in the send queue")); newButton = new QAction(tr("New mail"), Resource::loadPixmap("new"), QString::null, 0, this, 0); newButton->addTo(mailMenu); connect( newButton, SIGNAL( activated() ), this, SLOT( newMail() ) ); + newButton->setWhatsThis(tr("Click here to create a new mail")); widget = new QWidget(this, "widget"); grid = new QGridLayout( widget ); @@ -88,7 +92,6 @@ void WriteMail::init() grid->addWidget( recipientsBox, 0, 0 ); connect(recipientsBox,SIGNAL(activated(int)),this, SLOT(changeRecipients(int))); - subjetLabel = new QLabel( widget, "subjetLabel" ); subjetLabel->setText( tr( "Subject:" ) ); @@ -100,24 +103,27 @@ void WriteMail::init() subjectInput = new QLineEdit( widget, "subjectInput" ); grid->addWidget( subjectInput, 1, 1 ); + QWhatsThis::add(subjectInput,QWidget::tr("The mail subject should be entered here")); toInput = new QLineEdit( widget, "toInput" ); grid->addWidget( toInput, 0, 1 ); + QWhatsThis::add(recipientsBox,QWidget::tr("Recipients can be entered here")); ccInput = new QLineEdit( widget, "ccInput" ); ccInput->hide(); grid->addWidget( ccInput, 0, 1 ); - + QWhatsThis::add(ccInput,QWidget::tr("If you would like to send copies of your mail they can be entered here")); addressButton = new QToolButton( widget, "addressButton" ); addressButton->setPixmap( Resource::loadPixmap("AddressBook") ); addressButton->setToggleButton(TRUE); grid->addWidget( addressButton, 0, 2 ); connect(addressButton, SIGNAL(clicked()), this, SLOT(getAddress()) ); + QWhatsThis::add(addressButton,QWidget::tr("This button opens the address selector with all mail adresses from your OPIE addressbook")); emailInput = new QMultiLineEdit( widget, "emailInput" ); grid->addMultiCellWidget( emailInput, 2, 2, 0, 2); - + QWhatsThis::add(recipientsBox,QWidget::tr("Enter your mail text here")); addressView = new QListView( widget, "addressView"); addressView->addColumn("Name"); @@ -126,11 +132,13 @@ void WriteMail::init() addressView->setMultiSelection(TRUE); addressView->hide(); grid->addMultiCellWidget( addressView, 3, 3, 0, 2); + QWhatsThis::add(recipientsBox,QWidget::tr("Chose the recipients from this list")); okButton = new QToolButton(bar, "ok"); okButton->setPixmap( Resource::loadPixmap("enter") ); okButton->hide(); connect(okButton, SIGNAL(clicked()), this, SLOT(addRecipients()) ); + QWhatsThis::add(okButton,QWidget::tr("Queue your mail by clicking here")); setCentralWidget(widget); } @@ -143,7 +151,7 @@ void WriteMail::reject() // need to insert date void WriteMail::accept() { - QStringList attatchedFiles, attatchmentsType; + QStringList attachedFiles, attachmentsType; int idCount = 0; if (toInput->text() == "") @@ -196,13 +204,13 @@ void WriteMail::accept() mail.rawMail += mail.subject; mail.rawMail += "\n\n"; - attatchedFiles = addAtt->returnAttatchedFiles(); - attatchmentsType = addAtt->returnFileTypes(); + attachedFiles = addAtt->returnattachedFiles(); + attachmentsType = addAtt->returnFileTypes(); - QStringList::Iterator itType = attatchmentsType.begin(); + QStringList::Iterator itType = attachmentsType.begin(); Enclosure e; - for ( QStringList::Iterator it = attatchedFiles.begin(); it != attatchedFiles.end(); ++it ) { + for ( QStringList::Iterator it = attachedFiles.begin(); it != attachedFiles.end(); ++it ) { e.id = idCount; e.originalName = (*it).latin1(); e.contentType = (*itType).latin1(); @@ -236,7 +244,7 @@ void WriteMail::getAddress() } } -void WriteMail::attatchFile() +void WriteMail::attachFile() { addAtt->showMaximized(); } @@ -256,7 +264,7 @@ void WriteMail::reply(Email replyMail, bool replyAll) subjectInput->setText(tr("Re: ") + mail.subject); pos = 0; - mail.body.insert(pos, ">>"); + mail.body.insert(pos, ">"); while (pos != -1) { pos = mail.body.find('\n', pos); if (pos != -1) |