author | zautrix <zautrix> | 2004-12-04 22:11:00 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-12-04 22:11:00 (UTC) |
commit | ac994c86c3037dbe2273e62c46115b942b09fdcc (patch) (unidiff) | |
tree | 5c33da571f716ff91f300cf26ebf619d43a03fdc | |
parent | 9c7f3267a1d7db2dbc3bd6384e75cf8ffea1c3df (diff) | |
download | kdepimpi-ac994c86c3037dbe2273e62c46115b942b09fdcc.zip kdepimpi-ac994c86c3037dbe2273e62c46115b942b09fdcc.tar.gz kdepimpi-ac994c86c3037dbe2273e62c46115b942b09fdcc.tar.bz2 |
ompi fix
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 4 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/imapwrapper.cpp | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 4fff7e1..6be5222 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,157 +1,161 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 1.9.14 ************ | 3 | ********** VERSION 1.9.14 ************ |
4 | 4 | ||
5 | Fixed some problems with the dialog sizes when switching | 5 | Fixed some problems with the dialog sizes when switching |
6 | portrait/landscape mode on 640x480 PDA display. | 6 | portrait/landscape mode on 640x480 PDA display. |
7 | 7 | ||
8 | Fixed some other small bugs. | 8 | Fixed some other small bugs. |
9 | 9 | ||
10 | Fixed an ugly bug in KOpieMail: | 10 | Fixed an ugly bug in KOpieMail: |
11 | KOpieMail was not able to write files (mails) to MSDOS file system, | 11 | KOpieMail was not able to write files (mails) to MSDOS file system, |
12 | like on an usual preformatted SD card. That should work now. | 12 | like on an usual preformatted SD card. That should work now. |
13 | To save your mail data on the Sd card do the following: | 13 | To save your mail data on the Sd card do the following: |
14 | Create a dir on the SD card: | 14 | Create a dir on the SD card: |
15 | mkdir /mnt/card/localmail | 15 | mkdir /mnt/card/localmail |
16 | Go to your home dir: | 16 | Go to your home dir: |
17 | cd | 17 | cd |
18 | Go to kopiemail data storage dir: | 18 | Go to kopiemail data storage dir: |
19 | cd kdepim/apps/kopiemail | 19 | cd kdepim/apps/kopiemail |
20 | Create a symlink to the SD card: | 20 | Create a symlink to the SD card: |
21 | ls -s /mnt/card/localmail | 21 | ls -s /mnt/card/localmail |
22 | Now KOpieMail will store all mails on the SD card. | 22 | Now KOpieMail will store all mails on the SD card. |
23 | 23 | ||
24 | KO/Pi Monthview: | 24 | KO/Pi Monthview: |
25 | Now "Go to Today" selects the current month from day 1-end, | 25 | Now "Go to Today" selects the current month from day 1-end, |
26 | not the current date + some days. | 26 | not the current date + some days. |
27 | I.e. "Go to Today" shows now always | 27 | I.e. "Go to Today" shows now always |
28 | the current month with first day of month in the first row. | 28 | the current month with first day of month in the first row. |
29 | 29 | ||
30 | Added missing German translation. | ||
31 | |||
32 | Fixed icons of executeable on Wintendo. | ||
33 | |||
30 | 34 | ||
31 | ********** VERSION 1.9.13 ************ | 35 | ********** VERSION 1.9.13 ************ |
32 | 36 | ||
33 | Fixed nasty PwM/Pi file reading bug, when | 37 | Fixed nasty PwM/Pi file reading bug, when |
34 | the used hash algo of file is different then the global | 38 | the used hash algo of file is different then the global |
35 | hash algo. | 39 | hash algo. |
36 | 40 | ||
37 | Added KA/Pi support for opie mailit mailapplication. | 41 | Added KA/Pi support for opie mailit mailapplication. |
38 | 42 | ||
39 | Fixed some bugs in OM/Pi. | 43 | Fixed some bugs in OM/Pi. |
40 | Now character conversion tables are available for the Zaurus | 44 | Now character conversion tables are available for the Zaurus |
41 | to make OM/Pi working properly. | 45 | to make OM/Pi working properly. |
42 | To get the character conversion in OM/Pi working, please download | 46 | To get the character conversion in OM/Pi working, please download |
43 | at the sourceforge project site the package | 47 | at the sourceforge project site the package |
44 | sr-character-conversion_SharpROM_arm.ipk.zip | 48 | sr-character-conversion_SharpROM_arm.ipk.zip |
45 | (or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms) | 49 | (or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms) |
46 | from the section "general files for KDE/Pim" | 50 | from the section "general files for KDE/Pim" |
47 | Instructions how to install this package are in a ReadMe in this file. | 51 | Instructions how to install this package are in a ReadMe in this file. |
48 | 52 | ||
49 | 53 | ||
50 | Fixed the orientation change problem in KA/Pi when switching | 54 | Fixed the orientation change problem in KA/Pi when switching |
51 | portrait/landscape mode. | 55 | portrait/landscape mode. |
52 | 56 | ||
53 | French translation available for KA/Pi and OM/Pi. | 57 | French translation available for KA/Pi and OM/Pi. |
54 | 58 | ||
55 | Fixed some problems with categories in KO/Pi in DTM sync. | 59 | Fixed some problems with categories in KO/Pi in DTM sync. |
56 | 60 | ||
57 | Added selection dialog for export to phone in KA/Pi. | 61 | Added selection dialog for export to phone in KA/Pi. |
58 | 62 | ||
59 | If in KO/Pi is an attendee selected to add to a meeting and this | 63 | If in KO/Pi is an attendee selected to add to a meeting and this |
60 | attendee is already in the list of attendees, this person is not added | 64 | attendee is already in the list of attendees, this person is not added |
61 | again. | 65 | again. |
62 | 66 | ||
63 | Some menu cleanup in KA/Pi. | 67 | Some menu cleanup in KA/Pi. |
64 | 68 | ||
65 | ********** VERSION 1.9.12 ************ | 69 | ********** VERSION 1.9.12 ************ |
66 | 70 | ||
67 | Fix for the bug in KO/Pi What's Next view of version 1.9.11. | 71 | Fix for the bug in KO/Pi What's Next view of version 1.9.11. |
68 | 72 | ||
69 | Bugfix: Licence file is now shown again. | 73 | Bugfix: Licence file is now shown again. |
70 | 74 | ||
71 | OM/Pi now supports Unicode (utf8 charset). | 75 | OM/Pi now supports Unicode (utf8 charset). |
72 | Fixed some bugs in OM/Pi. | 76 | Fixed some bugs in OM/Pi. |
73 | 77 | ||
74 | KA/Pi has more German translation. | 78 | KA/Pi has more German translation. |
75 | 79 | ||
76 | 80 | ||
77 | ********** VERSION 1.9.11 ************ | 81 | ********** VERSION 1.9.11 ************ |
78 | 82 | ||
79 | Fixed several problems in PWM/Pi, like | 83 | Fixed several problems in PWM/Pi, like |
80 | asking the user, if unsaved changed are pending | 84 | asking the user, if unsaved changed are pending |
81 | when closing the app. | 85 | when closing the app. |
82 | And PwM/Pi handles now different texts for the | 86 | And PwM/Pi handles now different texts for the |
83 | fields Description, Username, Password, configurable per category. | 87 | fields Description, Username, Password, configurable per category. |
84 | 88 | ||
85 | Fixed a crash in KO/Pi , when importing/loading vcs files | 89 | Fixed a crash in KO/Pi , when importing/loading vcs files |
86 | which have an entry with an attendee with state: | 90 | which have an entry with an attendee with state: |
87 | NEEDS ACTION | 91 | NEEDS ACTION |
88 | 92 | ||
89 | Fixed some problems in the German translation of OM/Pi, | 93 | Fixed some problems in the German translation of OM/Pi, |
90 | which makes some dialogs not fitting on the screen | 94 | which makes some dialogs not fitting on the screen |
91 | of the Z 5500. | 95 | of the Z 5500. |
92 | 96 | ||
93 | Fixed Qtopia crash, when disabling/deinstalling | 97 | Fixed Qtopia crash, when disabling/deinstalling |
94 | KO/Pi alarm applet. | 98 | KO/Pi alarm applet. |
95 | 99 | ||
96 | Implemented direct KDE<->KA/Pi sync for KA/Pi running | 100 | Implemented direct KDE<->KA/Pi sync for KA/Pi running |
97 | on Linux desktop. | 101 | on Linux desktop. |
98 | 102 | ||
99 | Added feature "remove sync info" to sync menu. | 103 | Added feature "remove sync info" to sync menu. |
100 | 104 | ||
101 | Tweaked the KO/Pi What's next view a bit, added | 105 | Tweaked the KO/Pi What's next view a bit, added |
102 | setting to hide events that are done. | 106 | setting to hide events that are done. |
103 | 107 | ||
104 | Disabled "beam receive enabled" on startup to | 108 | Disabled "beam receive enabled" on startup to |
105 | avoid problems if Fastload is enabled. | 109 | avoid problems if Fastload is enabled. |
106 | Please set "beam receive enabled", | 110 | Please set "beam receive enabled", |
107 | if you want to receive data via IR. | 111 | if you want to receive data via IR. |
108 | 112 | ||
109 | Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running | 113 | Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running |
110 | on Linux desktop. | 114 | on Linux desktop. |
111 | 115 | ||
112 | Made in KA/Pi scrolling possible, if details view is selected. | 116 | Made in KA/Pi scrolling possible, if details view is selected. |
113 | (The keyboard focus is set automatically to the search line) | 117 | (The keyboard focus is set automatically to the search line) |
114 | 118 | ||
115 | Fixed a bug in DMT sync, that a new entry in DTM was added | 119 | Fixed a bug in DMT sync, that a new entry in DTM was added |
116 | on every sync to Kx/Pi. | 120 | on every sync to Kx/Pi. |
117 | 121 | ||
118 | Fixed missing writing of KA/Pi categories to DMT entries when syncing. | 122 | Fixed missing writing of KA/Pi categories to DMT entries when syncing. |
119 | 123 | ||
120 | Fixed a bug in DMT sync with todos created in KO/Pi containing | 124 | Fixed a bug in DMT sync with todos created in KO/Pi containing |
121 | non-latin1 characters. | 125 | non-latin1 characters. |
122 | 126 | ||
123 | Rearranged package contents of Sharp-ipks and made all | 127 | Rearranged package contents of Sharp-ipks and made all |
124 | packages installable on SD again. | 128 | packages installable on SD again. |
125 | 129 | ||
126 | Fixed the writing of addressbook data in DTM sync. | 130 | Fixed the writing of addressbook data in DTM sync. |
127 | Empty fields in KA/Pi were not removed. | 131 | Empty fields in KA/Pi were not removed. |
128 | 132 | ||
129 | Added better category handling in KA/Pi: | 133 | Added better category handling in KA/Pi: |
130 | Added item | 134 | Added item |
131 | Edit Categories and | 135 | Edit Categories and |
132 | Manage new categories | 136 | Manage new categories |
133 | to the settings menu. | 137 | to the settings menu. |
134 | Possible to configure a view to display categories. | 138 | Possible to configure a view to display categories. |
135 | 139 | ||
136 | Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu. | 140 | Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu. |
137 | 141 | ||
138 | Fixed displaying of "free" days and time in KO Monthview and Agendaview. | 142 | Fixed displaying of "free" days and time in KO Monthview and Agendaview. |
139 | 143 | ||
140 | ... and many other bugfixes. | 144 | ... and many other bugfixes. |
141 | 145 | ||
142 | ********** VERSION 1.9.10 ************ | 146 | ********** VERSION 1.9.10 ************ |
143 | 147 | ||
144 | Many internal small bugfixes. | 148 | Many internal small bugfixes. |
145 | And fix of the "big" bug in KO/Pi, | 149 | And fix of the "big" bug in KO/Pi, |
146 | that after Syncing the appointments had an offset by several hours. | 150 | that after Syncing the appointments had an offset by several hours. |
147 | That was a problem with the internal timezone setting, | 151 | That was a problem with the internal timezone setting, |
148 | introduced by the changed timezone configuration settings. | 152 | introduced by the changed timezone configuration settings. |
149 | 153 | ||
150 | German translation for OM/Pi is now available. | 154 | German translation for OM/Pi is now available. |
151 | 155 | ||
152 | 156 | ||
153 | ********** VERSION 1.9.9 ************ | 157 | ********** VERSION 1.9.9 ************ |
154 | 158 | ||
155 | KDE-Pim/Pi has a new Member! | 159 | KDE-Pim/Pi has a new Member! |
156 | It is called PWM/Pi (Passwordmanager/platform-independent) | 160 | It is called PWM/Pi (Passwordmanager/platform-independent) |
157 | and it is available for the Zaurus. | 161 | and it is available for the Zaurus. |
diff --git a/kmicromail/libmailwrapper/imapwrapper.cpp b/kmicromail/libmailwrapper/imapwrapper.cpp index da7065f..b890725 100644 --- a/kmicromail/libmailwrapper/imapwrapper.cpp +++ b/kmicromail/libmailwrapper/imapwrapper.cpp | |||
@@ -1,177 +1,179 @@ | |||
1 | // CHANGED 2004-09-31 Lutz Rogowski | 1 | // CHANGED 2004-09-31 Lutz Rogowski |
2 | #include <stdlib.h> | 2 | #include <stdlib.h> |
3 | #include <libetpan/libetpan.h> | 3 | #include <libetpan/libetpan.h> |
4 | #include <qpe/global.h> | 4 | #include <qpe/global.h> |
5 | #include <qapplication.h> | 5 | #include <qapplication.h> |
6 | #include "imapwrapper.h" | 6 | #include "imapwrapper.h" |
7 | #include "mailtypes.h" | 7 | #include "mailtypes.h" |
8 | #include "logindialog.h" | 8 | #include "logindialog.h" |
9 | #include <qprogressbar.h> | 9 | #include <qprogressbar.h> |
10 | #include "genericwrapper.h" | 10 | #include "genericwrapper.h" |
11 | #include <kglobal.h> | 11 | #include <kglobal.h> |
12 | 12 | ||
13 | using namespace Opie::Core; | 13 | using namespace Opie::Core; |
14 | int IMAPwrapper::mMax = 0; | 14 | int IMAPwrapper::mMax = 0; |
15 | int IMAPwrapper::mCurrent = 0; | 15 | int IMAPwrapper::mCurrent = 0; |
16 | 16 | ||
17 | IMAPwrapper::IMAPwrapper( IMAPaccount *a ) | 17 | IMAPwrapper::IMAPwrapper( IMAPaccount *a ) |
18 | : AbstractMail() | 18 | : AbstractMail() |
19 | { | 19 | { |
20 | account = a; | 20 | account = a; |
21 | m_imap = 0; | 21 | m_imap = 0; |
22 | m_Lastmbox = ""; | 22 | m_Lastmbox = ""; |
23 | mCurrent = 0; | 23 | mCurrent = 0; |
24 | mMax = 0; | 24 | mMax = 0; |
25 | } | 25 | } |
26 | 26 | ||
27 | IMAPwrapper::~IMAPwrapper() | 27 | IMAPwrapper::~IMAPwrapper() |
28 | { | 28 | { |
29 | logout(); | 29 | logout(); |
30 | } | 30 | } |
31 | 31 | ||
32 | /* to avoid to often select statements in loops etc. | 32 | /* to avoid to often select statements in loops etc. |
33 | we trust that we are logged in and connection is established!*/ | 33 | we trust that we are logged in and connection is established!*/ |
34 | int IMAPwrapper::selectMbox(const QString&mbox) | 34 | int IMAPwrapper::selectMbox(const QString&mbox) |
35 | { | 35 | { |
36 | if (mbox == m_Lastmbox) { | 36 | if (mbox == m_Lastmbox) { |
37 | return MAILIMAP_NO_ERROR; | 37 | return MAILIMAP_NO_ERROR; |
38 | } | 38 | } |
39 | int err = mailimap_select( m_imap, (char*)mbox.latin1()); | 39 | int err = mailimap_select( m_imap, (char*)mbox.latin1()); |
40 | if ( err != MAILIMAP_NO_ERROR ) { | 40 | if ( err != MAILIMAP_NO_ERROR ) { |
41 | m_Lastmbox = ""; | 41 | m_Lastmbox = ""; |
42 | return err; | 42 | return err; |
43 | } | 43 | } |
44 | m_Lastmbox = mbox; | 44 | m_Lastmbox = mbox; |
45 | return err; | 45 | return err; |
46 | } | 46 | } |
47 | 47 | ||
48 | void IMAPwrapper::imap_progress( size_t current, size_t maximum ) | 48 | void IMAPwrapper::imap_progress( size_t current, size_t maximum ) |
49 | { | 49 | { |
50 | qApp->processEvents(); | ||
51 | return; | ||
50 | //qDebug("imap progress %d of %d ",current,maximum ); | 52 | //qDebug("imap progress %d of %d ",current,maximum ); |
51 | //Global::statusMessage(i18n("Downloading message %1 of %2").arg( current).arg(maximum)); | 53 | //Global::statusMessage(i18n("Downloading message %1 of %2").arg( current).arg(maximum)); |
52 | //qApp->processEvents() | 54 | //qApp->processEvents() |
53 | static unsigned int last = 0; | 55 | static unsigned int last = 0; |
54 | if ( last != current ) | 56 | if ( last != current ) |
55 | IMAPwrapper::progress(); | 57 | IMAPwrapper::progress(); |
56 | last = current; | 58 | last = current; |
57 | } | 59 | } |
58 | void IMAPwrapper::progress( QString m ) | 60 | void IMAPwrapper::progress( QString m ) |
59 | { | 61 | { |
60 | 62 | ||
61 | static QString mProgrMess; | 63 | static QString mProgrMess; |
62 | if ( m != QString::null ) { | 64 | if ( m != QString::null ) { |
63 | mProgrMess = m; | 65 | mProgrMess = m; |
64 | mCurrent = 1; | 66 | mCurrent = 1; |
65 | return; | 67 | return; |
66 | } | 68 | } |
67 | QString mess; | 69 | QString mess; |
68 | //qDebug("progress "); | 70 | //qDebug("progress "); |
69 | if ( mMax ) mess = mProgrMess +i18n(" message %1 of %2").arg( mCurrent++).arg(mMax); | 71 | if ( mMax ) mess = mProgrMess +i18n(" message %1 of %2").arg( mCurrent++).arg(mMax); |
70 | else mess = mProgrMess +i18n(" message %1").arg( mCurrent++); | 72 | else mess = mProgrMess +i18n(" message %1").arg( mCurrent++); |
71 | Global::statusMessage(mess); | 73 | Global::statusMessage(mess); |
72 | //qDebug("Progress %s %s", mess.latin1(), m.latin1()); | 74 | //qDebug("Progress %s %s", mess.latin1(), m.latin1()); |
73 | qApp->processEvents(); | 75 | qApp->processEvents(); |
74 | } | 76 | } |
75 | bool IMAPwrapper::start_tls(bool force_tls) | 77 | bool IMAPwrapper::start_tls(bool force_tls) |
76 | { | 78 | { |
77 | int err; | 79 | int err; |
78 | bool try_tls = force_tls; | 80 | bool try_tls = force_tls; |
79 | mailimap_capability_data * cap_data = 0; | 81 | mailimap_capability_data * cap_data = 0; |
80 | 82 | ||
81 | err = mailimap_capability(m_imap,&cap_data); | 83 | err = mailimap_capability(m_imap,&cap_data); |
82 | if (err != MAILIMAP_NO_ERROR) { | 84 | if (err != MAILIMAP_NO_ERROR) { |
83 | Global::statusMessage("error getting capabilities!"); | 85 | Global::statusMessage("error getting capabilities!"); |
84 | return false; | 86 | return false; |
85 | } | 87 | } |
86 | clistiter * cur; | 88 | clistiter * cur; |
87 | for(cur = clist_begin(cap_data->cap_list) ; cur != NULL;cur = clist_next(cur)) { | 89 | for(cur = clist_begin(cap_data->cap_list) ; cur != NULL;cur = clist_next(cur)) { |
88 | struct mailimap_capability * cap; | 90 | struct mailimap_capability * cap; |
89 | cap = (struct mailimap_capability *)clist_content(cur); | 91 | cap = (struct mailimap_capability *)clist_content(cur); |
90 | if (cap->cap_type == MAILIMAP_CAPABILITY_NAME) { | 92 | if (cap->cap_type == MAILIMAP_CAPABILITY_NAME) { |
91 | if (strcasecmp(cap->cap_data.cap_name, "STARTTLS") == 0) { | 93 | if (strcasecmp(cap->cap_data.cap_name, "STARTTLS") == 0) { |
92 | try_tls = true; | 94 | try_tls = true; |
93 | break; | 95 | break; |
94 | } | 96 | } |
95 | } | 97 | } |
96 | } | 98 | } |
97 | if (cap_data) { | 99 | if (cap_data) { |
98 | mailimap_capability_data_free(cap_data); | 100 | mailimap_capability_data_free(cap_data); |
99 | } | 101 | } |
100 | if (try_tls) { | 102 | if (try_tls) { |
101 | err = mailimap_starttls(m_imap); | 103 | err = mailimap_starttls(m_imap); |
102 | if (err != MAILIMAP_NO_ERROR && force_tls) { | 104 | if (err != MAILIMAP_NO_ERROR && force_tls) { |
103 | Global::statusMessage(i18n("Server has no TLS support!")); | 105 | Global::statusMessage(i18n("Server has no TLS support!")); |
104 | try_tls = false; | 106 | try_tls = false; |
105 | } else { | 107 | } else { |
106 | mailstream_low * low; | 108 | mailstream_low * low; |
107 | mailstream_low * new_low; | 109 | mailstream_low * new_low; |
108 | low = mailstream_get_low(m_imap->imap_stream); | 110 | low = mailstream_get_low(m_imap->imap_stream); |
109 | if (!low) { | 111 | if (!low) { |
110 | try_tls = false; | 112 | try_tls = false; |
111 | } else { | 113 | } else { |
112 | int fd = mailstream_low_get_fd(low); | 114 | int fd = mailstream_low_get_fd(low); |
113 | if (fd > -1 && (new_low = mailstream_low_ssl_open(fd))!=0) { | 115 | if (fd > -1 && (new_low = mailstream_low_ssl_open(fd))!=0) { |
114 | mailstream_low_free(low); | 116 | mailstream_low_free(low); |
115 | mailstream_set_low(m_imap->imap_stream, new_low); | 117 | mailstream_set_low(m_imap->imap_stream, new_low); |
116 | } else { | 118 | } else { |
117 | try_tls = false; | 119 | try_tls = false; |
118 | } | 120 | } |
119 | } | 121 | } |
120 | } | 122 | } |
121 | } | 123 | } |
122 | return try_tls; | 124 | return try_tls; |
123 | } | 125 | } |
124 | 126 | ||
125 | void IMAPwrapper::login() | 127 | void IMAPwrapper::login() |
126 | { | 128 | { |
127 | QString server, user, pass; | 129 | QString server, user, pass; |
128 | uint16_t port; | 130 | uint16_t port; |
129 | int err = MAILIMAP_NO_ERROR; | 131 | int err = MAILIMAP_NO_ERROR; |
130 | 132 | ||
131 | if (account->getOffline()) return; | 133 | if (account->getOffline()) return; |
132 | /* we are connected this moment */ | 134 | /* we are connected this moment */ |
133 | /* TODO: setup a timer holding the line or if connection closed - delete the value */ | 135 | /* TODO: setup a timer holding the line or if connection closed - delete the value */ |
134 | if (m_imap) { | 136 | if (m_imap) { |
135 | err = mailimap_noop(m_imap); | 137 | err = mailimap_noop(m_imap); |
136 | if (err!=MAILIMAP_NO_ERROR) { | 138 | if (err!=MAILIMAP_NO_ERROR) { |
137 | logout(); | 139 | logout(); |
138 | } else { | 140 | } else { |
139 | mailstream_flush(m_imap->imap_stream); | 141 | mailstream_flush(m_imap->imap_stream); |
140 | return; | 142 | return; |
141 | } | 143 | } |
142 | } | 144 | } |
143 | server = account->getServer(); | 145 | server = account->getServer(); |
144 | port = account->getPort().toUInt(); | 146 | port = account->getPort().toUInt(); |
145 | if ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) { | 147 | if ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) { |
146 | LoginDialog login( account->getUser(), account->getPassword(), NULL, 0, true ); | 148 | LoginDialog login( account->getUser(), account->getPassword(), NULL, 0, true ); |
147 | login.show(); | 149 | login.show(); |
148 | if ( QDialog::Accepted == login.exec() ) { | 150 | if ( QDialog::Accepted == login.exec() ) { |
149 | // ok | 151 | // ok |
150 | user = login.getUser(); | 152 | user = login.getUser(); |
151 | pass = login.getPassword(); | 153 | pass = login.getPassword(); |
152 | } else { | 154 | } else { |
153 | // cancel | 155 | // cancel |
154 | return; | 156 | return; |
155 | } | 157 | } |
156 | } else { | 158 | } else { |
157 | user = account->getUser(); | 159 | user = account->getUser(); |
158 | pass = account->getPassword(); | 160 | pass = account->getPassword(); |
159 | } | 161 | } |
160 | 162 | ||
161 | m_imap = mailimap_new( 20, &imap_progress ); | 163 | m_imap = mailimap_new( 20, &imap_progress ); |
162 | 164 | ||
163 | /* connect */ | 165 | /* connect */ |
164 | bool ssl = false; | 166 | bool ssl = false; |
165 | bool try_tls = false; | 167 | bool try_tls = false; |
166 | bool force_tls = false; | 168 | bool force_tls = false; |
167 | 169 | ||
168 | if ( account->ConnectionType() == 2 ) { | 170 | if ( account->ConnectionType() == 2 ) { |
169 | ssl = true; | 171 | ssl = true; |
170 | } | 172 | } |
171 | if (account->ConnectionType()==1) { | 173 | if (account->ConnectionType()==1) { |
172 | force_tls = true; | 174 | force_tls = true; |
173 | } | 175 | } |
174 | 176 | ||
175 | if ( ssl ) { | 177 | if ( ssl ) { |
176 | qDebug("using ssl "); | 178 | qDebug("using ssl "); |
177 | err = mailimap_ssl_connect( m_imap, (char*)server.latin1(), port ); | 179 | err = mailimap_ssl_connect( m_imap, (char*)server.latin1(), port ); |