summaryrefslogtreecommitdiffabout
path: root/kmicromail
Unidiff
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
@@ -50,12 +50,13 @@
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;
@@ -220,13 +221,13 @@ void ComposeMail::saveAsDraft()
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}
@@ -421,13 +422,13 @@ void ComposeMail::accept()
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;
diff --git a/kmicromail/mailistviewitem.cpp b/kmicromail/mailistviewitem.cpp
index 5119744..15fa148 100644
--- a/kmicromail/mailistviewitem.cpp
+++ b/kmicromail/mailistviewitem.cpp
@@ -4,13 +4,13 @@
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) {
@@ -40,12 +40,13 @@ void MailListViewItem::showEntry()
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 {
diff --git a/kmicromail/mailistviewitem.h b/kmicromail/mailistviewitem.h
index 0fd44d3..b409c9d 100644
--- a/kmicromail/mailistviewitem.h
+++ b/kmicromail/mailistviewitem.h
@@ -1,15 +1,15 @@
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);
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index e3c5ec3..82a915e 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -20,12 +20,13 @@ extern QStatusBar* globalSstatusBarMainWindow;
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{
@@ -162,26 +163,28 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
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
@@ -208,21 +211,21 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
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);
@@ -367,16 +370,17 @@ void MainWindow::slotAdjustColumns()
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()
diff --git a/kmicromail/mainwindow.h b/kmicromail/mainwindow.h
index 6894039..178d2bb 100644
--- a/kmicromail/mainwindow.h
+++ b/kmicromail/mainwindow.h
@@ -1,13 +1,13 @@
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>
@@ -63,12 +63,12 @@ protected:
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