author | zautrix <zautrix> | 2004-10-27 21:34:55 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-27 21:34:55 (UTC) |
commit | 9c88346fc757fd1dc54b3fca151a2a610159d8cf (patch) (unidiff) | |
tree | 4a5de97ba71ce66eea914d55923d88aff3515c93 /kmicromail | |
parent | 7f3cc07fab5f5f6ddd402c458341f1df3a144e2c (diff) | |
download | kdepimpi-9c88346fc757fd1dc54b3fca151a2a610159d8cf.zip kdepimpi-9c88346fc757fd1dc54b3fca151a2a610159d8cf.tar.gz kdepimpi-9c88346fc757fd1dc54b3fca151a2a610159d8cf.tar.bz2 |
several fixes
-rw-r--r-- | kmicromail/editaccounts.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kmicromail/editaccounts.cpp b/kmicromail/editaccounts.cpp index 7ad4ec8..c931e45 100644 --- a/kmicromail/editaccounts.cpp +++ b/kmicromail/editaccounts.cpp | |||
@@ -57,144 +57,144 @@ EditAccounts::EditAccounts( Settings *s, QWidget *parent, const char *name, bool | |||
57 | mailList->addColumn( i18n( "Account" ) ); | 57 | mailList->addColumn( i18n( "Account" ) ); |
58 | mailList->addColumn( i18n( "Type" ) ); | 58 | mailList->addColumn( i18n( "Type" ) ); |
59 | 59 | ||
60 | newsList->addColumn( i18n( "Account" ) ); | 60 | newsList->addColumn( i18n( "Account" ) ); |
61 | 61 | ||
62 | connect( newMail, SIGNAL( clicked() ), SLOT( slotNewMail() ) ); | 62 | connect( newMail, SIGNAL( clicked() ), SLOT( slotNewMail() ) ); |
63 | connect( editMail, SIGNAL( clicked() ), SLOT( slotEditMail() ) ); | 63 | connect( editMail, SIGNAL( clicked() ), SLOT( slotEditMail() ) ); |
64 | connect( deleteMail, SIGNAL( clicked() ), SLOT( slotDeleteMail() ) ); | 64 | connect( deleteMail, SIGNAL( clicked() ), SLOT( slotDeleteMail() ) ); |
65 | connect( newNews, SIGNAL( clicked() ), SLOT( slotNewNews() ) ); | 65 | connect( newNews, SIGNAL( clicked() ), SLOT( slotNewNews() ) ); |
66 | connect( editNews, SIGNAL( clicked() ), SLOT( slotEditNews() ) ); | 66 | connect( editNews, SIGNAL( clicked() ), SLOT( slotEditNews() ) ); |
67 | connect( deleteNews, SIGNAL( clicked() ), SLOT( slotDeleteNews() ) ); | 67 | connect( deleteNews, SIGNAL( clicked() ), SLOT( slotDeleteNews() ) ); |
68 | 68 | ||
69 | slotFillLists(); | 69 | slotFillLists(); |
70 | } | 70 | } |
71 | 71 | ||
72 | void EditAccounts::slotFillLists() | 72 | void EditAccounts::slotFillLists() |
73 | { | 73 | { |
74 | mailList->clear(); | 74 | mailList->clear(); |
75 | newsList->clear(); | 75 | newsList->clear(); |
76 | 76 | ||
77 | QList<Account> accounts = settings->getAccounts(); | 77 | QList<Account> accounts = settings->getAccounts(); |
78 | Account *it; | 78 | Account *it; |
79 | for ( it = accounts.first(); it; it = accounts.next() ) | 79 | for ( it = accounts.first(); it; it = accounts.next() ) |
80 | { | 80 | { |
81 | if ( it->getType()==MAILLIB::A_NNTP ) | 81 | if ( it->getType()==MAILLIB::A_NNTP ) |
82 | { | 82 | { |
83 | (void) new AccountListItem( newsList, it ); | 83 | (void) new AccountListItem( newsList, it ); |
84 | } | 84 | } |
85 | else | 85 | else |
86 | { | 86 | { |
87 | (void) new AccountListItem( mailList, it ); | 87 | (void) new AccountListItem( mailList, it ); |
88 | } | 88 | } |
89 | } | 89 | } |
90 | } | 90 | } |
91 | 91 | ||
92 | void EditAccounts::slotNewMail() | 92 | void EditAccounts::slotNewMail() |
93 | { | 93 | { |
94 | QString *selection = new QString(); | 94 | QString *selection = new QString(); |
95 | SelectMailType selType( selection, this, 0, true ); | 95 | SelectMailType selType( selection, this, 0, true ); |
96 | selType.show(); | 96 | selType.show(); |
97 | if ( QDialog::Accepted == selType.exec() ) | 97 | if ( QDialog::Accepted == selType.exec() ) |
98 | { | 98 | { |
99 | slotNewAccount( *selection ); | 99 | slotNewAccount( *selection ); |
100 | } | 100 | } |
101 | } | 101 | } |
102 | 102 | ||
103 | void EditAccounts::slotNewAccount( const QString &type ) | 103 | void EditAccounts::slotNewAccount( const QString &type ) |
104 | { | 104 | { |
105 | if ( type.compare( "IMAP" ) == 0 ) | 105 | if ( type.compare( i18n("IMAP") ) == 0 ) |
106 | { | 106 | { |
107 | IMAPaccount *account = new IMAPaccount(); | 107 | IMAPaccount *account = new IMAPaccount(); |
108 | IMAPconfig imap( account, this, 0, true ); | 108 | IMAPconfig imap( account, this, 0, true ); |
109 | imap.showMaximized(); | 109 | imap.showMaximized(); |
110 | if ( QDialog::Accepted == imap.exec() ) | 110 | if ( QDialog::Accepted == imap.exec() ) |
111 | { | 111 | { |
112 | settings->addAccount( account ); | 112 | settings->addAccount( account ); |
113 | account->save(); | 113 | account->save(); |
114 | slotFillLists(); | 114 | slotFillLists(); |
115 | } | 115 | } |
116 | else | 116 | else |
117 | { | 117 | { |
118 | account->remove(); | 118 | account->remove(); |
119 | } | 119 | } |
120 | } | 120 | } |
121 | else if ( type.compare( "POP3" ) == 0 ) | 121 | else if ( type.compare( i18n("POP3") ) == 0 ) |
122 | { | 122 | { |
123 | POP3account *account = new POP3account(); | 123 | POP3account *account = new POP3account(); |
124 | POP3config pop3( account, this, 0, true, WStyle_ContextHelp ); | 124 | POP3config pop3( account, this, 0, true, WStyle_ContextHelp ); |
125 | if ( QDialog::Accepted == KApplication::execDialog( &pop3 ) ) | 125 | if ( QDialog::Accepted == KApplication::execDialog( &pop3 ) ) |
126 | { | 126 | { |
127 | settings->addAccount( account ); | 127 | settings->addAccount( account ); |
128 | account->save(); | 128 | account->save(); |
129 | slotFillLists(); | 129 | slotFillLists(); |
130 | } | 130 | } |
131 | else | 131 | else |
132 | { | 132 | { |
133 | account->remove(); | 133 | account->remove(); |
134 | } | 134 | } |
135 | } | 135 | } |
136 | else if ( type.compare( "SMTP" ) == 0 ) | 136 | else if ( type.compare( i18n("SMTP") ) == 0 ) |
137 | { | 137 | { |
138 | SMTPaccount *account = new SMTPaccount(); | 138 | SMTPaccount *account = new SMTPaccount(); |
139 | SMTPconfig smtp( account, this, 0, true, WStyle_ContextHelp ); | 139 | SMTPconfig smtp( account, this, 0, true, WStyle_ContextHelp ); |
140 | if ( QDialog::Accepted == KApplication::execDialog( &smtp ) ) | 140 | if ( QDialog::Accepted == KApplication::execDialog( &smtp ) ) |
141 | { | 141 | { |
142 | settings->addAccount( account ); | 142 | settings->addAccount( account ); |
143 | account->save(); | 143 | account->save(); |
144 | slotFillLists(); | 144 | slotFillLists(); |
145 | 145 | ||
146 | } | 146 | } |
147 | else | 147 | else |
148 | { | 148 | { |
149 | account->remove(); | 149 | account->remove(); |
150 | } | 150 | } |
151 | } | 151 | } |
152 | else if ( type.compare( "NNTP" ) == 0 ) | 152 | else if ( type.compare( i18n("NNTP") ) == 0 ) |
153 | { | 153 | { |
154 | NNTPaccount *account = new NNTPaccount(); | 154 | NNTPaccount *account = new NNTPaccount(); |
155 | NNTPconfig nntp( account, this, 0, true, WStyle_ContextHelp ); | 155 | NNTPconfig nntp( account, this, 0, true, WStyle_ContextHelp ); |
156 | if ( QDialog::Accepted == KApplication::execDialog( &nntp ) ) | 156 | if ( QDialog::Accepted == KApplication::execDialog( &nntp ) ) |
157 | { | 157 | { |
158 | settings->addAccount( account ); | 158 | settings->addAccount( account ); |
159 | account->save(); | 159 | account->save(); |
160 | slotFillLists(); | 160 | slotFillLists(); |
161 | } | 161 | } |
162 | else | 162 | else |
163 | { | 163 | { |
164 | account->remove(); | 164 | account->remove(); |
165 | } | 165 | } |
166 | } | 166 | } |
167 | } | 167 | } |
168 | 168 | ||
169 | void EditAccounts::slotEditAccount( Account *account ) | 169 | void EditAccounts::slotEditAccount( Account *account ) |
170 | { | 170 | { |
171 | if ( account->getType() == MAILLIB::A_IMAP ) | 171 | if ( account->getType() == MAILLIB::A_IMAP ) |
172 | { | 172 | { |
173 | IMAPaccount *imapAcc = static_cast<IMAPaccount *>(account); | 173 | IMAPaccount *imapAcc = static_cast<IMAPaccount *>(account); |
174 | IMAPconfig imap( imapAcc, this, 0, true, WStyle_ContextHelp ); | 174 | IMAPconfig imap( imapAcc, this, 0, true, WStyle_ContextHelp ); |
175 | if ( QDialog::Accepted == KApplication::execDialog( &imap ) ) | 175 | if ( QDialog::Accepted == KApplication::execDialog( &imap ) ) |
176 | { | 176 | { |
177 | slotFillLists(); | 177 | slotFillLists(); |
178 | } | 178 | } |
179 | } | 179 | } |
180 | else if ( account->getType()==MAILLIB::A_POP3 ) | 180 | else if ( account->getType()==MAILLIB::A_POP3 ) |
181 | { | 181 | { |
182 | POP3account *pop3Acc = static_cast<POP3account *>(account); | 182 | POP3account *pop3Acc = static_cast<POP3account *>(account); |
183 | POP3config pop3( pop3Acc, this, 0, true, WStyle_ContextHelp ); | 183 | POP3config pop3( pop3Acc, this, 0, true, WStyle_ContextHelp ); |
184 | if ( QDialog::Accepted == KApplication::execDialog( &pop3 ) ) | 184 | if ( QDialog::Accepted == KApplication::execDialog( &pop3 ) ) |
185 | { | 185 | { |
186 | slotFillLists(); | 186 | slotFillLists(); |
187 | } | 187 | } |
188 | } | 188 | } |
189 | else if ( account->getType()==MAILLIB::A_SMTP ) | 189 | else if ( account->getType()==MAILLIB::A_SMTP ) |
190 | { | 190 | { |
191 | SMTPaccount *smtpAcc = static_cast<SMTPaccount *>(account); | 191 | SMTPaccount *smtpAcc = static_cast<SMTPaccount *>(account); |
192 | SMTPconfig smtp( smtpAcc, this, 0, true, WStyle_ContextHelp ); | 192 | SMTPconfig smtp( smtpAcc, this, 0, true, WStyle_ContextHelp ); |
193 | if ( QDialog::Accepted == KApplication::execDialog( &smtp ) ) | 193 | if ( QDialog::Accepted == KApplication::execDialog( &smtp ) ) |
194 | { | 194 | { |
195 | slotFillLists(); | 195 | slotFillLists(); |
196 | } | 196 | } |
197 | } | 197 | } |
198 | else if ( account->getType()==MAILLIB::A_NNTP) | 198 | else if ( account->getType()==MAILLIB::A_NNTP) |
199 | { | 199 | { |
200 | NNTPaccount *nntpAcc = static_cast<NNTPaccount *>(account); | 200 | NNTPaccount *nntpAcc = static_cast<NNTPaccount *>(account); |