-rw-r--r-- | kmicromail/mainwindow.cpp | 24 | ||||
-rw-r--r-- | kmicromail/viewmail.cpp | 3 | ||||
-rw-r--r-- | kmicromail/viewmailbase.cpp | 13 | ||||
-rw-r--r-- | kmicromail/viewmailbase.h | 2 |
4 files changed, 25 insertions, 17 deletions
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp index ddc7b3e..a500dec 100644 --- a/kmicromail/mainwindow.cpp +++ b/kmicromail/mainwindow.cpp @@ -33,7 +33,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) toolBar->setHorizontalStretchable( true ); - QLabel *spacer = new QLabel( toolBar ); - spacer->setBackgroundMode( QWidget::PaletteButton ); - toolBar->setStretchableWidget( spacer ); + composeMail = new QAction( tr( "Compose new mail" ), SmallIcon("composemail"), @@ -134,6 +132,6 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) // connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) ); connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) ); - mailView->setMultiSelection ( true ); - //mailView->setSelectionMode( QListView::Extended ); + //mailView->setMultiSelection ( true ); + mailView->setSelectionMode( QListView::Extended ); QValueList<int> list; int fw = 100; @@ -144,5 +142,13 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) split->setSizes( list ); QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) ); - mailView->setShowSortIndicator ( true ); + mailView->setShowSortIndicator ( true ); + QLabel *spacer = new QLabel( toolBar ); + spacer->setBackgroundMode( QWidget::PaletteButton ); + toolBar->setStretchableWidget( spacer ); + + QAction* closeMail = new QAction(tr("Close"),SmallIcon("exit"), 0, 0, this); + connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); + closeMail->addTo(toolBar); + closeMail->addTo(mailMenu); } @@ -177,8 +183,8 @@ void MainWindow::slotAdjustColumns() mailView->setColumnWidth( 0, 10 ); - mailView->setColumnWidth( 1, 80 ); - mailView->setColumnWidth( 2, 80 ); + mailView->setColumnWidth( 1, 100 ); + mailView->setColumnWidth( 2, 100 ); mailView->setColumnWidth( 3, 50 ); - mailView->setColumnWidth( 4, 50 ); + mailView->setColumnWidth( 4, 120 ); } diff --git a/kmicromail/viewmail.cpp b/kmicromail/viewmail.cpp index b434318..703711d 100644 --- a/kmicromail/viewmail.cpp +++ b/kmicromail/viewmail.cpp @@ -314,5 +314,6 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) connect( forward, SIGNAL(activated()), SLOT(slotForward())); connect( deleteMail, SIGNAL( activated() ), SLOT( slotDeleteMail() ) ); - connect( showHtml, SIGNAL( toggled(bool) ), SLOT( slotShowHtml(bool) ) ); + connect( showHtml, SIGNAL( toggled(bool) ), SLOT( slotShowHtml(bool) ) ); + connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); attachments->setEnabled(m_gotBody); diff --git a/kmicromail/viewmailbase.cpp b/kmicromail/viewmailbase.cpp index 2590481..584a0ac 100644 --- a/kmicromail/viewmailbase.cpp +++ b/kmicromail/viewmailbase.cpp @@ -27,8 +27,4 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) addToolBar(toolbar); - QLabel *spacer = new QLabel(toolbar); - spacer->setBackgroundMode(QWidget::PaletteButton); - toolbar->setStretchableWidget(spacer); - reply = new QAction(tr("Reply"),SmallIcon("reply"), 0, 0, this); reply->addTo(toolbar); @@ -49,8 +45,13 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) showHtml->addTo( mailmenu ); - deleteMail = new QAction(tr("Delete Mail"),SmallIcon("trash"), 0, 0, this); + deleteMail = new QAction(tr("Delete Mail"),SmallIcon("trash"), 0, 0, this); deleteMail->addTo(toolbar); deleteMail->addTo(mailmenu); - + closeMail = new QAction(tr("Close"),SmallIcon("exit"), 0, 0, this); + QLabel *spacer = new QLabel(toolbar); + spacer->setBackgroundMode(QWidget::PaletteButton); + toolbar->setStretchableWidget(spacer); + closeMail->addTo(toolbar); + closeMail->addTo(mailmenu); QVBox *view = new QVBox(this); setCentralWidget(view); diff --git a/kmicromail/viewmailbase.h b/kmicromail/viewmailbase.h index fdaad2a..c29d143 100644 --- a/kmicromail/viewmailbase.h +++ b/kmicromail/viewmailbase.h @@ -20,5 +20,5 @@ public: protected: - QAction *reply, *forward, *attachbutton, *deleteMail, *showHtml; + QAction *reply, *forward, *attachbutton, *deleteMail, *showHtml, *closeMail; QListView *attachments; QToolBar *toolbar; |