summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mailit/popclient.cpp22
-rw-r--r--noncore/net/mailit/smtpclient.cpp8
-rw-r--r--noncore/unsupported/mailit/popclient.cpp22
-rw-r--r--noncore/unsupported/mailit/smtpclient.cpp8
4 files changed, 30 insertions, 30 deletions
diff --git a/noncore/net/mailit/popclient.cpp b/noncore/net/mailit/popclient.cpp
index a406af2..2f14ed2 100644
--- a/noncore/net/mailit/popclient.cpp
+++ b/noncore/net/mailit/popclient.cpp
@@ -94,18 +94,18 @@ void PopClient::setSelectedMails(MailList *list)
94 selected = TRUE; 94 selected = TRUE;
95 mailList = list; 95 mailList = list;
96} 96}
97 97
98void PopClient::connectionEstablished() 98void PopClient::connectionEstablished()
99{ 99{
100 emit updateStatus("Connection established"); 100 emit updateStatus(tr("Connection established"));
101} 101}
102 102
103void PopClient::errorHandling(int status) 103void PopClient::errorHandling(int status)
104{ 104{
105 emit updateStatus("Error Occured"); 105 emit updateStatus(tr("Error Occured"));
106 emit errorOccurred(status); 106 emit errorOccurred(status);
107 socket->close(); 107 socket->close();
108 receiving = FALSE; 108 receiving = FALSE;
109} 109}
110 110
111void PopClient::incomingData() 111void PopClient::incomingData()
@@ -209,25 +209,25 @@ void PopClient::incomingData()
209 if (messageCount <= newMessages) { 209 if (messageCount <= newMessages) {
210 *stream << "LIST " << messageCount << "\r\n"; 210 *stream << "LIST " << messageCount << "\r\n";
211 status = Size; 211 status = Size;
212 temp2.setNum(newMessages - lastSync); 212 temp2.setNum(newMessages - lastSync);
213 temp.setNum(messageCount - lastSync); 213 temp.setNum(messageCount - lastSync);
214 if (!selected) { 214 if (!selected) {
215 emit updateStatus("Retrieving " + temp + "/" + temp2); 215 emit updateStatus(tr("Retrieving ") + temp + "/" + temp2);
216 } else { 216 } else {
217 //completing a previously closed transfer 217 //completing a previously closed transfer
218 if ( (messageCount - lastSync) <= 0) { 218 if ( (messageCount - lastSync) <= 0) {
219 temp.setNum(messageCount); 219 temp.setNum(messageCount);
220 emit updateStatus("Previous message " + temp); 220 emit updateStatus(tr("Previous message ") + temp);
221 } else { 221 } else {
222 emit updateStatus("Completing message " + temp); 222 emit updateStatus(tr("Completing message ") + temp);
223 } 223 }
224 } 224 }
225 break; 225 break;
226 } else { 226 } else {
227 emit updateStatus("No new Messages"); 227 emit updateStatus(tr("No new Messages"));
228 status = Quit; 228 status = Quit;
229 } 229 }
230 } 230 }
231 //get size of message, eg "500 characters in message.." -> int 500 231 //get size of message, eg "500 characters in message.." -> int 500
232 case Size: { 232 case Size: {
233 if (status != Quit) { //because of idiotic switch 233 if (status != Quit) { //because of idiotic switch
@@ -297,28 +297,28 @@ void PopClient::incomingData()
297 messageCount = *ptr; 297 messageCount = *ptr;
298 *stream << "LIST " << messageCount << "\r\n"; 298 *stream << "LIST " << messageCount << "\r\n";
299 status = Size; 299 status = Size;
300 //completing a previously closed transfer 300 //completing a previously closed transfer
301 if ( (messageCount - lastSync) <= 0) { 301 if ( (messageCount - lastSync) <= 0) {
302 temp.setNum(messageCount); 302 temp.setNum(messageCount);
303 emit updateStatus("Previous message " + temp); 303 emit updateStatus(tr("Previous message ") + temp);
304 } else { 304 } else {
305 temp.setNum(messageCount - lastSync); 305 temp.setNum(messageCount - lastSync);
306 emit updateStatus("Completing message " + temp); 306 emit updateStatus(tr("Completing message ") + temp);
307 } 307 }
308 break; 308 break;
309 } else { 309 } else {
310 newMessages--; 310 newMessages--;
311 status = Quit; 311 status = Quit;
312 } 312 }
313 } else { 313 } else {
314 *stream << "LIST " << messageCount << "\r\n"; 314 *stream << "LIST " << messageCount << "\r\n";
315 status = Size; 315 status = Size;
316 temp2.setNum(newMessages - lastSync); 316 temp2.setNum(newMessages - lastSync);
317 temp.setNum(messageCount - lastSync); 317 temp.setNum(messageCount - lastSync);
318 emit updateStatus("Retrieving " + temp + "/" + temp2); 318 emit updateStatus(tr("Retrieving ") + temp + "/" + temp2);
319 319
320 break; 320 break;
321 } 321 }
322 } 322 }
323 } 323 }
324 if (status != Quit) 324 if (status != Quit)
@@ -328,15 +328,15 @@ void PopClient::incomingData()
328 case Quit: { 328 case Quit: {
329 *stream << "Quit\r\n"; 329 *stream << "Quit\r\n";
330 status = Done; 330 status = Done;
331 int newM = newMessages - lastSync; 331 int newM = newMessages - lastSync;
332 if (newM > 0) { 332 if (newM > 0) {
333 temp.setNum(newM); 333 temp.setNum(newM);
334 emit updateStatus(temp + " new messages"); 334 emit updateStatus(temp + tr(" new messages"));
335 } else { 335 } else {
336 emit updateStatus("No new messages"); 336 emit updateStatus(tr("No new messages"));
337 } 337 }
338 338
339 socket->close(); 339 socket->close();
340 receiving = FALSE; 340 receiving = FALSE;
341 emit mailTransfered(newM); 341 emit mailTransfered(newM);
342 break; 342 break;
diff --git a/noncore/net/mailit/smtpclient.cpp b/noncore/net/mailit/smtpclient.cpp
index 7bb7933..3bdc072 100644
--- a/noncore/net/mailit/smtpclient.cpp
+++ b/noncore/net/mailit/smtpclient.cpp
@@ -47,13 +47,13 @@ void SmtpClient::newConnection(QString target, int port)
47 } 47 }
48 48
49 status = Init; 49 status = Init;
50 sending = TRUE; 50 sending = TRUE;
51 socket->connectToHost(target, port); 51 socket->connectToHost(target, port);
52 52
53 emit updateStatus("DNS lookup"); 53 emit updateStatus(tr("DNS lookup"));
54} 54}
55 55
56void SmtpClient::addMail(QString from, QString subject, QStringList to, QString body) 56void SmtpClient::addMail(QString from, QString subject, QStringList to, QString body)
57{ 57{
58 RawEmail *mail = new RawEmail; 58 RawEmail *mail = new RawEmail;
59 59
@@ -64,13 +64,13 @@ void SmtpClient::addMail(QString from, QString subject, QStringList to, QString
64 64
65 mailList.append(mail); 65 mailList.append(mail);
66} 66}
67 67
68void SmtpClient::connectionEstablished() 68void SmtpClient::connectionEstablished()
69{ 69{
70 emit updateStatus("Connection established"); 70 emit updateStatus(tr("Connection established"));
71 71
72} 72}
73 73
74void SmtpClient::errorHandling(int status) 74void SmtpClient::errorHandling(int status)
75{ 75{
76 emit errorOccurred(status); 76 emit errorOccurred(status);
@@ -126,13 +126,13 @@ void SmtpClient::incomingData()
126 } else errorHandling(ErrUnknownResponse); 126 } else errorHandling(ErrUnknownResponse);
127 } 127 }
128 case Data: { 128 case Data: {
129 if (response[0] == '2') { 129 if (response[0] == '2') {
130 *stream << "DATA\r\n"; 130 *stream << "DATA\r\n";
131 status = Body; 131 status = Body;
132 emit updateStatus("Sending: " + mailPtr->subject); 132 emit updateStatus(tr("Sending: ") + mailPtr->subject);
133 } else errorHandling(ErrUnknownResponse); 133 } else errorHandling(ErrUnknownResponse);
134 break; 134 break;
135 } 135 }
136 case Body: { 136 case Body: {
137 if (response[0] == '3') { 137 if (response[0] == '3') {
138 *stream << mailPtr->body << "\r\n.\r\n"; 138 *stream << mailPtr->body << "\r\n.\r\n";
@@ -148,13 +148,13 @@ void SmtpClient::incomingData()
148 case Quit: { 148 case Quit: {
149 if (response[0] == '2') { 149 if (response[0] == '2') {
150 *stream << "QUIT\r\n"; 150 *stream << "QUIT\r\n";
151 status = Done; 151 status = Done;
152 QString temp; 152 QString temp;
153 temp.setNum(mailList.count()); 153 temp.setNum(mailList.count());
154 emit updateStatus("Sent " + temp + " messages"); 154 emit updateStatus(tr("Sent ") + temp + tr(" messages"));
155 emit mailSent(); 155 emit mailSent();
156 mailList.clear(); 156 mailList.clear();
157 sending = FALSE; 157 sending = FALSE;
158 socket->close(); 158 socket->close();
159 } else errorHandling(ErrUnknownResponse); 159 } else errorHandling(ErrUnknownResponse);
160 break; 160 break;
diff --git a/noncore/unsupported/mailit/popclient.cpp b/noncore/unsupported/mailit/popclient.cpp
index a406af2..2f14ed2 100644
--- a/noncore/unsupported/mailit/popclient.cpp
+++ b/noncore/unsupported/mailit/popclient.cpp
@@ -94,18 +94,18 @@ void PopClient::setSelectedMails(MailList *list)
94 selected = TRUE; 94 selected = TRUE;
95 mailList = list; 95 mailList = list;
96} 96}
97 97
98void PopClient::connectionEstablished() 98void PopClient::connectionEstablished()
99{ 99{
100 emit updateStatus("Connection established"); 100 emit updateStatus(tr("Connection established"));
101} 101}
102 102
103void PopClient::errorHandling(int status) 103void PopClient::errorHandling(int status)
104{ 104{
105 emit updateStatus("Error Occured"); 105 emit updateStatus(tr("Error Occured"));
106 emit errorOccurred(status); 106 emit errorOccurred(status);
107 socket->close(); 107 socket->close();
108 receiving = FALSE; 108 receiving = FALSE;
109} 109}
110 110
111void PopClient::incomingData() 111void PopClient::incomingData()
@@ -209,25 +209,25 @@ void PopClient::incomingData()
209 if (messageCount <= newMessages) { 209 if (messageCount <= newMessages) {
210 *stream << "LIST " << messageCount << "\r\n"; 210 *stream << "LIST " << messageCount << "\r\n";
211 status = Size; 211 status = Size;
212 temp2.setNum(newMessages - lastSync); 212 temp2.setNum(newMessages - lastSync);
213 temp.setNum(messageCount - lastSync); 213 temp.setNum(messageCount - lastSync);
214 if (!selected) { 214 if (!selected) {
215 emit updateStatus("Retrieving " + temp + "/" + temp2); 215 emit updateStatus(tr("Retrieving ") + temp + "/" + temp2);
216 } else { 216 } else {
217 //completing a previously closed transfer 217 //completing a previously closed transfer
218 if ( (messageCount - lastSync) <= 0) { 218 if ( (messageCount - lastSync) <= 0) {
219 temp.setNum(messageCount); 219 temp.setNum(messageCount);
220 emit updateStatus("Previous message " + temp); 220 emit updateStatus(tr("Previous message ") + temp);
221 } else { 221 } else {
222 emit updateStatus("Completing message " + temp); 222 emit updateStatus(tr("Completing message ") + temp);
223 } 223 }
224 } 224 }
225 break; 225 break;
226 } else { 226 } else {
227 emit updateStatus("No new Messages"); 227 emit updateStatus(tr("No new Messages"));
228 status = Quit; 228 status = Quit;
229 } 229 }
230 } 230 }
231 //get size of message, eg "500 characters in message.." -> int 500 231 //get size of message, eg "500 characters in message.." -> int 500
232 case Size: { 232 case Size: {
233 if (status != Quit) { //because of idiotic switch 233 if (status != Quit) { //because of idiotic switch
@@ -297,28 +297,28 @@ void PopClient::incomingData()
297 messageCount = *ptr; 297 messageCount = *ptr;
298 *stream << "LIST " << messageCount << "\r\n"; 298 *stream << "LIST " << messageCount << "\r\n";
299 status = Size; 299 status = Size;
300 //completing a previously closed transfer 300 //completing a previously closed transfer
301 if ( (messageCount - lastSync) <= 0) { 301 if ( (messageCount - lastSync) <= 0) {
302 temp.setNum(messageCount); 302 temp.setNum(messageCount);
303 emit updateStatus("Previous message " + temp); 303 emit updateStatus(tr("Previous message ") + temp);
304 } else { 304 } else {
305 temp.setNum(messageCount - lastSync); 305 temp.setNum(messageCount - lastSync);
306 emit updateStatus("Completing message " + temp); 306 emit updateStatus(tr("Completing message ") + temp);
307 } 307 }
308 break; 308 break;
309 } else { 309 } else {
310 newMessages--; 310 newMessages--;
311 status = Quit; 311 status = Quit;
312 } 312 }
313 } else { 313 } else {
314 *stream << "LIST " << messageCount << "\r\n"; 314 *stream << "LIST " << messageCount << "\r\n";
315 status = Size; 315 status = Size;
316 temp2.setNum(newMessages - lastSync); 316 temp2.setNum(newMessages - lastSync);
317 temp.setNum(messageCount - lastSync); 317 temp.setNum(messageCount - lastSync);
318 emit updateStatus("Retrieving " + temp + "/" + temp2); 318 emit updateStatus(tr("Retrieving ") + temp + "/" + temp2);
319 319
320 break; 320 break;
321 } 321 }
322 } 322 }
323 } 323 }
324 if (status != Quit) 324 if (status != Quit)
@@ -328,15 +328,15 @@ void PopClient::incomingData()
328 case Quit: { 328 case Quit: {
329 *stream << "Quit\r\n"; 329 *stream << "Quit\r\n";
330 status = Done; 330 status = Done;
331 int newM = newMessages - lastSync; 331 int newM = newMessages - lastSync;
332 if (newM > 0) { 332 if (newM > 0) {
333 temp.setNum(newM); 333 temp.setNum(newM);
334 emit updateStatus(temp + " new messages"); 334 emit updateStatus(temp + tr(" new messages"));
335 } else { 335 } else {
336 emit updateStatus("No new messages"); 336 emit updateStatus(tr("No new messages"));
337 } 337 }
338 338
339 socket->close(); 339 socket->close();
340 receiving = FALSE; 340 receiving = FALSE;
341 emit mailTransfered(newM); 341 emit mailTransfered(newM);
342 break; 342 break;
diff --git a/noncore/unsupported/mailit/smtpclient.cpp b/noncore/unsupported/mailit/smtpclient.cpp
index 7bb7933..3bdc072 100644
--- a/noncore/unsupported/mailit/smtpclient.cpp
+++ b/noncore/unsupported/mailit/smtpclient.cpp
@@ -47,13 +47,13 @@ void SmtpClient::newConnection(QString target, int port)
47 } 47 }
48 48
49 status = Init; 49 status = Init;
50 sending = TRUE; 50 sending = TRUE;
51 socket->connectToHost(target, port); 51 socket->connectToHost(target, port);
52 52
53 emit updateStatus("DNS lookup"); 53 emit updateStatus(tr("DNS lookup"));
54} 54}
55 55
56void SmtpClient::addMail(QString from, QString subject, QStringList to, QString body) 56void SmtpClient::addMail(QString from, QString subject, QStringList to, QString body)
57{ 57{
58 RawEmail *mail = new RawEmail; 58 RawEmail *mail = new RawEmail;
59 59
@@ -64,13 +64,13 @@ void SmtpClient::addMail(QString from, QString subject, QStringList to, QString
64 64
65 mailList.append(mail); 65 mailList.append(mail);
66} 66}
67 67
68void SmtpClient::connectionEstablished() 68void SmtpClient::connectionEstablished()
69{ 69{
70 emit updateStatus("Connection established"); 70 emit updateStatus(tr("Connection established"));
71 71
72} 72}
73 73
74void SmtpClient::errorHandling(int status) 74void SmtpClient::errorHandling(int status)
75{ 75{
76 emit errorOccurred(status); 76 emit errorOccurred(status);
@@ -126,13 +126,13 @@ void SmtpClient::incomingData()
126 } else errorHandling(ErrUnknownResponse); 126 } else errorHandling(ErrUnknownResponse);
127 } 127 }
128 case Data: { 128 case Data: {
129 if (response[0] == '2') { 129 if (response[0] == '2') {
130 *stream << "DATA\r\n"; 130 *stream << "DATA\r\n";
131 status = Body; 131 status = Body;
132 emit updateStatus("Sending: " + mailPtr->subject); 132 emit updateStatus(tr("Sending: ") + mailPtr->subject);
133 } else errorHandling(ErrUnknownResponse); 133 } else errorHandling(ErrUnknownResponse);
134 break; 134 break;
135 } 135 }
136 case Body: { 136 case Body: {
137 if (response[0] == '3') { 137 if (response[0] == '3') {
138 *stream << mailPtr->body << "\r\n.\r\n"; 138 *stream << mailPtr->body << "\r\n.\r\n";
@@ -148,13 +148,13 @@ void SmtpClient::incomingData()
148 case Quit: { 148 case Quit: {
149 if (response[0] == '2') { 149 if (response[0] == '2') {
150 *stream << "QUIT\r\n"; 150 *stream << "QUIT\r\n";
151 status = Done; 151 status = Done;
152 QString temp; 152 QString temp;
153 temp.setNum(mailList.count()); 153 temp.setNum(mailList.count());
154 emit updateStatus("Sent " + temp + " messages"); 154 emit updateStatus(tr("Sent ") + temp + tr(" messages"));
155 emit mailSent(); 155 emit mailSent();
156 mailList.clear(); 156 mailList.clear();
157 sending = FALSE; 157 sending = FALSE;
158 socket->close(); 158 socket->close();
159 } else errorHandling(ErrUnknownResponse); 159 } else errorHandling(ErrUnknownResponse);
160 break; 160 break;