summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/mainwindow.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp
index d3b9c34..a0ce6c1 100644
--- a/noncore/net/mail/mainwindow.cpp
+++ b/noncore/net/mail/mainwindow.cpp
@@ -64,74 +64,77 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
64 64
65 /* 65 /*
66 searchMails = new QAction( tr( "Search mails" ), ICON_SEARCHMAILS, 66 searchMails = new QAction( tr( "Search mails" ), ICON_SEARCHMAILS,
67 0, 0, this ); 67 0, 0, this );
68 searchMails->addTo( toolBar ); 68 searchMails->addTo( toolBar );
69 searchMails->addTo( mailMenu ); 69 searchMails->addTo( mailMenu );
70 */ 70 */
71 71
72 deleteMails = new QAction(tr("Delete Mail"), QIconSet(Resource::loadPixmap("mail/delete")), 0, 0, this); 72 deleteMails = new QAction(tr("Delete Mail"), QIconSet(Resource::loadPixmap("mail/delete")), 0, 0, this);
73 deleteMails->addTo( toolBar ); 73 deleteMails->addTo( toolBar );
74 deleteMails->addTo( mailMenu ); 74 deleteMails->addTo( mailMenu );
75 connect( deleteMails, SIGNAL( activated() ), 75 connect( deleteMails, SIGNAL( activated() ),
76 SLOT( slotDeleteMail() ) ); 76 SLOT( slotDeleteMail() ) );
77 77
78 editSettings = new QAction( tr( "Edit settings" ), ICON_EDITSETTINGS, 78 editSettings = new QAction( tr( "Edit settings" ), ICON_EDITSETTINGS,
79 0, 0, this ); 79 0, 0, this );
80 editSettings->addTo( settingsMenu ); 80 editSettings->addTo( settingsMenu );
81 connect( editSettings, SIGNAL( activated() ), 81 connect( editSettings, SIGNAL( activated() ),
82 SLOT( slotEditSettings() ) ); 82 SLOT( slotEditSettings() ) );
83 83
84 editAccounts = new QAction( tr( "Configure accounts" ), ICON_EDITACCOUNTS, 84 editAccounts = new QAction( tr( "Configure accounts" ), ICON_EDITACCOUNTS,
85 0, 0, this ); 85 0, 0, this );
86 editAccounts->addTo( settingsMenu ); 86 editAccounts->addTo( settingsMenu );
87 87
88 QWidget *view = new QWidget( this ); 88 //setCentralWidget( view );
89 setCentralWidget( view ); 89
90 QVBox* wrapperBox = new QVBox( this );
91 setCentralWidget( wrapperBox );
92
93 QWidget *view = new QWidget( wrapperBox );
90 94
91 layout = new QBoxLayout ( view, QBoxLayout::LeftToRight ); 95 layout = new QBoxLayout ( view, QBoxLayout::LeftToRight );
92 96
93 folderView = new AccountView( view ); 97 folderView = new AccountView( view );
94 folderView->header()->hide(); 98 folderView->header()->hide();
95 folderView->setRootIsDecorated( true ); 99 folderView->setRootIsDecorated( true );
96 folderView->addColumn( tr( "Mailbox" ) ); 100 folderView->addColumn( tr( "Mailbox" ) );
97 //folderView->hide();
98 101
99 layout->addWidget( folderView ); 102 layout->addWidget( folderView );
100 103
101 mailView = new QListView( view ); 104 mailView = new QListView( view );
102 mailView->addColumn( tr( "" ) ); 105 mailView->addColumn( tr( "" ) );
103 mailView->addColumn( tr( "Subject" ),QListView::Manual ); 106 mailView->addColumn( tr( "Subject" ),QListView::Manual );
104 mailView->addColumn( tr( "Sender" ),QListView::Manual ); 107 mailView->addColumn( tr( "Sender" ),QListView::Manual );
105 mailView->addColumn( tr( "Size" ),QListView::Manual); 108 mailView->addColumn( tr( "Size" ),QListView::Manual);
106 mailView->addColumn( tr( "Date" )); 109 mailView->addColumn( tr( "Date" ));
107 mailView->setAllColumnsShowFocus(true); 110 mailView->setAllColumnsShowFocus(true);
108 mailView->setSorting(-1); 111 mailView->setSorting(-1);
109 112
110 statusWidget = new StatusWidget( view ); 113 statusWidget = new StatusWidget( wrapperBox );
114 statusWidget->hide();
111 115
112 layout->addWidget( mailView ); 116 layout->addWidget( mailView );
113 layout->addWidget( statusWidget );
114 layout->setStretchFactor( folderView, 1 ); 117 layout->setStretchFactor( folderView, 1 );
115 layout->setStretchFactor( mailView, 2 ); 118 layout->setStretchFactor( mailView, 2 );
116 119
117 120
118 slotAdjustLayout(); 121 slotAdjustLayout();
119 122
120 connect( mailView, SIGNAL( clicked( QListViewItem * ) ),this, 123 connect( mailView, SIGNAL( clicked( QListViewItem * ) ),this,
121 SLOT( displayMail( QListViewItem * ) ) ); 124 SLOT( displayMail( QListViewItem * ) ) );
122 125
123 connect(folderView, SIGNAL(refreshMailview(QList<RecMail>*)),this,SLOT(refreshMailView(QList<RecMail>*))); 126 connect(folderView, SIGNAL(refreshMailview(QList<RecMail>*)),this,SLOT(refreshMailView(QList<RecMail>*)));
124 127
125 QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) ); 128 QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) );
126 129
127} 130}
128 131
129 132
130void MainWindow::slotAdjustLayout() { 133void MainWindow::slotAdjustLayout() {
131 134
132 QWidget *d = QApplication::desktop(); 135 QWidget *d = QApplication::desktop();
133 136
134 if ( d->width() < d->height() ) { 137 if ( d->width() < d->height() ) {
135 layout->setDirection( QBoxLayout::TopToBottom ); 138 layout->setDirection( QBoxLayout::TopToBottom );
136 } else { 139 } else {
137 layout->setDirection( QBoxLayout::LeftToRight ); 140 layout->setDirection( QBoxLayout::LeftToRight );