author | zautrix <zautrix> | 2004-10-31 16:54:47 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-31 16:54:47 (UTC) |
commit | 3964a158be731f1bb244ca861262df5fa8d04cf3 (patch) (unidiff) | |
tree | fa4a8e9af345c144562be480f21df6e3d8d609c7 /kmicromail/opiemail.cpp | |
parent | bed831cc1a38d38a4c5b9329bf37b1c663142c23 (diff) | |
download | kdepimpi-3964a158be731f1bb244ca861262df5fa8d04cf3.zip kdepimpi-3964a158be731f1bb244ca861262df5fa8d04cf3.tar.gz kdepimpi-3964a158be731f1bb244ca861262df5fa8d04cf3.tar.bz2 |
changed showmaximized for desktop
-rw-r--r-- | kmicromail/opiemail.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp index fe9df87..8d16ae7 100644 --- a/kmicromail/opiemail.cpp +++ b/kmicromail/opiemail.cpp | |||
@@ -104,118 +104,124 @@ void OpieMail::slotExtAppHandler() | |||
104 | { | 104 | { |
105 | ExternalAppHandler::instance()->appMessage ( mPendingMessage, mPendingData ); | 105 | ExternalAppHandler::instance()->appMessage ( mPendingMessage, mPendingData ); |
106 | } | 106 | } |
107 | void OpieMail::slotwriteMail2(const QString& namemail ) | 107 | void OpieMail::slotwriteMail2(const QString& namemail ) |
108 | { | 108 | { |
109 | //qDebug("OpieMail::slotwriteMail2 "); | 109 | //qDebug("OpieMail::slotwriteMail2 "); |
110 | //qApp->processEvents(); | 110 | //qApp->processEvents(); |
111 | ComposeMail compose( settings, this, 0, true ); | 111 | ComposeMail compose( settings, this, 0, true ); |
112 | if ( !namemail.isEmpty() ) { | 112 | if ( !namemail.isEmpty() ) { |
113 | QString to = namemail; | 113 | QString to = namemail; |
114 | if ( namemail.find( " <") > 1 ) { | 114 | if ( namemail.find( " <") > 1 ) { |
115 | to = "\"" +to.replace( QRegExp( " <"), "\" <") ; | 115 | to = "\"" +to.replace( QRegExp( " <"), "\" <") ; |
116 | } else | 116 | } else |
117 | if ( namemail.find( "<") > 1 ) { | 117 | if ( namemail.find( "<") > 1 ) { |
118 | to = "\"" +to.replace( QRegExp( "<"), "\" <") ; | 118 | to = "\"" +to.replace( QRegExp( "<"), "\" <") ; |
119 | } | 119 | } |
120 | int sub = to.find( ">:"); | 120 | int sub = to.find( ">:"); |
121 | if ( sub > 0 ) { | 121 | if ( sub > 0 ) { |
122 | compose.setTo( to.left(sub+1) ); | 122 | compose.setTo( to.left(sub+1) ); |
123 | compose.setSubject( to.mid(sub+2) ); | 123 | compose.setSubject( to.mid(sub+2) ); |
124 | } else | 124 | } else |
125 | compose.setTo( to ); | 125 | compose.setTo( to ); |
126 | } | 126 | } |
127 | compose.slotAdjustColumns(); | 127 | compose.slotAdjustColumns(); |
128 | #ifndef DESKTOP_VERSION | ||
128 | compose.showMaximized(); | 129 | compose.showMaximized(); |
130 | #endif | ||
129 | compose.exec(); | 131 | compose.exec(); |
130 | raise(); | 132 | raise(); |
131 | //qDebug("retttich "); | 133 | //qDebug("retttich "); |
132 | } | 134 | } |
133 | void OpieMail::slotwriteMail(const QString&name,const QString&email) | 135 | void OpieMail::slotwriteMail(const QString&name,const QString&email) |
134 | { | 136 | { |
135 | // qDebug("OpieMail::slotwriteMail "); | 137 | // qDebug("OpieMail::slotwriteMail "); |
136 | ComposeMail compose( settings, this, 0, true ); | 138 | ComposeMail compose( settings, this, 0, true ); |
137 | if (!email.isEmpty()) | 139 | if (!email.isEmpty()) |
138 | { | 140 | { |
139 | if (!name.isEmpty()) | 141 | if (!name.isEmpty()) |
140 | { | 142 | { |
141 | compose.setTo("\"" + name + "\"" + " " + "<"+ email + ">"); | 143 | compose.setTo("\"" + name + "\"" + " " + "<"+ email + ">"); |
142 | } | 144 | } |
143 | else | 145 | else |
144 | { | 146 | { |
145 | compose.setTo(email); | 147 | compose.setTo(email); |
146 | } | 148 | } |
147 | } | 149 | } |
148 | compose.slotAdjustColumns(); | 150 | compose.slotAdjustColumns(); |
151 | #ifndef DESKTOP_VERSION | ||
149 | compose.showMaximized(); | 152 | compose.showMaximized(); |
153 | #endif | ||
150 | compose.exec(); | 154 | compose.exec(); |
151 | raise(); | 155 | raise(); |
152 | } | 156 | } |
153 | 157 | ||
154 | void OpieMail::slotComposeMail() | 158 | void OpieMail::slotComposeMail() |
155 | { | 159 | { |
156 | if ( mPendingEmail == QString::null && mPendingName == QString::null) | 160 | if ( mPendingEmail == QString::null && mPendingName == QString::null) |
157 | slotwriteMail2( QString () ); | 161 | slotwriteMail2( QString () ); |
158 | else { | 162 | else { |
159 | if ( mPendingEmail == QString::null ) | 163 | if ( mPendingEmail == QString::null ) |
160 | slotwriteMail2( mPendingName ); | 164 | slotwriteMail2( mPendingName ); |
161 | else | 165 | else |
162 | slotwriteMail( mPendingName, mPendingEmail ); | 166 | slotwriteMail( mPendingName, mPendingEmail ); |
163 | } | 167 | } |
164 | //slotwriteMail(0l,0l); | 168 | //slotwriteMail(0l,0l); |
165 | } | 169 | } |
166 | 170 | ||
167 | void OpieMail::slotSendQueued() | 171 | void OpieMail::slotSendQueued() |
168 | { | 172 | { |
169 | SMTPaccount *smtp = 0; | 173 | SMTPaccount *smtp = 0; |
170 | 174 | ||
171 | QList<Account> list = settings->getAccounts(); | 175 | QList<Account> list = settings->getAccounts(); |
172 | QList<SMTPaccount> smtpList; | 176 | QList<SMTPaccount> smtpList; |
173 | smtpList.setAutoDelete(false); | 177 | smtpList.setAutoDelete(false); |
174 | Account *it; | 178 | Account *it; |
175 | for ( it = list.first(); it; it = list.next() ) | 179 | for ( it = list.first(); it; it = list.next() ) |
176 | { | 180 | { |
177 | if ( it->getType() == MAILLIB::A_SMTP ) | 181 | if ( it->getType() == MAILLIB::A_SMTP ) |
178 | { | 182 | { |
179 | smtp = static_cast<SMTPaccount *>(it); | 183 | smtp = static_cast<SMTPaccount *>(it); |
180 | smtpList.append(smtp); | 184 | smtpList.append(smtp); |
181 | } | 185 | } |
182 | } | 186 | } |
183 | if (smtpList.count()==0) | 187 | if (smtpList.count()==0) |
184 | { | 188 | { |
185 | QMessageBox::information(0,i18n("Info"),i18n("Define a smtp account first!\n")); | 189 | QMessageBox::information(0,i18n("Info"),i18n("Define a smtp account first!\n")); |
186 | return; | 190 | return; |
187 | } | 191 | } |
188 | if (smtpList.count()==1) | 192 | if (smtpList.count()==1) |
189 | { | 193 | { |
190 | smtp = smtpList.at(0); | 194 | smtp = smtpList.at(0); |
191 | } | 195 | } |
192 | else | 196 | else |
193 | { | 197 | { |
194 | smtp = 0; | 198 | smtp = 0; |
195 | selectsmtp selsmtp; | 199 | selectsmtp selsmtp; |
196 | selsmtp.setSelectionlist(&smtpList); | 200 | selsmtp.setSelectionlist(&smtpList); |
201 | #ifndef DESKTOP_VERSION | ||
197 | selsmtp.showMaximized(); | 202 | selsmtp.showMaximized(); |
203 | #endif | ||
198 | if ( selsmtp.exec() == QDialog::Accepted ) | 204 | if ( selsmtp.exec() == QDialog::Accepted ) |
199 | { | 205 | { |
200 | smtp = selsmtp.selected_smtp(); | 206 | smtp = selsmtp.selected_smtp(); |
201 | } | 207 | } |
202 | } | 208 | } |
203 | if (smtp) | 209 | if (smtp) |
204 | { | 210 | { |
205 | SMTPwrapper * wrap = new SMTPwrapper(smtp); | 211 | SMTPwrapper * wrap = new SMTPwrapper(smtp); |
206 | if ( wrap->flushOutbox() ) | 212 | if ( wrap->flushOutbox() ) |
207 | { | 213 | { |
208 | QMessageBox::information(0,i18n("Info"),i18n("Mail queue flushed")); | 214 | QMessageBox::information(0,i18n("Info"),i18n("Mail queue flushed")); |
209 | } | 215 | } |
210 | delete wrap; | 216 | delete wrap; |
211 | } | 217 | } |
212 | } | 218 | } |
213 | 219 | ||
214 | void OpieMail::slotSearchMails() | 220 | void OpieMail::slotSearchMails() |
215 | { | 221 | { |
216 | qDebug("OpieMail::slotSearchMails():not implemented "); | 222 | qDebug("OpieMail::slotSearchMails():not implemented "); |
217 | } | 223 | } |
218 | 224 | ||
219 | void OpieMail::slotEditSettings() | 225 | void OpieMail::slotEditSettings() |
220 | { | 226 | { |
221 | 227 | ||