author | zautrix <zautrix> | 2005-01-28 03:22:17 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-28 03:22:17 (UTC) |
commit | 94f0e8140c07696174dc3774dc2c11efad2ffa68 (patch) (side-by-side diff) | |
tree | d95cc80e5c5221e8d9ce1cbf4b01cbf78fdf843a /kmicromail | |
parent | 6fb044008531ec883fc25a3ef2b43904930cfff6 (diff) | |
download | kdepimpi-94f0e8140c07696174dc3774dc2c11efad2ffa68.zip kdepimpi-94f0e8140c07696174dc3774dc2c11efad2ffa68.tar.gz kdepimpi-94f0e8140c07696174dc3774dc2c11efad2ffa68.tar.bz2 |
missing config
-rw-r--r-- | kmicromail/koprefs.cpp | 5 | ||||
-rw-r--r-- | kmicromail/koprefs.h | 1 | ||||
-rw-r--r-- | kmicromail/koprefsdialog.cpp | 19 | ||||
-rw-r--r-- | kmicromail/mainwindow.cpp | 44 | ||||
-rw-r--r-- | kmicromail/opiemail.cpp | 3 |
5 files changed, 58 insertions, 14 deletions
diff --git a/kmicromail/koprefs.cpp b/kmicromail/koprefs.cpp index 2bae5f6..7b1e169 100644 --- a/kmicromail/koprefs.cpp +++ b/kmicromail/koprefs.cpp @@ -56,25 +56,28 @@ KOPrefs::KOPrefs() : mComposeFont = QFont("helvetica",12); mReadFont = QFont("helvetica",12); KPrefs::setCurrentGroup("General"); addItemString("SendCodec",&mSendCodec,i18n ("userdefined") ); addItemString("SenderName",&mName,i18n ("Please set at") ); addItemString("SenderEmail",&mEmail,i18n ("Settings@General TAB") ); addItemBool("ViewMailAsHtml",&mViewAsHtml,false); addItemBool("SendMailLater",&mSendLater,true); addItemBool("ShowToField",&mShowToField,false); addItemBool("UseKapi",&mUseKapi,false); addItemInt("CurrentCodec",&mCurrentCodec,0); - + addItemBool("ShowInfoSub",&mShowInfoSub,true); + addItemBool("ShowInfoFrom",&mShowInfoFrom,true); + addItemBool("ShowInfoTo",&mShowInfoTo,true); + addItemBool("ShowInfoStart",&mShowInfoStart,true); KPrefs::setCurrentGroup("Fonts"); addItemFont("Application Font",&mAppFont); addItemFont("Compose Font",&mComposeFont); addItemFont("Read Font",&mReadFont); fillMailDefaults(); isDirty = false; } KOPrefs::~KOPrefs() { if ( isDirty ) diff --git a/kmicromail/koprefs.h b/kmicromail/koprefs.h index f2c4fbb..f2501e3 100644 --- a/kmicromail/koprefs.h +++ b/kmicromail/koprefs.h @@ -64,17 +64,18 @@ class KOPrefs : public KPimPrefs public: // preferences data KConfig* getConfig(); QFont mAppFont; QFont mComposeFont; QFont mReadFont; QString mName; QString mSendCodec; QString mEmail; QString mCurrentCodeName; int mCurrentCodec; bool mSendLater, mViewAsHtml, mUseKapi, isDirty, mShowToField; + bool mShowInfoSub, mShowInfoFrom, mShowInfoTo, mShowInfoStart; private: }; #endif diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp index 5c8a5a9..4af4a8c 100644 --- a/kmicromail/koprefsdialog.cpp +++ b/kmicromail/koprefsdialog.cpp @@ -141,24 +141,43 @@ void KOPrefsDialog::setupMailTab() KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"), &(KOPrefs::instance()->mViewAsHtml),topFrame); topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1); ttt = addWidBool(i18n("Send mails later"), &(KOPrefs::instance()->mSendLater),topFrame); topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1); ttt = addWidBool(i18n("Show \"To\" field in list view"), &(KOPrefs::instance()->mShowToField),topFrame); topLayout->addMultiCellWidget(ttt->checkBox(),2,2,0,1); + + int iii =3; + ttt = addWidBool(i18n("Show info fields at startup"), + &(KOPrefs::instance()->mShowInfoStart),topFrame); + topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); + ++iii; + ttt = addWidBool(i18n("Show \"Subject\" info field"), + &(KOPrefs::instance()->mShowInfoSub),topFrame); + topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); + ++iii; + ttt = addWidBool(i18n("Show \"From\" info field"), + &(KOPrefs::instance()->mShowInfoFrom),topFrame); + topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); + ++iii; + ttt = addWidBool(i18n("Show \"To\" info field"), + &(KOPrefs::instance()->mShowInfoTo),topFrame); + topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); + ++iii; + /* mCodecEdit = new QLineEdit(topFrame); topLayout->addMultiCellWidget( new QLabel(mCodecEdit, i18n("User defined codec for new mails:"), topFrame),2,2,0,1); topLayout->addMultiCellWidget(mCodecEdit,3,3,0,1); topLayout->addMultiCellWidget( new QLabel(0, i18n("Example: iso-8859-15"), topFrame),4,4,0,1); */ } void KOPrefsDialog::setupFontsTab() { QFrame *topFrame = addPage(i18n("Fonts"),0,0); // DesktopIcon("fonts",KIcon::SizeMedium)); diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp index 250d114..0794e00 100644 --- a/kmicromail/mainwindow.cpp +++ b/kmicromail/mainwindow.cpp @@ -10,24 +10,25 @@ #include <kapplication.h> #ifdef DESKTOP_VERSION #include <qapplication.h> #include <qstatusbar.h> #include <kabc/stdaddressbook.h> extern QStatusBar* globalSstatusBarMainWindow; #else #include <qpe/qpeapplication.h> #include <klocale.h> #endif #include "defines.h" +#include "koprefs.h" #include "mainwindow.h" #include "mailistviewitem.h" #include <KDGanttMinimizeSplitter.h> #include "koprefs.h" MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) : QMainWindow( parent, name ) //, flags ) { #ifdef DESKTOP_VERSION globalSstatusBarMainWindow = statusBar(); #endif @@ -75,25 +76,25 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") , 0, 0, this, 0, true ); showFolders->addTo( toolBar ); showFolders->addTo( mailMenu ); showFolders->setOn( true ); connect(showFolders, SIGNAL( toggled(bool) ), SLOT( slotShowFolders(bool) ) ); /* searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ), 0, 0, this ); - searchMails->addTo( toolBar ); + searchMails->kopddTo( toolBar ); searchMails->addTo( mailMenu ); */ deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this); deleteMails->addTo( toolBar ); deleteMails->addTo( mailMenu ); connect( deleteMails, SIGNAL( activated() ), SLOT( slotDeleteAllMail() ) ); editSettings = new QAction( i18n( "Edit settings" ), SmallIcon("SettingsIcon") , 0, 0, this ); editSettings->addTo( settingsMenu ); @@ -113,33 +114,49 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) //settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu); //setCentralWidget( view ); QVBox* wrapperBox = new QVBox( this ); setCentralWidget( wrapperBox ); // QWidget *view = new QWidget( wrapperBox ); KDGanttMinimizeSplitter* splithor = new KDGanttMinimizeSplitter( Qt::Vertical, wrapperBox); splithor->setMinimizeDirection( KDGanttMinimizeSplitter::Down); KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, splithor); split->setMinimizeDirection( KDGanttMinimizeSplitter::Left); //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight ); + subLE = 0; + fromLE = 0; + toLE = 0; + if ( KOPrefs::instance()->mShowInfoSub || KOPrefs::instance()->mShowInfoFrom || KOPrefs::instance()->mShowInfoTo ) { QWidget* infoBox = new QWidget( splithor ); QGridLayout *griLay = new QGridLayout( infoBox, 2,2); + if ( KOPrefs::instance()->mShowInfoSub ) { griLay->addWidget( new QLabel ( i18n("Su:"), infoBox ),0,0 ); - griLay->addWidget( new QLabel ( i18n("Fr:"), infoBox ),1,0 ); - griLay->addWidget( new QLabel ( i18n("To:"), infoBox ),2,0 ); griLay->addWidget( subLE = new QLineEdit( infoBox ),0,1) ; + } + if ( KOPrefs::instance()->mShowInfoFrom ) { + griLay->addWidget( new QLabel ( i18n("Fr:"), infoBox ),1,0 ); griLay->addWidget( fromLE = new QLineEdit( infoBox ),1,1) ; + } + if ( KOPrefs::instance()->mShowInfoTo ) { + griLay->addWidget( new QLabel ( i18n("To:"), infoBox ),2,0 ); griLay->addWidget( toLE = new QLineEdit( infoBox ),2,1) ; + } infoBox->setMaximumHeight( infoBox->sizeHint().height() ); + if ( !KOPrefs::instance()->mShowInfoStart ) { + QTimer::singleShot( 1,splithor, SLOT ( toggle() ) ); + } + } + + folderView = new AccountView( split ); folderView->header()->hide(); folderView->setRootIsDecorated( false ); folderView->addColumn( i18n( "Mailbox" ) ); //layout->addWidget( folderView ); mailView = new QListView( split ); mailView->addColumn( i18n( " " ) ); mailView->addColumn( i18n( "Subject" ),QListView::Manual ); mailView->addColumn( i18n( "Sender" ),QListView::Manual ); mailView->addColumn( i18n( "Size" ),QListView::Manual); @@ -151,26 +168,29 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) mailView->setRootIsDecorated( false ); statusWidget = new StatusWidget( wrapperBox ); statusWidget->hide(); //layout->addWidget( mailView ); //layout->setStretchFactor( folderView, 1 ); //layout->setStretchFactor( mailView, 2 ); slotAdjustLayout(); #ifndef DESKTOP_VERSION QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold); QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold); + if ( subLE ) QPEApplication::setStylusOperation( subLE ,QPEApplication::RightOnHold); + if ( fromLE ) QPEApplication::setStylusOperation( fromLE ,QPEApplication::RightOnHold); + if ( toLE ) QPEApplication::setStylusOperation( toLE ,QPEApplication::RightOnHold); #endif connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this, SLOT( mailLeftClicked(QListViewItem*) ) ); connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this, SLOT( mailLeftClicked(QListViewItem*) ) ); connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) ); connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)), this,SLOT(refreshMailView(const QValueList<RecMailP>&))); connect( mailView, SIGNAL( currentChanged (QListViewItem* )),this, @@ -218,36 +238,36 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) #ifdef DESKTOP_VERSION resize ( 640, 480 ); #endif } MainWindow::~MainWindow() { } void MainWindow::setInfoFields(QListViewItem* item ) { if ( item == 0) { - subLE->setText(""); - fromLE->setText(""); - toLE->setText(""); + if ( subLE ) subLE->setText(""); + if ( fromLE ) fromLE->setText(""); + if ( toLE ) toLE->setText(""); return; } RecMailP mail = ((MailListViewItem*)item)->data(); - subLE->setText(mail->getSubject()); - fromLE->setText(mail->getFrom()); - toLE->setText(mail->To().join(";" )); - subLE->setCursorPosition(0); - fromLE->setCursorPosition(0); - toLE->setCursorPosition(0); + if ( subLE ) subLE->setText(mail->getSubject()); + if ( fromLE ) fromLE->setText(mail->getFrom()); + if ( toLE ) toLE->setText(mail->To().join(";" )); + if ( subLE ) subLE->setCursorPosition(0); + if ( fromLE ) fromLE->setCursorPosition(0); + if ( toLE ) toLE->setCursorPosition(0); } void MainWindow::slotSetCodec( int codec ) { codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, false ); //qDebug("codec %d ", codec); KOPrefs::instance()->mCurrentCodec = codec; KOPrefs::instance()->isDirty = true; QString name; switch ( codec ) { case 0: name = "iso-8859-1"; diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp index 68f0eb3..f56711d 100644 --- a/kmicromail/opiemail.cpp +++ b/kmicromail/opiemail.cpp @@ -486,31 +486,32 @@ void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) { if (mailtype==MAILLIB::A_NNTP) { m->insertItem(i18n("Read this posting"),this,SLOT(displayMail())); m->insertItem(i18n("Copy this posting"),this,SLOT(slotMoveCopyMail())); m->insertSeparator(); m->insertItem(i18n("Copy all selected postings"),this,SLOT(slotMoveCopyAllMail())); m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection())); } else { if (folderView->currentisDraft()) { m->insertItem(i18n("Edit this mail"),this,SLOT(reEditMail())); } m->insertItem(i18n("Reply to this mail"),this,SLOT(replyMail())); - m->insertSeparator(); m->insertItem(i18n("Read this mail"),this,SLOT(displayMail())); + m->insertSeparator(); m->insertItem(i18n("Move/Copy this mail"),this,SLOT(slotMoveCopyMail())); m->insertItem(i18n("Delete this mail"),this,SLOT(slotDeleteMail())); m->insertSeparator(); m->insertItem(i18n("Move/Copy all selected mail"),this,SLOT(slotMoveCopyAllMail())); m->insertItem(i18n("Delete all selected mails"),this,SLOT(slotDeleteAllMail())); + m->insertSeparator(); m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection())); } m->setFocus(); m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); delete m; } } void OpieMail::slotShowFolders( bool show ) { if ( show && folderView->isHidden() ) { |