summaryrefslogtreecommitdiffabout
path: root/kmicromail
authorzautrix <zautrix>2005-08-22 20:51:25 (UTC)
committer zautrix <zautrix>2005-08-22 20:51:25 (UTC)
commitcfda06568cbd0e67ba0188f00622b348b57b27c0 (patch) (unidiff)
tree925a3d4553eae2946cb8c588abae872b78d494f2 /kmicromail
parentcb425b4c2d027d49f964368e94a52d3ba5e6aa31 (diff)
downloadkdepimpi-cfda06568cbd0e67ba0188f00622b348b57b27c0.zip
kdepimpi-cfda06568cbd0e67ba0188f00622b348b57b27c0.tar.gz
kdepimpi-cfda06568cbd0e67ba0188f00622b348b57b27c0.tar.bz2
fixxx
Diffstat (limited to 'kmicromail') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/composemail.cpp5
-rw-r--r--kmicromail/mailistviewitem.cpp3
-rw-r--r--kmicromail/mailistviewitem.h4
-rw-r--r--kmicromail/mainwindow.cpp16
-rw-r--r--kmicromail/mainwindow.h4
5 files changed, 19 insertions, 13 deletions
diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp
index 7b609fc..4bc4441 100644
--- a/kmicromail/composemail.cpp
+++ b/kmicromail/composemail.cpp
@@ -40,32 +40,33 @@
40#include <qcheckbox.h> 40#include <qcheckbox.h>
41#include <qiconset.h> 41#include <qiconset.h>
42#include <qtimer.h> 42#include <qtimer.h>
43#include <qmessagebox.h> 43#include <qmessagebox.h>
44#include <qpushbutton.h> 44#include <qpushbutton.h>
45#include <qmultilineedit.h> 45#include <qmultilineedit.h>
46#include <qlabel.h> 46#include <qlabel.h>
47#include <qtabwidget.h> 47#include <qtabwidget.h>
48#include <qlistview.h> 48#include <qlistview.h>
49 49
50//using namespace Opie::Core; 50//using namespace Opie::Core;
51//using namespace Opie::Ui; 51//using namespace Opie::Ui;
52ComposeMail::ComposeMail( Settings *sett, QWidget *parent, const char *name, bool modal ) 52ComposeMail::ComposeMail( Settings *sett, QWidget *parent, const char *name, bool modal )
53 : ComposeMailUI( parent, name, modal ) 53 : ComposeMailUI( parent, name, modal )
54{ 54{
55 55
56 topLevelWidget()->setCaption( i18n("Compose mail - Click OK to send ->") );
56 mPickLineEdit = 0; 57 mPickLineEdit = 0;
57 mEncoding = KOPrefs::instance()->mCurrentCodeName; 58 mEncoding = KOPrefs::instance()->mCurrentCodeName;
58 //managed from opiemail now 59 //managed from opiemail now
59 //connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)), 60 //connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)),
60 // this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&))); 61 // this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&)));
61 settings = sett; 62 settings = sett;
62 m_replyid = ""; 63 m_replyid = "";
63 if ( KOPrefs::instance()->mUseKapi) { 64 if ( KOPrefs::instance()->mUseKapi) {
64 KConfig config( locateLocal("config", "kabcrc") ); 65 KConfig config( locateLocal("config", "kabcrc") );
65 config.setGroup( "General" ); 66 config.setGroup( "General" );
66 QString whoami_uid = config.readEntry( "WhoAmI" ); 67 QString whoami_uid = config.readEntry( "WhoAmI" );
67 68
68 if ( whoami_uid.isEmpty() ) { 69 if ( whoami_uid.isEmpty() ) {
69 QMessageBox::information( 0, i18n( "Hint" ), 70 QMessageBox::information( 0, i18n( "Hint" ),
70 i18n( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ), 71 i18n( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ),
71 i18n( "Ok" ) ); 72 i18n( "Ok" ) );
@@ -210,33 +211,33 @@ void ComposeMail::saveAsDraft()
210 /* only use the default drafts folder name! */ 211 /* only use the default drafts folder name! */
211 Storemail wrapper(AbstractMail::draftFolder()); 212 Storemail wrapper(AbstractMail::draftFolder());
212 wrapper.storeMail(mail); 213 wrapper.storeMail(mail);
213 214
214 AttachViewItem *it = (AttachViewItem *) attList->firstChild(); 215 AttachViewItem *it = (AttachViewItem *) attList->firstChild();
215 /* attachments we will ignore! */ 216 /* attachments we will ignore! */
216 if ( it != 0 ) { 217 if ( it != 0 ) {
217 if ( warnAttach ) 218 if ( warnAttach )
218 QMessageBox::warning(0,i18n("Store message"), 219 QMessageBox::warning(0,i18n("Store message"),
219 i18n("<center>Attachments will not be stored in \"Draft\" folder</center>")); 220 i18n("<center>Attachments will not be stored in \"Draft\" folder</center>"));
220 warnAttach = false; 221 warnAttach = false;
221 } 222 }
222 setStatus( i18n("Mail saved as draft!") ); 223 setStatus( i18n("Mail saved as draft!") );
223} 224}
224void ComposeMail::clearStatus() 225void ComposeMail::clearStatus()
225{ 226{
226 topLevelWidget()->setCaption( i18n("Compose mail") ); 227 topLevelWidget()->setCaption( i18n("Compose mail - Click OK to send ->") );
227} 228}
228void ComposeMail::setStatus( QString status ) 229void ComposeMail::setStatus( QString status )
229{ 230{
230 topLevelWidget()->setCaption( status ); 231 topLevelWidget()->setCaption( status );
231 QTimer::singleShot ( 10000, this, SLOT( clearStatus() ) ) ; 232 QTimer::singleShot ( 10000, this, SLOT( clearStatus() ) ) ;
232} 233}
233void ComposeMail::pickAddress( ) 234void ComposeMail::pickAddress( )
234{ 235{
235 236
236 QLineEdit *line = mPickLineEdit; 237 QLineEdit *line = mPickLineEdit;
237 if ( line == 0 ) 238 if ( line == 0 )
238 return; 239 return;
239#ifdef DESKTOP_VERSION 240#ifdef DESKTOP_VERSION
240 //qDebug(" ComposeMail::pickAddress "); 241 //qDebug(" ComposeMail::pickAddress ");
241 QString names ;//= AddressPicker::getNames(); 242 QString names ;//= AddressPicker::getNames();
242 243
@@ -411,33 +412,33 @@ void ComposeMail::removeAttachment()
411 i18n( "<p>Please select a File.</p>" ), 412 i18n( "<p>Please select a File.</p>" ),
412 i18n( "Ok" ) ); 413 i18n( "Ok" ) );
413 } else { 414 } else {
414 attList->takeItem( attList->currentItem() ); 415 attList->takeItem( attList->currentItem() );
415 } 416 }
416} 417}
417 418
418void ComposeMail::accept() 419void ComposeMail::accept()
419{ 420{
420 if ( smtpAccountBox->count() == 0 ) { 421 if ( smtpAccountBox->count() == 0 ) {
421 422
422 reject(); 423 reject();
423 return; 424 return;
424 } 425 }
425 426
426 if (! checkBoxLater->isChecked() ) { 427 if (! checkBoxLater->isChecked() ) {
427 int yesno = QMessageBox::warning(0,i18n("Stop editing message"), 428 int yesno = QMessageBox::warning(0, subjectLine->text().left ( 25 ),
428 i18n("Send this message?"), 429 i18n("Send this message?"),
429 i18n("Yes"), 430 i18n("Yes"),
430 i18n("Cancel")); 431 i18n("Cancel"));
431 432
432 if (yesno == 1) { 433 if (yesno == 1) {
433 return; 434 return;
434 } 435 }
435 } 436 }
436#if 0 437#if 0
437 odebug << "Sending Mail with " 438 odebug << "Sending Mail with "
438 << smtpAccounts.at( smtpAccountBox->currentItem() )->getAccountName() << oendl; 439 << smtpAccounts.at( smtpAccountBox->currentItem() )->getAccountName() << oendl;
439#endif 440#endif
440 Opie::Core::OSmartPointer<Mail> mail=new Mail; 441 Opie::Core::OSmartPointer<Mail> mail=new Mail;
441 442
442 SMTPaccount *smtp = smtpAccounts.at( smtpAccountBox->currentItem() ); 443 SMTPaccount *smtp = smtpAccounts.at( smtpAccountBox->currentItem() );
443 mail->setMail(fromBox->currentText()); 444 mail->setMail(fromBox->currentText());
diff --git a/kmicromail/mailistviewitem.cpp b/kmicromail/mailistviewitem.cpp
index 5119744..15fa148 100644
--- a/kmicromail/mailistviewitem.cpp
+++ b/kmicromail/mailistviewitem.cpp
@@ -1,26 +1,26 @@
1// CHANGED 2004-08-06 Lutz Rogowski 1// CHANGED 2004-08-06 Lutz Rogowski
2#include "mailistviewitem.h" 2#include "mailistviewitem.h"
3#include <libmailwrapper/abstractmail.h> 3#include <libmailwrapper/abstractmail.h>
4#include <qtextstream.h> 4#include <qtextstream.h>
5#include <kiconloader.h> 5#include <kiconloader.h>
6#include "koprefs.h" 6#include "koprefs.h"
7//#include <qpe/resource.h> 7//#include <qpe/resource.h>
8 8
9MailListViewItem::MailListViewItem(QListView * parent, MailListViewItem * item ) 9MailListViewItem::MailListViewItem(QListView * parent, MailListViewItem * item )
10 :QListViewItem(parent,item),mail_data() 10 :KListViewItem(parent,item),mail_data()
11{ 11{
12} 12}
13 13
14void MailListViewItem::showEntry() 14void MailListViewItem::showEntry()
15{ 15{
16 if ( mail_data->getFlags().testBit( FLAG_ANSWERED ) == true) { 16 if ( mail_data->getFlags().testBit( FLAG_ANSWERED ) == true) {
17 setPixmap( 0, SmallIcon ( "kmmsgreplied") ); 17 setPixmap( 0, SmallIcon ( "kmmsgreplied") );
18 mKeyMap.insert(0, "r" ); 18 mKeyMap.insert(0, "r" );
19 } else if ( mail_data->getFlags().testBit( FLAG_SEEN ) == true ) { 19 } else if ( mail_data->getFlags().testBit( FLAG_SEEN ) == true ) {
20 /* I think it looks nicer if there are not such a log of icons but only on mails 20 /* I think it looks nicer if there are not such a log of icons but only on mails
21 replied or new - Alwin*/ 21 replied or new - Alwin*/
22 //setPixmap( 0,SmallIcon ("kmmsgunseen") ); 22 //setPixmap( 0,SmallIcon ("kmmsgunseen") );
23 mKeyMap.insert(0, "s" ); 23 mKeyMap.insert(0, "s" );
24 } else { 24 } else {
25 setPixmap( 0,SmallIcon ( "kmmsgnew") ); 25 setPixmap( 0,SmallIcon ( "kmmsgnew") );
26 mKeyMap.insert(0, "u" ); 26 mKeyMap.insert(0, "u" );
@@ -30,32 +30,33 @@ void MailListViewItem::showEntry()
30 // 11.23 30 // 11.23
31 // 111.23 31 // 111.23
32 // 999.23 maxlen 32 // 999.23 maxlen
33 QString fsort; 33 QString fsort;
34 switch(fsize.length() ) { 34 switch(fsize.length() ) {
35 case 6: 35 case 6:
36 fsort = "00" + fsize ; 36 fsort = "00" + fsize ;
37 break; 37 break;
38 case 7: 38 case 7:
39 fsort = "0" + fsize ; 39 fsort = "0" + fsize ;
40 break; 40 break;
41 default: 41 default:
42 fsort = fsize ; 42 fsort = fsize ;
43 break; 43 break;
44 44
45 } 45 }
46
46 setText(3, fsize ); 47 setText(3, fsize );
47 //qDebug("fsize *%s* ",fsize.latin1() ); 48 //qDebug("fsize *%s* ",fsize.latin1() );
48 //qDebug("fsort *%s* ",fsort.latin1() ); 49 //qDebug("fsort *%s* ",fsort.latin1() );
49 if ( fsize.right(2) == "kB" ) { 50 if ( fsize.right(2) == "kB" ) {
50 mKeyMap.insert(3, "k" + fsort); 51 mKeyMap.insert(3, "k" + fsort);
51 } else { 52 } else {
52 mKeyMap.insert(3, "M" +fsort ); 53 mKeyMap.insert(3, "M" +fsort );
53 } 54 }
54 setText(1,mail_data->getSubject()); 55 setText(1,mail_data->getSubject());
55 setText(2,mail_data->getFrom()); 56 setText(2,mail_data->getFrom());
56 mKeyMap.insert(4,mail_data->getIsoDate()); 57 mKeyMap.insert(4,mail_data->getIsoDate());
57 setText(4,mail_data->getDate()); 58 setText(4,mail_data->getDate());
58 if ( KOPrefs::instance()->mShowToField ) 59 if ( KOPrefs::instance()->mShowToField )
59 setText(5,mail_data->To()[0]); 60 setText(5,mail_data->To()[0]);
60} 61}
61 62
diff --git a/kmicromail/mailistviewitem.h b/kmicromail/mailistviewitem.h
index 0fd44d3..b409c9d 100644
--- a/kmicromail/mailistviewitem.h
+++ b/kmicromail/mailistviewitem.h
@@ -1,25 +1,25 @@
1// CHANGED 2004-08-06 Lutz Rogowski 1// CHANGED 2004-08-06 Lutz Rogowski
2#ifndef __MAILLISTVIEWITEM_H 2#ifndef __MAILLISTVIEWITEM_H
3#define __MAILLISTVIEWITEM_H 3#define __MAILLISTVIEWITEM_H
4 4
5#include <qlistview.h> 5#include <klistview.h>
6#include <libmailwrapper/mailtypes.h> 6#include <libmailwrapper/mailtypes.h>
7#include <libmailwrapper/maildefines.h> 7#include <libmailwrapper/maildefines.h>
8 8
9class MailListViewItem:public QListViewItem 9class MailListViewItem:public KListViewItem
10{ 10{
11public: 11public:
12 MailListViewItem(QListView * parent, MailListViewItem * after ); 12 MailListViewItem(QListView * parent, MailListViewItem * after );
13 virtual ~MailListViewItem(){} 13 virtual ~MailListViewItem(){}
14 14
15 void storeData(const RecMailP&data); 15 void storeData(const RecMailP&data);
16 const RecMailP&data()const; 16 const RecMailP&data()const;
17 void showEntry(); 17 void showEntry();
18 MAILLIB::ATYPE wrapperType(); 18 MAILLIB::ATYPE wrapperType();
19 QString key(int column, bool) const; 19 QString key(int column, bool) const;
20 void setSortKey(int column,const QString &key); 20 void setSortKey(int column,const QString &key);
21protected: 21protected:
22 RecMailP mail_data; 22 RecMailP mail_data;
23 private: 23 private:
24 QMap<int,QString> mKeyMap; 24 QMap<int,QString> mKeyMap;
25}; 25};
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index e3c5ec3..82a915e 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -10,32 +10,33 @@
10#include <kapplication.h> 10#include <kapplication.h>
11 11
12#ifdef DESKTOP_VERSION 12#ifdef DESKTOP_VERSION
13#include <qapplication.h> 13#include <qapplication.h>
14#include <qstatusbar.h> 14#include <qstatusbar.h>
15#include <kabc/stdaddressbook.h> 15#include <kabc/stdaddressbook.h>
16extern QStatusBar* globalSstatusBarMainWindow; 16extern QStatusBar* globalSstatusBarMainWindow;
17#else 17#else
18#include <qpe/qpeapplication.h> 18#include <qpe/qpeapplication.h>
19#include <klocale.h> 19#include <klocale.h>
20#endif 20#endif
21#include "defines.h" 21#include "defines.h"
22#include "koprefs.h" 22#include "koprefs.h"
23#include "mainwindow.h" 23#include "mainwindow.h"
24#include "mailistviewitem.h" 24#include "mailistviewitem.h"
25#include <KDGanttMinimizeSplitter.h> 25#include <KDGanttMinimizeSplitter.h>
26#include <libkdepim/kpimglobalprefs.h>
26 27
27#include "koprefs.h" 28#include "koprefs.h"
28 29
29MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) 30MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
30 : QMainWindow( parent, name ) //, flags ) 31 : QMainWindow( parent, name ) //, flags )
31{ 32{
32#ifdef DESKTOP_VERSION 33#ifdef DESKTOP_VERSION
33 globalSstatusBarMainWindow = statusBar(); 34 globalSstatusBarMainWindow = statusBar();
34#endif 35#endif
35 setCaption( i18n( "KOpieMail/Pi" ) ); 36 setCaption( i18n( "KOpieMail/Pi" ) );
36 setToolBarsMovable( false ); 37 setToolBarsMovable( false );
37 //KABC::StdAddressBook::self(); 38 //KABC::StdAddressBook::self();
38 toolBar = new QToolBar( this ); 39 toolBar = new QToolBar( this );
39 menuBar = new QPEMenuBar( toolBar ); 40 menuBar = new QPEMenuBar( toolBar );
40 mailMenu = new QPopupMenu( menuBar ); 41 mailMenu = new QPopupMenu( menuBar );
41 menuBar->insertItem( i18n( "Mail" ), mailMenu ); 42 menuBar->insertItem( i18n( "Mail" ), mailMenu );
@@ -152,87 +153,89 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
152 griLay->addWidget( toLE = new QLineEdit( infoBox ),2,1) ; 153 griLay->addWidget( toLE = new QLineEdit( infoBox ),2,1) ;
153 } 154 }
154 infoBox->setMaximumHeight( infoBox->sizeHint().height() ); 155 infoBox->setMaximumHeight( infoBox->sizeHint().height() );
155 if ( !KOPrefs::instance()->mShowInfoStart ) { 156 if ( !KOPrefs::instance()->mShowInfoStart ) {
156 QTimer::singleShot( 1,splithor, SLOT ( toggle() ) ); 157 QTimer::singleShot( 1,splithor, SLOT ( toggle() ) );
157 } 158 }
158 } 159 }
159 160
160 161
161 folderView = new AccountView( split ); 162 folderView = new AccountView( split );
162 folderView->header()->hide(); 163 folderView->header()->hide();
163 folderView->setRootIsDecorated( false ); 164 folderView->setRootIsDecorated( false );
164 folderView->addColumn( i18n( "Mailbox" ) ); 165 folderView->addColumn( i18n( "Mailbox" ) );
165 166
166 //layout->addWidget( folderView ); 167 //layout->addWidget( folderView );
167 168
168 mailView = new QListView( split ); 169 mailView = new KListView( split );
169 mailView->addColumn( i18n( " " ) ); 170 mailView->addColumn( i18n( " " ) );
170 mailView->addColumn( i18n( "Subject" ),QListView::Manual ); 171 mailView->addColumn( i18n( "Subject" ),QListView::Manual );
171 mailView->addColumn( i18n( "Sender" ),QListView::Manual ); 172 mailView->addColumn( i18n( "Sender" ),QListView::Manual );
172 mailView->addColumn( i18n( "Size" ),QListView::Manual); 173 mailView->addColumn( i18n( "Size" ),QListView::Manual);
173 mailView->addColumn( i18n( "Date" ),QListView::Manual); 174 mailView->addColumn( i18n( "Date" ),QListView::Manual);
174 if ( KOPrefs::instance()->mShowToField ) 175 if ( KOPrefs::instance()->mShowToField )
175 mailView->addColumn( i18n( "To" ),QListView::Manual); 176 mailView->addColumn( i18n( "To" ),QListView::Manual);
176 mailView->setAllColumnsShowFocus(true); 177 mailView->setAllColumnsShowFocus(true);
177 //mailView->setSorting(-1); 178 //mailView->setSorting(-1);
178 mailView->setRootIsDecorated( false ); 179 mailView->setRootIsDecorated( false );
179 statusWidget = new StatusWidget( wrapperBox ); 180 statusWidget = new StatusWidget( wrapperBox );
180 statusWidget->hide(); 181 statusWidget->hide();
181 182 mailView->setSelectionMode( QListView::Multi );
183 mailView->setMultiSelection( true);
184 mailView->setAlternateBackground(KPimGlobalPrefs::instance()->mAlternateColor );
182 //layout->addWidget( mailView ); 185 //layout->addWidget( mailView );
183 //layout->setStretchFactor( folderView, 1 ); 186 //layout->setStretchFactor( folderView, 1 );
184 //layout->setStretchFactor( mailView, 2 ); 187 //layout->setStretchFactor( mailView, 2 );
185 188
186 slotAdjustLayout(); 189 slotAdjustLayout();
187#ifndef DESKTOP_VERSION 190#ifndef DESKTOP_VERSION
188 QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold); 191 QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold);
189 QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold); 192 QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold);
190 if ( subLE ) 193 if ( subLE )
191 QPEApplication::setStylusOperation( subLE ,QPEApplication::RightOnHold); 194 QPEApplication::setStylusOperation( subLE ,QPEApplication::RightOnHold);
192 if ( fromLE ) 195 if ( fromLE )
193 QPEApplication::setStylusOperation( fromLE ,QPEApplication::RightOnHold); 196 QPEApplication::setStylusOperation( fromLE ,QPEApplication::RightOnHold);
194 if ( toLE ) 197 if ( toLE )
195 QPEApplication::setStylusOperation( toLE ,QPEApplication::RightOnHold); 198 QPEApplication::setStylusOperation( toLE ,QPEApplication::RightOnHold);
196#endif 199#endif
197 connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this, 200 connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this,
198 SLOT( mailLeftClicked(QListViewItem*) ) ); 201 SLOT( mailLeftClicked(QListViewItem*) ) );
199 connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this, 202 connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this,
200 SLOT( mailLeftClicked(QListViewItem*) ) ); 203 SLOT( mailLeftClicked(QListViewItem*) ) );
201 connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, 204 connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this,
202 SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) ); 205 SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) );
203 connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)), 206 connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)),
204 this,SLOT(refreshMailView(const QValueList<RecMailP>&))); 207 this,SLOT(refreshMailView(const QValueList<RecMailP>&)));
205 208
206 connect( mailView, SIGNAL( currentChanged (QListViewItem* )),this, 209 connect( mailView, SIGNAL( currentChanged (QListViewItem* )),this,
207 SLOT( setInfoFields(QListViewItem*) ) ); 210 SLOT( setInfoFields(QListViewItem*) ) );
208 211
209 connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); 212 connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) );
210 connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) ); 213 connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) );
211// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) ); 214// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) );
212 connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) ); 215 connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) );
213 //mailView->setMultiSelection ( true ); 216 //mailView->setMultiSelection ( true );
214 mailView->setSelectionMode( QListView::Extended ); 217 //mailView->setSelectionMode( QListView::Extended );
215 QValueList<int> list; 218 QValueList<int> list;
216 int fw = 100; 219 int fw = 100;
217 if ( QApplication::desktop()->width() > 320 ) 220 if ( QApplication::desktop()->width() > 320 )
218 fw = 50; 221 fw = 50;
219 list.append( fw ); 222 list.append( fw );
220 list.append( 100 ); 223 list.append( 100 );
221 split->setSizes( list ); 224 split->setSizes( list );
222 QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) ); 225 QTimer::singleShot( 100, this, SLOT( slotAdjustColumns() ) );
223 mailView->setShowSortIndicator ( true ); 226 mailView->setShowSortIndicator ( true );
224 QLabel *spacer = new QLabel( toolBar ); 227 QLabel *spacer = new QLabel( toolBar );
225 spacer->setBackgroundMode( QWidget::PaletteButton ); 228 spacer->setBackgroundMode( QWidget::PaletteButton );
226 toolBar->setStretchableWidget( spacer ); 229 toolBar->setStretchableWidget( spacer );
227 230
228 QAction* closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this); 231 QAction* closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this);
229 connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); 232 connect( closeMail, SIGNAL( activated() ), SLOT( close() ) );
230 if ( QApplication::desktop()->width() > 320 ) 233 if ( QApplication::desktop()->width() > 320 )
231 closeMail->addTo(toolBar); 234 closeMail->addTo(toolBar);
232 closeMail->addTo(mailMenu); 235 closeMail->addTo(mailMenu);
233 236
234 237
235 QPopupMenu* helpMenu = new QPopupMenu( menuBar ); 238 QPopupMenu* helpMenu = new QPopupMenu( menuBar );
236 menuBar->insertItem( i18n( "Help" ), helpMenu ); 239 menuBar->insertItem( i18n( "Help" ), helpMenu );
237 QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this); 240 QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this);
238 connect( li, SIGNAL( activated() ), SLOT( showAbout()) ); 241 connect( li, SIGNAL( activated() ), SLOT( showAbout()) );
@@ -357,36 +360,37 @@ void MainWindow::slotAdjustLayout() {
357 } else { 360 } else {
358 layout->setDirection( QBoxLayout::LeftToRight ); 361 layout->setDirection( QBoxLayout::LeftToRight );
359 } 362 }
360 */ 363 */
361} 364}
362 365
363void MainWindow::slotAdjustColumns() 366void MainWindow::slotAdjustColumns()
364{ 367{
365 bool hidden = folderView->isHidden(); 368 bool hidden = folderView->isHidden();
366 if ( hidden ) folderView->show(); 369 if ( hidden ) folderView->show();
367 folderView->setColumnWidth( 0, folderView->visibleWidth() ); 370 folderView->setColumnWidth( 0, folderView->visibleWidth() );
368 if ( hidden ) folderView->hide(); 371 if ( hidden ) folderView->hide();
369 372
370 mailView->setColumnWidth( 0, 10 ); 373 mailView->setColumnWidth( 0, 10 );
371 mailView->setColumnWidth( 1, 100 ); 374 mailView->setColumnWidth( 1, 100 );
372 mailView->setColumnWidth( 2, 100 ); 375 mailView->setColumnWidth( 2, 100 );
373 mailView->setColumnWidth( 3, 50 ); 376 mailView->setColumnWidth( 3, 70 );
374 mailView->setColumnWidth( 4, 120 ); 377 mailView->setColumnWidth( 4, 170 );
375 if ( KOPrefs::instance()->mShowToField ) 378 if ( KOPrefs::instance()->mShowToField )
376 mailView->setColumnWidth( 5, 100 ); 379 mailView->setColumnWidth( 5, 100 );
380 mailView->setColumnAlignment( 3, AlignRight);
377} 381}
378 382
379void MainWindow::slotEditSettings() 383void MainWindow::slotEditSettings()
380{ 384{
381} 385}
382void MainWindow::slotEditGlobalSettings() 386void MainWindow::slotEditGlobalSettings()
383{ 387{
384} 388}
385 389
386void MainWindow::slotShowFolders( bool ) 390void MainWindow::slotShowFolders( bool )
387{ 391{
388 qDebug("not implemented: "); 392 qDebug("not implemented: ");
389} 393}
390 394
391void MainWindow::refreshMailView(const QValueList<RecMailP>&) 395void MainWindow::refreshMailView(const QValueList<RecMailP>&)
392{ 396{
diff --git a/kmicromail/mainwindow.h b/kmicromail/mainwindow.h
index 6894039..178d2bb 100644
--- a/kmicromail/mainwindow.h
+++ b/kmicromail/mainwindow.h
@@ -1,23 +1,23 @@
1 1
2// CHANGED 2004-08-06 Lutz Rogowski 2// CHANGED 2004-08-06 Lutz Rogowski
3#ifndef MAINWINDOW_H 3#ifndef MAINWINDOW_H
4#define MAINWINDOW_H 4#define MAINWINDOW_H
5 5
6#include <qmainwindow.h> 6#include <qmainwindow.h>
7#include <qlistview.h> 7#include <klistview.h>
8#include <qaction.h> 8#include <qaction.h>
9#include <qlineedit.h> 9#include <qlineedit.h>
10 10
11#include <qtoolbar.h> 11#include <qtoolbar.h>
12#ifdef DESKTOP_VERSION 12#ifdef DESKTOP_VERSION
13#include <qmenubar.h> 13#include <qmenubar.h>
14#define QPEMenuBar QMenuBar 14#define QPEMenuBar QMenuBar
15#else 15#else
16#include <qpe/qpemenubar.h> 16#include <qpe/qpemenubar.h>
17#endif 17#endif
18 18
19#include "accountview.h" 19#include "accountview.h"
20#include "statuswidget.h" 20#include "statuswidget.h"
21 21
22#include <libmailwrapper/mailtypes.h> 22#include <libmailwrapper/mailtypes.h>
23#include <opie2/osmartpointer.h> 23#include <opie2/osmartpointer.h>
@@ -53,22 +53,22 @@ protected slots:
53 virtual void slotAdjustLayout(); 53 virtual void slotAdjustLayout();
54 virtual void slotEditSettings(); 54 virtual void slotEditSettings();
55 virtual void slotEditGlobalSettings(); 55 virtual void slotEditGlobalSettings();
56 virtual void mailLeftClicked( QListViewItem * ); 56 virtual void mailLeftClicked( QListViewItem * );
57 void showLicence(); 57 void showLicence();
58 void showAbout(); 58 void showAbout();
59 void showEtpanLicence(); 59 void showEtpanLicence();
60 60
61protected: 61protected:
62 QToolBar *toolBar; 62 QToolBar *toolBar;
63 StatusWidget *statusWidget; 63 StatusWidget *statusWidget;
64 QPEMenuBar *menuBar; 64 QPEMenuBar *menuBar;
65 QPopupMenu *mailMenu, *settingsMenu, *codecMenu; 65 QPopupMenu *mailMenu, *settingsMenu, *codecMenu;
66 QAction *composeMail, *sendQueued, *showFolders, *searchMails, *deleteMails, 66 QAction *composeMail, *sendQueued, *showFolders, *searchMails, *deleteMails,
67 *editSettings, *editAccounts, *syncFolders; 67 *editSettings, *editAccounts, *syncFolders;
68 AccountView *folderView; 68 AccountView *folderView;
69 QListView *mailView; 69 KListView *mailView;
70 QLineEdit* toLE,*fromLE,*subLE; 70 QLineEdit* toLE,*fromLE,*subLE;
71 //QBoxLayout *layout; 71 //QBoxLayout *layout;
72}; 72};
73 73
74#endif 74#endif