author | zautrix <zautrix> | 2004-07-04 17:18:13 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-07-04 17:18:13 (UTC) |
commit | 25671b4735f2604e13f4d6801b96f016ac8b9834 (patch) (side-by-side diff) | |
tree | 8fb194ccfbec635f1ada9db16b76e81f72387216 /kmicromail | |
parent | 48bea7694899530fdfdbc0a2fefab6d3e64be1e1 (diff) | |
download | kdepimpi-25671b4735f2604e13f4d6801b96f016ac8b9834.zip kdepimpi-25671b4735f2604e13f4d6801b96f016ac8b9834.tar.gz kdepimpi-25671b4735f2604e13f4d6801b96f016ac8b9834.tar.bz2 |
Usebility enhancement:Removed trash from toolbar, added exit button
-rw-r--r-- | kmicromail/mainwindow.cpp | 22 | ||||
-rw-r--r-- | kmicromail/viewmail.cpp | 1 | ||||
-rw-r--r-- | kmicromail/viewmailbase.cpp | 11 | ||||
-rw-r--r-- | kmicromail/viewmailbase.h | 2 |
4 files changed, 22 insertions, 14 deletions
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp index ddc7b3e..a500dec 100644 --- a/kmicromail/mainwindow.cpp +++ b/kmicromail/mainwindow.cpp @@ -31,11 +31,9 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) addToolBar( toolBar ); toolBar->setHorizontalStretchable( true ); - QLabel *spacer = new QLabel( toolBar ); - spacer->setBackgroundMode( QWidget::PaletteButton ); - toolBar->setStretchableWidget( spacer ); + composeMail = new QAction( tr( "Compose new mail" ), SmallIcon("composemail"), 0, 0, this ); composeMail->addTo( toolBar ); @@ -132,10 +130,10 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) ); // 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; if ( QApplication::desktop()->width() > 320 ) fw = 50; @@ -143,8 +141,16 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) list.append( 100 ); split->setSizes( list ); QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) ); 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); } MainWindow::~MainWindow() { @@ -175,12 +181,12 @@ void MainWindow::slotAdjustColumns() folderView->setColumnWidth( 0, folderView->visibleWidth() ); if ( hidden ) folderView->hide(); 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 ); } void MainWindow::slotEditSettings() { diff --git a/kmicromail/viewmail.cpp b/kmicromail/viewmail.cpp index b434318..703711d 100644 --- a/kmicromail/viewmail.cpp +++ b/kmicromail/viewmail.cpp @@ -313,8 +313,9 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) connect( reply, SIGNAL(activated()), SLOT(slotReply())); connect( forward, SIGNAL(activated()), SLOT(slotForward())); connect( deleteMail, SIGNAL( activated() ), SLOT( slotDeleteMail() ) ); connect( showHtml, SIGNAL( toggled(bool) ), SLOT( slotShowHtml(bool) ) ); + connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); attachments->setEnabled(m_gotBody); connect( attachments, SIGNAL( clicked(QListViewItem*,const QPoint&, int) ), SLOT( slotItemClicked(QListViewItem*,const QPoint&, int) ) ); diff --git a/kmicromail/viewmailbase.cpp b/kmicromail/viewmailbase.cpp index 2590481..584a0ac 100644 --- a/kmicromail/viewmailbase.cpp +++ b/kmicromail/viewmailbase.cpp @@ -25,12 +25,8 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) toolbar->setHorizontalStretchable(true); 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); reply->addTo(mailmenu); @@ -50,9 +46,14 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) 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); attachments = new QListView(view); diff --git a/kmicromail/viewmailbase.h b/kmicromail/viewmailbase.h index fdaad2a..c29d143 100644 --- a/kmicromail/viewmailbase.h +++ b/kmicromail/viewmailbase.h @@ -18,9 +18,9 @@ class ViewMailBase : public QMainWindow public: ViewMailBase(QWidget *parent = 0, const char *name = 0, WFlags fl = 0); protected: - QAction *reply, *forward, *attachbutton, *deleteMail, *showHtml; + QAction *reply, *forward, *attachbutton, *deleteMail, *showHtml, *closeMail; QListView *attachments; QToolBar *toolbar; QTextBrowser *browser; OpenDiag *openDiag; |