-rw-r--r-- | bin/kdepim/WhatsNew.txt | 5 | ||||
-rw-r--r-- | kmicromail/editaccounts.cpp | 24 | ||||
-rw-r--r-- | kmicromail/libetpan/tools/mailstream_socket.c | 2 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/smtpwrapper.cpp | 8 |
4 files changed, 25 insertions, 14 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 5661955..65f9168 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -8,32 +8,37 @@ Added keyboard shorcuts for | |||
8 | - delete item (delete + backspace key) | 8 | - delete item (delete + backspace key) |
9 | - add new item ( i + n key) | 9 | - add new item ( i + n key) |
10 | Fixed length of info in the title. | 10 | Fixed length of info in the title. |
11 | 11 | ||
12 | KO/Pi-KA/Pi: | 12 | KO/Pi-KA/Pi: |
13 | Changed "ME" menu bar entry to an icon. | 13 | Changed "ME" menu bar entry to an icon. |
14 | 14 | ||
15 | KO/Pi: | 15 | KO/Pi: |
16 | Fixed two minor bugs in displaying todos. | 16 | Fixed two minor bugs in displaying todos. |
17 | If in month view a cell is selected, the key shortcut "d" shows now that date. | 17 | If in month view a cell is selected, the key shortcut "d" shows now that date. |
18 | Added complete info for a todo in month view as an icon left of the text. | 18 | Added complete info for a todo in month view as an icon left of the text. |
19 | Fixed problems of displaying data when "<" or ">" were used in summary/location/description. | 19 | Fixed problems of displaying data when "<" or ">" were used in summary/location/description. |
20 | Fixed problem of search dialog size when switching displays. | 20 | Fixed problem of search dialog size when switching displays. |
21 | Cancel key now closes date picker. | 21 | Cancel key now closes date picker. |
22 | Rearranged KO/Pi file menu structure. | 22 | Rearranged KO/Pi file menu structure. |
23 | 23 | ||
24 | OM/Pi: | ||
25 | Added to the SMTP account setting the option | ||
26 | "No secure connection". | ||
27 | You have to configure your SMTP accounts again, sorry. | ||
28 | |||
24 | 29 | ||
25 | ********** VERSION 2.0.14 ************ | 30 | ********** VERSION 2.0.14 ************ |
26 | 31 | ||
27 | Made Passwordmanager PwM/Pi more userfriendly: | 32 | Made Passwordmanager PwM/Pi more userfriendly: |
28 | Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. | 33 | Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. |
29 | Fixed bug in KO/Pi todo printing. | 34 | Fixed bug in KO/Pi todo printing. |
30 | Made Qtopia calendar import possible on desktop . | 35 | Made Qtopia calendar import possible on desktop . |
31 | 36 | ||
32 | ********** VERSION 2.0.13 ************ | 37 | ********** VERSION 2.0.13 ************ |
33 | 38 | ||
34 | Fixed a problem in the addressee select dialog and made it more user friendly by adding a minimize splitter. | 39 | Fixed a problem in the addressee select dialog and made it more user friendly by adding a minimize splitter. |
35 | 40 | ||
36 | In the search dialog you can switch now the focus from search line edit to the list view by pressing key "arrow down". | 41 | In the search dialog you can switch now the focus from search line edit to the list view by pressing key "arrow down". |
37 | 42 | ||
38 | OM/Pi: | 43 | OM/Pi: |
39 | Fixed a refresh problem of outgoing/sent/sendfailed folders after sending mails. | 44 | Fixed a refresh problem of outgoing/sent/sendfailed folders after sending mails. |
diff --git a/kmicromail/editaccounts.cpp b/kmicromail/editaccounts.cpp index f1075c0..49049f6 100644 --- a/kmicromail/editaccounts.cpp +++ b/kmicromail/editaccounts.cpp | |||
@@ -317,41 +317,42 @@ SelectMailType::SelectMailType( QString *selection, QWidget *parent, const char | |||
317 | } | 317 | } |
318 | 318 | ||
319 | void SelectMailType::slotSelection( const QString &sel ) | 319 | void SelectMailType::slotSelection( const QString &sel ) |
320 | { | 320 | { |
321 | selected->replace( 0, selected->length(), sel ); | 321 | selected->replace( 0, selected->length(), sel ); |
322 | } | 322 | } |
323 | 323 | ||
324 | /** | 324 | /** |
325 | * IMAPconfig | 325 | * IMAPconfig |
326 | */ | 326 | */ |
327 | 327 | ||
328 | IMAPconfig::IMAPconfig( IMAPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) | 328 | IMAPconfig::IMAPconfig( IMAPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) |
329 | : IMAPconfigUI( parent, name, modal, flags ) | 329 | : IMAPconfigUI( parent, name, modal, flags ) |
330 | { | 330 | { |
331 | data = account; | 331 | data = account; |
332 | 332 | ||
333 | fillValues(); | 333 | //fillValues(); |
334 | 334 | ||
335 | connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); | 335 | connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); |
336 | ComboBox1->insertItem( "Only if available", 0 ); | 336 | ComboBox1->insertItem( "Only if available", 0 ); |
337 | ComboBox1->insertItem( "Always, Negotiated", 1 ); | 337 | ComboBox1->insertItem( "Always, Negotiated", 1 ); |
338 | ComboBox1->insertItem( "Connect on secure port", 2 ); | 338 | ComboBox1->insertItem( "Connect on secure port", 2 ); |
339 | ComboBox1->insertItem( "Run command instead", 3 ); | 339 | ComboBox1->insertItem( "Run command instead", 3 ); |
340 | CommandEdit->hide(); | 340 | CommandEdit->hide(); |
341 | ComboBox1->setCurrentItem( data->ConnectionType() ); | 341 | fillValues(); |
342 | // ComboBox1->setCurrentItem( data->ConnectionType() ); | ||
342 | } | 343 | } |
343 | 344 | ||
344 | void IMAPconfig::slotConnectionToggle( int index ) | 345 | void IMAPconfig::slotConnectionToggle( int index ) |
345 | { | 346 | { |
346 | if ( index == 2 ) | 347 | if ( index == 2 ) |
347 | { | 348 | { |
348 | portLine->setText( IMAP_SSL_PORT ); | 349 | portLine->setText( IMAP_SSL_PORT ); |
349 | } | 350 | } |
350 | else if ( index == 3 ) | 351 | else if ( index == 3 ) |
351 | { | 352 | { |
352 | portLine->setText( IMAP_PORT ); | 353 | portLine->setText( IMAP_PORT ); |
353 | CommandEdit->show(); | 354 | CommandEdit->show(); |
354 | } | 355 | } |
355 | else | 356 | else |
356 | { | 357 | { |
357 | portLine->setText( IMAP_PORT ); | 358 | portLine->setText( IMAP_PORT ); |
@@ -396,41 +397,42 @@ void IMAPconfig::accept() | |||
396 | data->setPrefix(prefixLine->text()); | 397 | data->setPrefix(prefixLine->text()); |
397 | data->setLocalFolder( localFolder->text() ); | 398 | data->setLocalFolder( localFolder->text() ); |
398 | data->setMaxMailSize( CheckBoxDown->isChecked()?SpinBoxDown->value():0 ) ; | 399 | data->setMaxMailSize( CheckBoxDown->isChecked()?SpinBoxDown->value():0 ) ; |
399 | data->setLeaveOnServer( CheckBoxLeaveOn->isChecked() ); | 400 | data->setLeaveOnServer( CheckBoxLeaveOn->isChecked() ); |
400 | 401 | ||
401 | QDialog::accept(); | 402 | QDialog::accept(); |
402 | } | 403 | } |
403 | 404 | ||
404 | /** | 405 | /** |
405 | * POP3config | 406 | * POP3config |
406 | */ | 407 | */ |
407 | 408 | ||
408 | POP3config::POP3config( POP3account *account, QWidget *parent, const char *name, bool modal, WFlags flags ) | 409 | POP3config::POP3config( POP3account *account, QWidget *parent, const char *name, bool modal, WFlags flags ) |
409 | : POP3configUI( parent, name, modal, flags ) | 410 | : POP3configUI( parent, name, modal, flags ) |
410 | { | 411 | { |
411 | data = account; | 412 | data = account; |
412 | fillValues(); | 413 | //fillValues(); |
413 | 414 | ||
414 | connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); | 415 | connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); |
415 | ComboBox1->insertItem( "Only if available", 0 ); | 416 | ComboBox1->insertItem( "Only if available", 0 ); |
416 | ComboBox1->insertItem( "Always, Negotiated", 1 ); | 417 | ComboBox1->insertItem( "Always, Negotiated", 1 ); |
417 | ComboBox1->insertItem( "Connect on secure port", 2 ); | 418 | ComboBox1->insertItem( "Connect on secure port", 2 ); |
418 | ComboBox1->insertItem( "Run command instead", 3 ); | 419 | ComboBox1->insertItem( "Run command instead", 3 ); |
419 | CommandEdit->hide(); | 420 | CommandEdit->hide(); |
420 | ComboBox1->setCurrentItem( data->ConnectionType() ); | 421 | fillValues(); |
422 | //ComboBox1->setCurrentItem( data->ConnectionType() ); | ||
421 | } | 423 | } |
422 | 424 | ||
423 | void POP3config::slotConnectionToggle( int index ) | 425 | void POP3config::slotConnectionToggle( int index ) |
424 | { | 426 | { |
425 | // 2 is ssl connection | 427 | // 2 is ssl connection |
426 | if ( index == 2 ) | 428 | if ( index == 2 ) |
427 | { | 429 | { |
428 | portLine->setText( POP3_SSL_PORT ); | 430 | portLine->setText( POP3_SSL_PORT ); |
429 | } | 431 | } |
430 | else if ( index == 3 ) | 432 | else if ( index == 3 ) |
431 | { | 433 | { |
432 | portLine->setText( POP3_PORT ); | 434 | portLine->setText( POP3_PORT ); |
433 | CommandEdit->show(); | 435 | CommandEdit->show(); |
434 | } | 436 | } |
435 | else | 437 | else |
436 | { | 438 | { |
@@ -478,47 +480,49 @@ void POP3config::accept() | |||
478 | 480 | ||
479 | QDialog::accept(); | 481 | QDialog::accept(); |
480 | } | 482 | } |
481 | 483 | ||
482 | /** | 484 | /** |
483 | * SMTPconfig | 485 | * SMTPconfig |
484 | */ | 486 | */ |
485 | 487 | ||
486 | SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) | 488 | SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) |
487 | : SMTPconfigUI( parent, name, modal, flags ) | 489 | : SMTPconfigUI( parent, name, modal, flags ) |
488 | { | 490 | { |
489 | data = account; | 491 | data = account; |
490 | 492 | ||
491 | connect( loginBox, SIGNAL( toggled(bool) ), userLine, SLOT( setEnabled(bool) ) ); | 493 | connect( loginBox, SIGNAL( toggled(bool) ), userLine, SLOT( setEnabled(bool) ) ); |
492 | connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) ); | 494 | connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) ); |
493 | 495 | ||
494 | fillValues(); | 496 | // fillValues(); |
495 | QIconSet icon; | 497 | QIconSet icon; |
496 | //icon = SmallIcon("fileexport"); | 498 | //icon = SmallIcon("fileexport"); |
497 | icon = SmallIcon("fileopen"); | 499 | icon = SmallIcon("fileopen"); |
498 | SignaturButton->setText(""); | 500 | SignaturButton->setText(""); |
499 | SignaturButton->setIconSet (icon ) ; | 501 | SignaturButton->setIconSet (icon ) ; |
500 | SignaturButton->setMaximumSize ( SignaturButton->sizeHint().height()+4,SignaturButton->sizeHint().height()) ; | 502 | SignaturButton->setMaximumSize ( SignaturButton->sizeHint().height()+4,SignaturButton->sizeHint().height()) ; |
501 | connect( SignaturButton, SIGNAL( clicked() ), this, SLOT( chooseSig() ) ); | 503 | connect( SignaturButton, SIGNAL( clicked() ), this, SLOT( chooseSig() ) ); |
502 | connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); | 504 | connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); |
503 | ComboBox1->insertItem( "Only if available", 0 ); | 505 | ComboBox1->insertItem( "No secure connection, no TLS", 0 ); |
504 | ComboBox1->insertItem( "Always, Negotiated", 1 ); | 506 | ComboBox1->insertItem( "Only if available, try TLS", 1 ); |
505 | ComboBox1->insertItem( "Connect on secure port", 2 ); | 507 | ComboBox1->insertItem( "Always, use TLS", 2 ); |
506 | ComboBox1->insertItem( "Run command instead", 3 ); | 508 | ComboBox1->insertItem( "Connect on secure port (SSL)", 3 ); |
509 | ComboBox1->insertItem( "Run command instead", 4 ); | ||
507 | CommandEdit->hide(); | 510 | CommandEdit->hide(); |
508 | ComboBox1->setCurrentItem( data->ConnectionType() ); | 511 | fillValues(); |
512 | //ComboBox1->setCurrentItem( data->ConnectionType() ); | ||
509 | } | 513 | } |
510 | void SMTPconfig::chooseSig() | 514 | void SMTPconfig::chooseSig() |
511 | { | 515 | { |
512 | QString lnk = KFileDialog::getOpenFileName( "", "Choose Signatur File", this ); | 516 | QString lnk = KFileDialog::getOpenFileName( "", "Choose Signatur File", this ); |
513 | if ( !lnk.isEmpty() ) { | 517 | if ( !lnk.isEmpty() ) { |
514 | SignaturEdit->setText( lnk ); | 518 | SignaturEdit->setText( lnk ); |
515 | } | 519 | } |
516 | } | 520 | } |
517 | void SMTPconfig::slotConnectionToggle( int index ) | 521 | void SMTPconfig::slotConnectionToggle( int index ) |
518 | { | 522 | { |
519 | // 2 is ssl connection | 523 | // 2 is ssl connection |
520 | if ( index == 2 ) | 524 | if ( index == 2 ) |
521 | { | 525 | { |
522 | portLine->setText( SMTP_SSL_PORT ); | 526 | portLine->setText( SMTP_SSL_PORT ); |
523 | } | 527 | } |
524 | else if ( index == 3 ) | 528 | else if ( index == 3 ) |
diff --git a/kmicromail/libetpan/tools/mailstream_socket.c b/kmicromail/libetpan/tools/mailstream_socket.c index 04a6f48..fd2c758 100644 --- a/kmicromail/libetpan/tools/mailstream_socket.c +++ b/kmicromail/libetpan/tools/mailstream_socket.c | |||
@@ -193,33 +193,33 @@ static ssize_t mailstream_low_socket_write(mailstream_low * s, | |||
193 | /* timeout */ | 193 | /* timeout */ |
194 | { | 194 | { |
195 | fd_set fds_write; | 195 | fd_set fds_write; |
196 | fd_set fds_excp; | 196 | fd_set fds_excp; |
197 | struct timeval timeout; | 197 | struct timeval timeout; |
198 | int r; | 198 | int r; |
199 | 199 | ||
200 | timeout = mailstream_network_delay; | 200 | timeout = mailstream_network_delay; |
201 | 201 | ||
202 | FD_ZERO(&fds_write); | 202 | FD_ZERO(&fds_write); |
203 | FD_SET(socket_data->fd, &fds_write); | 203 | FD_SET(socket_data->fd, &fds_write); |
204 | FD_ZERO(&fds_excp); | 204 | FD_ZERO(&fds_excp); |
205 | FD_SET(socket_data->fd, &fds_excp); | 205 | FD_SET(socket_data->fd, &fds_excp); |
206 | // LUTZ next line blocks sometimes | 206 | // LUTZ next line blocks sometimes |
207 | if ( timeout.tv_sec > DEFAULT_NETWORK_TIMEOUT ) | 207 | if ( timeout.tv_sec > DEFAULT_NETWORK_TIMEOUT ) |
208 | timeout.tv_sec = DEFAULT_NETWORK_TIMEOUT; | 208 | timeout.tv_sec = DEFAULT_NETWORK_TIMEOUT; |
209 | fprintf(stderr,"fd %d to secs %d \n", socket_data->fd, timeout.tv_sec ); | 209 | //fprintf(stderr,"fd %d to secs %d \n", socket_data->fd, timeout.tv_sec ); |
210 | r = select(socket_data->fd + 1, NULL, &fds_write, &fds_excp, &timeout); | 210 | r = select(socket_data->fd + 1, NULL, &fds_write, &fds_excp, &timeout); |
211 | if (r < 1) | 211 | if (r < 1) |
212 | return -1; | 212 | return -1; |
213 | if (FD_ISSET(socket_data->fd, &fds_excp)) | 213 | if (FD_ISSET(socket_data->fd, &fds_excp)) |
214 | return -1; | 214 | return -1; |
215 | if (!FD_ISSET(socket_data->fd, &fds_write)) | 215 | if (!FD_ISSET(socket_data->fd, &fds_write)) |
216 | return 0; | 216 | return 0; |
217 | } | 217 | } |
218 | 218 | ||
219 | return send(socket_data->fd,buf,count,MSG_NOSIGNAL); | 219 | return send(socket_data->fd,buf,count,MSG_NOSIGNAL); |
220 | //return write(socket_data->fd, buf, count); | 220 | //return write(socket_data->fd, buf, count); |
221 | } | 221 | } |
222 | 222 | ||
223 | 223 | ||
224 | /* mailstream */ | 224 | /* mailstream */ |
225 | 225 | ||
diff --git a/kmicromail/libmailwrapper/smtpwrapper.cpp b/kmicromail/libmailwrapper/smtpwrapper.cpp index 5096f67..872a460 100644 --- a/kmicromail/libmailwrapper/smtpwrapper.cpp +++ b/kmicromail/libmailwrapper/smtpwrapper.cpp | |||
@@ -180,45 +180,47 @@ int SMTPwrapper::start_smtp_tls() | |||
180 | int fd = mailstream_low_get_fd(low); | 180 | int fd = mailstream_low_get_fd(low); |
181 | if (fd > -1 && (new_low = mailstream_low_ssl_open(fd))!=0) { | 181 | if (fd > -1 && (new_low = mailstream_low_ssl_open(fd))!=0) { |
182 | mailstream_low_free(low); | 182 | mailstream_low_free(low); |
183 | mailstream_set_low(m_smtp->stream, new_low); | 183 | mailstream_set_low(m_smtp->stream, new_low); |
184 | } else { | 184 | } else { |
185 | return MAILSMTP_ERROR_IN_PROCESSING; | 185 | return MAILSMTP_ERROR_IN_PROCESSING; |
186 | } | 186 | } |
187 | return err; | 187 | return err; |
188 | } | 188 | } |
189 | 189 | ||
190 | void SMTPwrapper::connect_server() | 190 | void SMTPwrapper::connect_server() |
191 | { | 191 | { |
192 | QString server, user, pass; | 192 | QString server, user, pass; |
193 | bool ssl; | 193 | bool ssl; |
194 | uint16_t port; | 194 | uint16_t port; |
195 | ssl = false; | 195 | ssl = false; |
196 | bool try_tls = true; | 196 | bool try_tls = false; |
197 | bool force_tls=false; | 197 | bool force_tls=false; |
198 | QString failuretext = ""; | 198 | QString failuretext = ""; |
199 | 199 | ||
200 | if (m_smtp || !m_SmtpAccount) { | 200 | if (m_smtp || !m_SmtpAccount) { |
201 | return; | 201 | return; |
202 | } | 202 | } |
203 | server = m_SmtpAccount->getServer(); | 203 | server = m_SmtpAccount->getServer(); |
204 | if ( m_SmtpAccount->ConnectionType() == 2 ) { | 204 | if ( m_SmtpAccount->ConnectionType() == 3 ) { |
205 | ssl = true; | 205 | ssl = true; |
206 | try_tls = false; | 206 | try_tls = false; |
207 | } else if (m_SmtpAccount->ConnectionType() == 1) { | 207 | } else if (m_SmtpAccount->ConnectionType() == 2) { |
208 | force_tls = true; | 208 | force_tls = true; |
209 | } else if (m_SmtpAccount->ConnectionType() == 1) { | ||
210 | try_tls = true; | ||
209 | } | 211 | } |
210 | int result = 1; | 212 | int result = 1; |
211 | port = m_SmtpAccount->getPort().toUInt(); | 213 | port = m_SmtpAccount->getPort().toUInt(); |
212 | 214 | ||
213 | m_smtp = mailsmtp_new( 20, &progress ); | 215 | m_smtp = mailsmtp_new( 20, &progress ); |
214 | if ( m_smtp == NULL ) { | 216 | if ( m_smtp == NULL ) { |
215 | /* no failure message cause this happens when problems with memory - than we | 217 | /* no failure message cause this happens when problems with memory - than we |
216 | we can not display any messagebox */ | 218 | we can not display any messagebox */ |
217 | return; | 219 | return; |
218 | } | 220 | } |
219 | 221 | ||
220 | int err = MAILSMTP_NO_ERROR; | 222 | int err = MAILSMTP_NO_ERROR; |
221 | ; // odebug << "Servername " << server << " at port " << port << "" << oendl; | 223 | ; // odebug << "Servername " << server << " at port " << port << "" << oendl; |
222 | if ( ssl ) { | 224 | if ( ssl ) { |
223 | qDebug("smtp: ssl_connect "); | 225 | qDebug("smtp: ssl_connect "); |
224 | err = mailsmtp_ssl_connect( m_smtp, server.latin1(), port ); | 226 | err = mailsmtp_ssl_connect( m_smtp, server.latin1(), port ); |