author | zautrix <zautrix> | 2004-10-07 22:51:36 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-07 22:51:36 (UTC) |
commit | 9f1b282aa2a72f3118a89dfebbc3c8132197213a (patch) (unidiff) | |
tree | edb795e1dfbc0a192a692a43a4369c84526201dd | |
parent | 21ec296f7f2832920dac336bb9f9476c80d746f5 (diff) | |
download | kdepimpi-9f1b282aa2a72f3118a89dfebbc3c8132197213a.zip kdepimpi-9f1b282aa2a72f3118a89dfebbc3c8132197213a.tar.gz kdepimpi-9f1b282aa2a72f3118a89dfebbc3c8132197213a.tar.bz2 |
ompi fixes
-rw-r--r-- | kmicromail/composemail.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp index e6f7daa..946e97d 100644 --- a/kmicromail/composemail.cpp +++ b/kmicromail/composemail.cpp | |||
@@ -91,64 +91,69 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m | |||
91 | attList->addColumn( tr( "Size" ) ); | 91 | attList->addColumn( tr( "Size" ) ); |
92 | QList<Account> accounts = settings->getAccounts(); | 92 | QList<Account> accounts = settings->getAccounts(); |
93 | 93 | ||
94 | if ( QApplication::desktop()->width() < 320 ) | 94 | if ( QApplication::desktop()->width() < 320 ) |
95 | smtpAccountBox->setMaximumWidth( 80 ); | 95 | smtpAccountBox->setMaximumWidth( 80 ); |
96 | Account *it; | 96 | Account *it; |
97 | for ( it = accounts.first(); it; it = accounts.next() ) { | 97 | for ( it = accounts.first(); it; it = accounts.next() ) { |
98 | if ( it->getType()==MAILLIB::A_SMTP ) { | 98 | if ( it->getType()==MAILLIB::A_SMTP ) { |
99 | SMTPaccount *smtp = static_cast<SMTPaccount *>(it); | 99 | SMTPaccount *smtp = static_cast<SMTPaccount *>(it); |
100 | smtpAccountBox->insertItem( smtp->getAccountName() ); | 100 | smtpAccountBox->insertItem( smtp->getAccountName() ); |
101 | smtpAccounts.append( smtp ); | 101 | smtpAccounts.append( smtp ); |
102 | } | 102 | } |
103 | } | 103 | } |
104 | connect( toButton, SIGNAL( clicked() ), SLOT( pickAddressTo() ) ); | 104 | connect( toButton, SIGNAL( clicked() ), SLOT( pickAddressTo() ) ); |
105 | connect( ccButton, SIGNAL( clicked() ), SLOT( pickAddressCC() ) ); | 105 | connect( ccButton, SIGNAL( clicked() ), SLOT( pickAddressCC() ) ); |
106 | connect( bccButton, SIGNAL( clicked() ), SLOT( pickAddressBCC() ) ); | 106 | connect( bccButton, SIGNAL( clicked() ), SLOT( pickAddressBCC() ) ); |
107 | connect( replyButton, SIGNAL( clicked() ), SLOT( pickAddressReply() ) ); | 107 | connect( replyButton, SIGNAL( clicked() ), SLOT( pickAddressReply() ) ); |
108 | connect( addButton, SIGNAL( clicked() ), SLOT( addAttachment() ) ); | 108 | connect( addButton, SIGNAL( clicked() ), SLOT( addAttachment() ) ); |
109 | connect( deleteButton, SIGNAL( clicked() ), SLOT( removeAttachment() ) ); | 109 | connect( deleteButton, SIGNAL( clicked() ), SLOT( removeAttachment() ) ); |
110 | connect( SaveButton, SIGNAL( clicked() ), SLOT( saveAsDraft()) ); | 110 | connect( SaveButton, SIGNAL( clicked() ), SLOT( saveAsDraft()) ); |
111 | mMail = 0; | 111 | mMail = 0; |
112 | warnAttach = true; | 112 | warnAttach = true; |
113 | if ( smtpAccounts.count() > 0 ) { | 113 | if ( smtpAccounts.count() > 0 ) { |
114 | fillValues( smtpAccountBox->currentItem() ); | 114 | fillValues( smtpAccountBox->currentItem() ); |
115 | } else { | 115 | } else { |
116 | QMessageBox::information( 0, tr( "Problem" ), | 116 | QMessageBox::information( 0, tr( "Problem" ), |
117 | tr( "Please create an SMTP account first.\nThe SMTP is needed for sending mail.\n" ), | 117 | tr( "Please create an SMTP account first.\nThe SMTP is needed for sending mail.\n" ), |
118 | tr( "Ok" ) ); | 118 | tr( "Ok" ) ); |
119 | return; | 119 | return; |
120 | } | 120 | } |
121 | connect( smtpAccountBox, SIGNAL( activated(int) ), SLOT( fillValues(int) ) ); | 121 | connect( smtpAccountBox, SIGNAL( activated(int) ), SLOT( fillValues(int) ) ); |
122 | message->setFont ( KOPrefs::instance()->mComposeFont ); | 122 | message->setFont ( KOPrefs::instance()->mComposeFont ); |
123 | message->setWordWrap (QMultiLineEdit::WidgetWidth); | ||
124 | #ifndef DESKTOP_VERSION | ||
125 | QPEApplication::setStylusOperation( message, QPEApplication::RightOnHold ); | ||
126 | #endif | ||
127 | |||
123 | } | 128 | } |
124 | 129 | ||
125 | void ComposeMail::fillSettings() | 130 | void ComposeMail::fillSettings() |
126 | { | 131 | { |
127 | if ( QApplication::desktop()->width() < 320 ) | 132 | if ( QApplication::desktop()->width() < 320 ) |
128 | fromBox->setMaximumWidth( 100 ); | 133 | fromBox->setMaximumWidth( 100 ); |
129 | QStringList mailList = QStringList::split(";",KOPrefs::instance()->mEmail); | 134 | QStringList mailList = QStringList::split(";",KOPrefs::instance()->mEmail); |
130 | QStringList::ConstIterator sit = mailList.begin(); | 135 | QStringList::ConstIterator sit = mailList.begin(); |
131 | int pref = 0; | 136 | int pref = 0; |
132 | for (;sit!=mailList.end();++sit) { | 137 | for (;sit!=mailList.end();++sit) { |
133 | fromBox->insertItem((*sit)); | 138 | fromBox->insertItem((*sit)); |
134 | } | 139 | } |
135 | senderNameEdit->setText(KOPrefs::instance()->mName); | 140 | senderNameEdit->setText(KOPrefs::instance()->mName); |
136 | } | 141 | } |
137 | 142 | ||
138 | 143 | ||
139 | void ComposeMail::saveAsDraft() | 144 | void ComposeMail::saveAsDraft() |
140 | { | 145 | { |
141 | 146 | ||
142 | Opie::Core::OSmartPointer<Mail> mail= new Mail(); | 147 | Opie::Core::OSmartPointer<Mail> mail= new Mail(); |
143 | mail->setMail(fromBox->currentText()); | 148 | mail->setMail(fromBox->currentText()); |
144 | mail->setTo( toLine->text() ); | 149 | mail->setTo( toLine->text() ); |
145 | mail->setName(senderNameEdit->text()); | 150 | mail->setName(senderNameEdit->text()); |
146 | mail->setCC( ccLine->text() ); | 151 | mail->setCC( ccLine->text() ); |
147 | mail->setBCC( bccLine->text() ); | 152 | mail->setBCC( bccLine->text() ); |
148 | mail->setReply( replyLine->text() ); | 153 | mail->setReply( replyLine->text() ); |
149 | mail->setSubject( subjectLine->text() ); | 154 | mail->setSubject( subjectLine->text() ); |
150 | if (!m_replyid.isEmpty()) { | 155 | if (!m_replyid.isEmpty()) { |
151 | QStringList ids; | 156 | QStringList ids; |
152 | ids.append(m_replyid); | 157 | ids.append(m_replyid); |
153 | mail->setInreply(ids); | 158 | mail->setInreply(ids); |
154 | } | 159 | } |