summaryrefslogtreecommitdiff
path: root/noncore/net/mail/mainwindow.cpp
authorharlekin <harlekin>2003-12-09 18:02:33 (UTC)
committer harlekin <harlekin>2003-12-09 18:02:33 (UTC)
commit0b7d74768f00be986f44bfbd61a6342fc854cc3a (patch) (side-by-side diff)
tree2e314f0d73e3c720783618870fb6d2e16b4acf3e /noncore/net/mail/mainwindow.cpp
parenta30efc4ca72e7689ee35b178d28db82054431fe9 (diff)
downloadopie-0b7d74768f00be986f44bfbd61a6342fc854cc3a.zip
opie-0b7d74768f00be986f44bfbd61a6342fc854cc3a.tar.gz
opie-0b7d74768f00be986f44bfbd61a6342fc854cc3a.tar.bz2
more updates
Diffstat (limited to 'noncore/net/mail/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/mainwindow.cpp28
1 files changed, 18 insertions, 10 deletions
diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp
index b25db97..f19f93d 100644
--- a/noncore/net/mail/mainwindow.cpp
+++ b/noncore/net/mail/mainwindow.cpp
@@ -71,15 +71,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
QWidget *view = new QWidget( this );
setCentralWidget( view );
-
- QWidget *d = QApplication::desktop();
- QBoxLayout *layout;
-
- if ( d->width() < d->height() ) {
- layout = new QVBoxLayout( view );
- } else {
- layout = new QHBoxLayout( view );
- }
+ layout = new QBoxLayout ( view, QBoxLayout::LeftToRight );
folderView = new AccountView( view );
folderView->header()->hide();
@@ -99,6 +91,8 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
layout->setStretchFactor( folderView, 1 );
layout->setStretchFactor( mailView, 2 );
+ slotAdjustLayout();
+
connect( mailView, SIGNAL( clicked( QListViewItem * ) ),this,
SLOT( displayMail( QListViewItem * ) ) );
@@ -107,6 +101,19 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) );
}
+
+void MainWindow::slotAdjustLayout() {
+
+ QWidget *d = QApplication::desktop();
+
+ if ( d->width() < d->height() ) {
+ layout->setDirection( QBoxLayout::TopToBottom );
+ } else {
+ layout->setDirection( QBoxLayout::LeftToRight );
+ }
+ delete d;
+}
+
void MainWindow::slotAdjustColumns()
{
bool hidden = folderView->isHidden();
@@ -149,7 +156,8 @@ void MainWindow::displayMail(QListViewItem*item)
RecBody body = folderView->fetchBody(mail);
ViewMail readMail( this );
- readMail.setMailInfo( mail.getFrom(), "", mail.getSubject(), "", "", body.Bodytext() );
+
+ readMail.setMailInfo( mail.getFrom(), mail.To(), mail.getSubject(), mail.CC(), mail.Bcc(), mail.getDate(), body.Bodytext() );
readMail.showMaximized();
readMail.exec();
}