summaryrefslogtreecommitdiffabout
path: root/kmicromail
authorzautrix <zautrix>2004-10-25 23:39:31 (UTC)
committer zautrix <zautrix>2004-10-25 23:39:31 (UTC)
commite7c948b76a46c923c21f2f35c677912b462fa1f4 (patch) (unidiff)
treea9f9a0c696ea3809f2e0bfc27e643d70c4e123e3 /kmicromail
parent86ad7f5fe2a20f9dfd37d6891b57b326f8ee507b (diff)
downloadkdepimpi-e7c948b76a46c923c21f2f35c677912b462fa1f4.zip
kdepimpi-e7c948b76a46c923c21f2f35c677912b462fa1f4.tar.gz
kdepimpi-e7c948b76a46c923c21f2f35c677912b462fa1f4.tar.bz2
kopiemail fixes
Diffstat (limited to 'kmicromail') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/composemail.cpp28
-rw-r--r--kmicromail/composemailui.ui4
-rw-r--r--kmicromail/selectstoreui.ui8
3 files changed, 27 insertions, 13 deletions
diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp
index 35ad367..5f7a76f 100644
--- a/kmicromail/composemail.cpp
+++ b/kmicromail/composemail.cpp
@@ -1,44 +1,45 @@
1// CHANGED 2004-08-06 Lutz Rogowski 1// CHANGED 2004-08-06 Lutz Rogowski
2 2
3#include "composemail.h" 3#include "composemail.h"
4 4
5#include <libmailwrapper/smtpwrapper.h> 5#include <libmailwrapper/smtpwrapper.h>
6#include <libmailwrapper/storemail.h> 6#include <libmailwrapper/storemail.h>
7#include <libmailwrapper/abstractmail.h> 7#include <libmailwrapper/abstractmail.h>
8#include <libmailwrapper/mailtypes.h> 8#include <libmailwrapper/mailtypes.h>
9 9
10/* OPIE */ 10/* OPIE */
11//#include <opie2/ofiledialog.h> 11//#include <opie2/ofiledialog.h>
12//#include <opie2/odebug.h> 12//#include <opie2/odebug.h>
13#include <kfiledialog.h> 13#include <kfiledialog.h>
14//#include <qpe/resource.h> 14//#include <qpe/resource.h>
15#include <qpe/global.h> 15#include <qpe/global.h>
16//#include <qpe/contact.h> 16//#include <qpe/contact.h>
17 17
18 18
19#include <qcombobox.h> 19#include <qcombobox.h>
20#include <qcheckbox.h> 20#include <qcheckbox.h>
21#include <qiconset.h>
21#include <qtimer.h> 22#include <qtimer.h>
22#include <qmessagebox.h> 23#include <qmessagebox.h>
23#include <qpushbutton.h> 24#include <qpushbutton.h>
24#include <qmultilineedit.h> 25#include <qmultilineedit.h>
25#include <qlabel.h> 26#include <qlabel.h>
26#include <qtabwidget.h> 27#include <qtabwidget.h>
27#include <qlistview.h> 28#include <qlistview.h>
28#include <kabc/addresseedialog.h> 29#include <kabc/addresseedialog.h>
29#include <kabc/stdaddressbook.h> 30#include <kabc/stdaddressbook.h>
30#include <kabc/addressee.h> 31#include <kabc/addressee.h>
31#ifdef DESKTOP_VERSION 32#ifdef DESKTOP_VERSION
32#include <kabc/addresseedialog.h> 33#include <kabc/addresseedialog.h>
33#else //DESKTOP_VERSION 34#else //DESKTOP_VERSION
34#include <libkdepim/externalapphandler.h> 35#include <libkdepim/externalapphandler.h>
35#endif //DESKTOP_VERSION 36#endif //DESKTOP_VERSION
36 37
37#include "koprefs.h" 38#include "koprefs.h"
38 39
39//using namespace Opie::Core; 40//using namespace Opie::Core;
40//using namespace Opie::Ui; 41//using namespace Opie::Ui;
41ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal ) 42ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal )
42 : ComposeMailUI( parent, name, modal ) 43 : ComposeMailUI( parent, name, modal )
43{ 44{
44 mPickLineEdit = 0; 45 mPickLineEdit = 0;
@@ -89,62 +90,75 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m
89 90
90 attList->addColumn( i18n( "Name" ) ); 91 attList->addColumn( i18n( "Name" ) );
91 attList->addColumn( i18n( "Size" ) ); 92 attList->addColumn( i18n( "Size" ) );
92 QList<Account> accounts = settings->getAccounts(); 93 QList<Account> accounts = settings->getAccounts();
93 94
94 if ( QApplication::desktop()->width() < 320 ) 95 if ( QApplication::desktop()->width() < 320 )
95 smtpAccountBox->setMaximumWidth( 80 ); 96 smtpAccountBox->setMaximumWidth( 80 );
96 Account *it; 97 Account *it;
97 for ( it = accounts.first(); it; it = accounts.next() ) { 98 for ( it = accounts.first(); it; it = accounts.next() ) {
98 if ( it->getType()==MAILLIB::A_SMTP ) { 99 if ( it->getType()==MAILLIB::A_SMTP ) {
99 SMTPaccount *smtp = static_cast<SMTPaccount *>(it); 100 SMTPaccount *smtp = static_cast<SMTPaccount *>(it);
100 smtpAccountBox->insertItem( smtp->getAccountName() ); 101 smtpAccountBox->insertItem( smtp->getAccountName() );
101 smtpAccounts.append( smtp ); 102 smtpAccounts.append( smtp );
102 } 103 }
103 } 104 }
104 connect( toButton, SIGNAL( clicked() ), SLOT( pickAddressTo() ) ); 105 connect( toButton, SIGNAL( clicked() ), SLOT( pickAddressTo() ) );
105 connect( ccButton, SIGNAL( clicked() ), SLOT( pickAddressCC() ) ); 106 connect( ccButton, SIGNAL( clicked() ), SLOT( pickAddressCC() ) );
106 connect( bccButton, SIGNAL( clicked() ), SLOT( pickAddressBCC() ) ); 107 connect( bccButton, SIGNAL( clicked() ), SLOT( pickAddressBCC() ) );
107 connect( replyButton, SIGNAL( clicked() ), SLOT( pickAddressReply() ) ); 108 connect( replyButton, SIGNAL( clicked() ), SLOT( pickAddressReply() ) );
108 connect( addButton, SIGNAL( clicked() ), SLOT( addAttachment() ) ); 109 connect( addButton, SIGNAL( clicked() ), SLOT( addAttachment() ) );
109 connect( deleteButton, SIGNAL( clicked() ), SLOT( removeAttachment() ) ); 110 connect( deleteButton, SIGNAL( clicked() ), SLOT( removeAttachment() ) );
110 connect( SaveButton, SIGNAL( clicked() ), SLOT( saveAsDraft()) ); 111 connect( SaveButton, SIGNAL( clicked() ), SLOT( saveAsDraft()) );
111 mMail = 0; 112 mMail = 0;
112 warnAttach = true; 113 warnAttach = true;
114 QIconSet icon;
115 //icon = SmallIcon("fileexport");
116 icon = SmallIcon("filesave");
117 SaveButton->setIconSet (icon ) ;
118 if ( QApplication::desktop()->width() < 320 ) {
119 SaveButton->setText ("") ;
120 SaveButton->setMaximumSize ( SaveButton->sizeHint().height(),SaveButton->sizeHint().height()) ;
121 }
122 else
123 SaveButton->setText (i18n("Save"));
124#ifndef DESKTOP_VERSION
125 QPEApplication::setStylusOperation( message, QPEApplication::RightOnHold );
126 QPEApplication::setStylusOperation( senderNameEdit, QPEApplication::RightOnHold );
127 QPEApplication::setStylusOperation( subjectLine, QPEApplication::RightOnHold );
128#endif
129 message->setFont ( KOPrefs::instance()->mComposeFont );
130 message->setWordWrap (QMultiLineEdit::WidgetWidth);
113 if ( smtpAccounts.count() > 0 ) { 131 if ( smtpAccounts.count() > 0 ) {
114 fillValues( smtpAccountBox->currentItem() ); 132 fillValues( smtpAccountBox->currentItem() );
115 } else { 133 } else {
116 QMessageBox::information( 0, i18n( "Problem" ), 134 QMessageBox::information( 0, i18n( "Problem" ),
117 i18n( "Please create an SMTP account first.\nThe SMTP is needed for sending mail.\n" ), 135 i18n( "Please create an\nSMTP account first.\nThe SMTP is needed\nfor sending mail.\n" ),
118 i18n( "Ok" ) ); 136 i18n( "Ok" ) );
119 return; 137 return;
120 } 138 }
121 connect( smtpAccountBox, SIGNAL( activated(int) ), SLOT( fillValues(int) ) ); 139 connect( smtpAccountBox, SIGNAL( activated(int) ), SLOT( fillValues(int) ) );
122 message->setFont ( KOPrefs::instance()->mComposeFont ); 140
123 message->setWordWrap (QMultiLineEdit::WidgetWidth);
124#ifndef DESKTOP_VERSION
125 QPEApplication::setStylusOperation( message, QPEApplication::RightOnHold );
126#endif
127 141
128} 142}
129 143
130void ComposeMail::fillSettings() 144void ComposeMail::fillSettings()
131{ 145{
132 if ( QApplication::desktop()->width() < 320 ) 146 if ( QApplication::desktop()->width() < 320 )
133 fromBox->setMaximumWidth( 100 ); 147 fromBox->setMaximumWidth( 100 );
134 QStringList mailList = QStringList::split(";",KOPrefs::instance()->mEmail); 148 QStringList mailList = QStringList::split(";",KOPrefs::instance()->mEmail);
135 QStringList::ConstIterator sit = mailList.begin(); 149 QStringList::ConstIterator sit = mailList.begin();
136 int pref = 0; 150 int pref = 0;
137 for (;sit!=mailList.end();++sit) { 151 for (;sit!=mailList.end();++sit) {
138 fromBox->insertItem((*sit)); 152 fromBox->insertItem((*sit));
139 } 153 }
140 senderNameEdit->setText(KOPrefs::instance()->mName); 154 senderNameEdit->setText(KOPrefs::instance()->mName);
141} 155}
142 156
143 157
144void ComposeMail::saveAsDraft() 158void ComposeMail::saveAsDraft()
145{ 159{
146 160
147 Opie::Core::OSmartPointer<Mail> mail= new Mail(); 161 Opie::Core::OSmartPointer<Mail> mail= new Mail();
148 mail->setMail(fromBox->currentText()); 162 mail->setMail(fromBox->currentText());
149 mail->setTo( toLine->text() ); 163 mail->setTo( toLine->text() );
150 mail->setName(senderNameEdit->text()); 164 mail->setName(senderNameEdit->text());
diff --git a/kmicromail/composemailui.ui b/kmicromail/composemailui.ui
index 0a5a750..c66b0c8 100644
--- a/kmicromail/composemailui.ui
+++ b/kmicromail/composemailui.ui
@@ -1,40 +1,40 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
2<class>ComposeMailUI</class> 2<class>ComposeMailUI</class>
3<include location="local">tr.h</include> 3<include location="local">tr.h</include>
4<widget> 4<widget>
5 <class>QDialog</class> 5 <class>QDialog</class>
6 <property stdset="1"> 6 <property stdset="1">
7 <name>name</name> 7 <name>name</name>
8 <cstring>ComposeMailUI</cstring> 8 <cstring>ComposeMailUI</cstring>
9 </property> 9 </property>
10 <property stdset="1"> 10 <property stdset="1">
11 <name>geometry</name> 11 <name>geometry</name>
12 <rect> 12 <rect>
13 <x>0</x> 13 <x>0</x>
14 <y>0</y> 14 <y>0</y>
15 <width>276</width> 15 <width>276</width>
16 <height>262</height> 16 <height>263</height>
17 </rect> 17 </rect>
18 </property> 18 </property>
19 <property stdset="1"> 19 <property stdset="1">
20 <name>caption</name> 20 <name>caption</name>
21 <string>Compose Message</string> 21 <string>Compose Message</string>
22 </property> 22 </property>
23 <property> 23 <property>
24 <name>layoutMargin</name> 24 <name>layoutMargin</name>
25 </property> 25 </property>
26 <property> 26 <property>
27 <name>layoutSpacing</name> 27 <name>layoutSpacing</name>
28 </property> 28 </property>
29 <grid> 29 <grid>
30 <property stdset="1"> 30 <property stdset="1">
31 <name>margin</name> 31 <name>margin</name>
32 <number>2</number> 32 <number>2</number>
33 </property> 33 </property>
34 <property stdset="1"> 34 <property stdset="1">
35 <name>spacing</name> 35 <name>spacing</name>
36 <number>1</number> 36 <number>1</number>
37 </property> 37 </property>
38 <widget row="1" column="0" rowspan="1" colspan="4" > 38 <widget row="1" column="0" rowspan="1" colspan="4" >
39 <class>QTabWidget</class> 39 <class>QTabWidget</class>
40 <property stdset="1"> 40 <property stdset="1">
@@ -426,48 +426,48 @@
426 </property> 426 </property>
427 </widget> 427 </widget>
428 <widget row="0" column="2" > 428 <widget row="0" column="2" >
429 <class>QComboBox</class> 429 <class>QComboBox</class>
430 <property stdset="1"> 430 <property stdset="1">
431 <name>name</name> 431 <name>name</name>
432 <cstring>smtpAccountBox</cstring> 432 <cstring>smtpAccountBox</cstring>
433 </property> 433 </property>
434 <property stdset="1"> 434 <property stdset="1">
435 <name>sizePolicy</name> 435 <name>sizePolicy</name>
436 <sizepolicy> 436 <sizepolicy>
437 <hsizetype>3</hsizetype> 437 <hsizetype>3</hsizetype>
438 <vsizetype>0</vsizetype> 438 <vsizetype>0</vsizetype>
439 </sizepolicy> 439 </sizepolicy>
440 </property> 440 </property>
441 </widget> 441 </widget>
442 <widget row="0" column="3" > 442 <widget row="0" column="3" >
443 <class>QPushButton</class> 443 <class>QPushButton</class>
444 <property stdset="1"> 444 <property stdset="1">
445 <name>name</name> 445 <name>name</name>
446 <cstring>SaveButton</cstring> 446 <cstring>SaveButton</cstring>
447 </property> 447 </property>
448 <property stdset="1"> 448 <property stdset="1">
449 <name>text</name> 449 <name>text</name>
450 <string>Save</string> 450 <string> S</string>
451 </property> 451 </property>
452 </widget> 452 </widget>
453 </grid> 453 </grid>
454</widget> 454</widget>
455<tabstops> 455<tabstops>
456 <tabstop>fromBox</tabstop> 456 <tabstop>fromBox</tabstop>
457 <tabstop>toButton</tabstop> 457 <tabstop>toButton</tabstop>
458 <tabstop>toLine</tabstop> 458 <tabstop>toLine</tabstop>
459 <tabstop>subjectLine</tabstop> 459 <tabstop>subjectLine</tabstop>
460 <tabstop>message</tabstop> 460 <tabstop>message</tabstop>
461 <tabstop>tabWidget</tabstop> 461 <tabstop>tabWidget</tabstop>
462 <tabstop>ccButton</tabstop> 462 <tabstop>ccButton</tabstop>
463 <tabstop>ccLine</tabstop> 463 <tabstop>ccLine</tabstop>
464 <tabstop>bccButton</tabstop> 464 <tabstop>bccButton</tabstop>
465 <tabstop>bccLine</tabstop> 465 <tabstop>bccLine</tabstop>
466 <tabstop>replyButton</tabstop> 466 <tabstop>replyButton</tabstop>
467 <tabstop>replyLine</tabstop> 467 <tabstop>replyLine</tabstop>
468 <tabstop>sigMultiLine</tabstop> 468 <tabstop>sigMultiLine</tabstop>
469 <tabstop>attList</tabstop> 469 <tabstop>attList</tabstop>
470 <tabstop>addButton</tabstop> 470 <tabstop>addButton</tabstop>
471 <tabstop>deleteButton</tabstop> 471 <tabstop>deleteButton</tabstop>
472</tabstops> 472</tabstops>
473</UI> 473</UI>
diff --git a/kmicromail/selectstoreui.ui b/kmicromail/selectstoreui.ui
index 2da103b..89f6ebc 100644
--- a/kmicromail/selectstoreui.ui
+++ b/kmicromail/selectstoreui.ui
@@ -1,40 +1,40 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
2<class>selectstoreui</class> 2<class>selectstoreui</class>
3<include location="local">tr.h</include> 3<include location="local">tr.h</include>
4<widget> 4<widget>
5 <class>QDialog</class> 5 <class>QDialog</class>
6 <property stdset="1"> 6 <property stdset="1">
7 <name>name</name> 7 <name>name</name>
8 <cstring>selectstoreui</cstring> 8 <cstring>selectstoreui</cstring>
9 </property> 9 </property>
10 <property stdset="1"> 10 <property stdset="1">
11 <name>geometry</name> 11 <name>geometry</name>
12 <rect> 12 <rect>
13 <x>0</x> 13 <x>0</x>
14 <y>0</y> 14 <y>0</y>
15 <width>279</width> 15 <width>230</width>
16 <height>304</height> 16 <height>307</height>
17 </rect> 17 </rect>
18 </property> 18 </property>
19 <property stdset="1"> 19 <property stdset="1">
20 <name>caption</name> 20 <name>caption</name>
21 <string>Select target box</string> 21 <string>Select target box</string>
22 </property> 22 </property>
23 <property> 23 <property>
24 <name>layoutMargin</name> 24 <name>layoutMargin</name>
25 </property> 25 </property>
26 <property> 26 <property>
27 <name>layoutSpacing</name> 27 <name>layoutSpacing</name>
28 </property> 28 </property>
29 <grid> 29 <grid>
30 <property stdset="1"> 30 <property stdset="1">
31 <name>margin</name> 31 <name>margin</name>
32 <number>11</number> 32 <number>11</number>
33 </property> 33 </property>
34 <property stdset="1"> 34 <property stdset="1">
35 <name>spacing</name> 35 <name>spacing</name>
36 <number>6</number> 36 <number>6</number>
37 </property> 37 </property>
38 <widget row="0" column="0" rowspan="1" colspan="2" > 38 <widget row="0" column="0" rowspan="1" colspan="2" >
39 <class>QLabel</class> 39 <class>QLabel</class>
40 <property stdset="1"> 40 <property stdset="1">
@@ -161,49 +161,49 @@
161 <property stdset="1"> 161 <property stdset="1">
162 <name>text</name> 162 <name>text</name>
163 <string>Create new folder</string> 163 <string>Create new folder</string>
164 </property> 164 </property>
165 </widget> 165 </widget>
166 <widget row="4" column="0" rowspan="1" colspan="2" > 166 <widget row="4" column="0" rowspan="1" colspan="2" >
167 <class>QLineEdit</class> 167 <class>QLineEdit</class>
168 <property stdset="1"> 168 <property stdset="1">
169 <name>name</name> 169 <name>name</name>
170 <cstring>newFolderedit</cstring> 170 <cstring>newFolderedit</cstring>
171 </property> 171 </property>
172 <property stdset="1"> 172 <property stdset="1">
173 <name>enabled</name> 173 <name>enabled</name>
174 <bool>false</bool> 174 <bool>false</bool>
175 </property> 175 </property>
176 </widget> 176 </widget>
177 <widget row="5" column="0" rowspan="1" colspan="2" > 177 <widget row="5" column="0" rowspan="1" colspan="2" >
178 <class>QLabel</class> 178 <class>QLabel</class>
179 <property stdset="1"> 179 <property stdset="1">
180 <name>name</name> 180 <name>name</name>
181 <cstring>newFolderLabel</cstring> 181 <cstring>newFolderLabel</cstring>
182 </property> 182 </property>
183 <property stdset="1"> 183 <property stdset="1">
184 <name>text</name> 184 <name>text</name>
185 <string>Prefix will prepend, no need to enter it!</string> 185 <string>Prefix will prepend, do not enter</string>
186 </property> 186 </property>
187 <property stdset="1"> 187 <property stdset="1">
188 <name>alignment</name> 188 <name>alignment</name>
189 <set>WordBreak|AlignCenter</set> 189 <set>WordBreak|AlignCenter</set>
190 </property> 190 </property>
191 <property> 191 <property>
192 <name>hAlign</name> 192 <name>hAlign</name>
193 </property> 193 </property>
194 <property> 194 <property>
195 <name>wordwrap</name> 195 <name>wordwrap</name>
196 </property> 196 </property>
197 </widget> 197 </widget>
198 <widget row="6" column="0" rowspan="1" colspan="2" > 198 <widget row="6" column="0" rowspan="1" colspan="2" >
199 <class>Line</class> 199 <class>Line</class>
200 <property stdset="1"> 200 <property stdset="1">
201 <name>name</name> 201 <name>name</name>
202 <cstring>Line2</cstring> 202 <cstring>Line2</cstring>
203 </property> 203 </property>
204 <property stdset="1"> 204 <property stdset="1">
205 <name>orientation</name> 205 <name>orientation</name>
206 <enum>Horizontal</enum> 206 <enum>Horizontal</enum>
207 </property> 207 </property>
208 </widget> 208 </widget>
209 <spacer row="9" column="0" > 209 <spacer row="9" column="0" >
@@ -225,49 +225,49 @@
225 <width>20</width> 225 <width>20</width>
226 <height>20</height> 226 <height>20</height>
227 </size> 227 </size>
228 </property> 228 </property>
229 </spacer> 229 </spacer>
230 <widget row="8" column="0" rowspan="1" colspan="2" > 230 <widget row="8" column="0" rowspan="1" colspan="2" >
231 <class>QCheckBox</class> 231 <class>QCheckBox</class>
232 <property stdset="1"> 232 <property stdset="1">
233 <name>name</name> 233 <name>name</name>
234 <cstring>selMove</cstring> 234 <cstring>selMove</cstring>
235 </property> 235 </property>
236 <property stdset="1"> 236 <property stdset="1">
237 <name>text</name> 237 <name>text</name>
238 <string>Move mail(s)</string> 238 <string>Move mail(s)</string>
239 </property> 239 </property>
240 </widget> 240 </widget>
241 <widget row="7" column="0" > 241 <widget row="7" column="0" >
242 <class>QCheckBox</class> 242 <class>QCheckBox</class>
243 <property stdset="1"> 243 <property stdset="1">
244 <name>name</name> 244 <name>name</name>
245 <cstring>useSize</cstring> 245 <cstring>useSize</cstring>
246 </property> 246 </property>
247 <property stdset="1"> 247 <property stdset="1">
248 <name>text</name> 248 <name>text</name>
249 <string>apply only to mails smaller</string> 249 <string>only mails smaller</string>
250 </property> 250 </property>
251 </widget> 251 </widget>
252 <widget row="7" column="1" > 252 <widget row="7" column="1" >
253 <class>QSpinBox</class> 253 <class>QSpinBox</class>
254 <property stdset="1"> 254 <property stdset="1">
255 <name>name</name> 255 <name>name</name>
256 <cstring>sizeSpinBox</cstring> 256 <cstring>sizeSpinBox</cstring>
257 </property> 257 </property>
258 <property stdset="1"> 258 <property stdset="1">
259 <name>suffix</name> 259 <name>suffix</name>
260 <string> kB</string> 260 <string> kB</string>
261 </property> 261 </property>
262 <property stdset="1"> 262 <property stdset="1">
263 <name>maxValue</name> 263 <name>maxValue</name>
264 <number>8192</number> 264 <number>8192</number>
265 </property> 265 </property>
266 <property stdset="1"> 266 <property stdset="1">
267 <name>minValue</name> 267 <name>minValue</name>
268 <number>1</number> 268 <number>1</number>
269 </property> 269 </property>
270 <property stdset="1"> 270 <property stdset="1">
271 <name>lineStep</name> 271 <name>lineStep</name>
272 <number>1</number> 272 <number>1</number>
273 </property> 273 </property>