-rw-r--r-- | kmicromail/mainwindow.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp index 0794e00..4c58909 100644 --- a/kmicromail/mainwindow.cpp +++ b/kmicromail/mainwindow.cpp | |||
@@ -214,48 +214,50 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) | |||
214 | QLabel *spacer = new QLabel( toolBar ); | 214 | QLabel *spacer = new QLabel( toolBar ); |
215 | spacer->setBackgroundMode( QWidget::PaletteButton ); | 215 | spacer->setBackgroundMode( QWidget::PaletteButton ); |
216 | toolBar->setStretchableWidget( spacer ); | 216 | toolBar->setStretchableWidget( spacer ); |
217 | 217 | ||
218 | QAction* closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this); | 218 | QAction* closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this); |
219 | connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); | 219 | connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); |
220 | if ( QApplication::desktop()->width() > 320 ) | 220 | if ( QApplication::desktop()->width() > 320 ) |
221 | closeMail->addTo(toolBar); | 221 | closeMail->addTo(toolBar); |
222 | closeMail->addTo(mailMenu); | 222 | closeMail->addTo(mailMenu); |
223 | 223 | ||
224 | 224 | ||
225 | QPopupMenu* helpMenu = new QPopupMenu( menuBar ); | 225 | QPopupMenu* helpMenu = new QPopupMenu( menuBar ); |
226 | menuBar->insertItem( i18n( "Help" ), helpMenu ); | 226 | menuBar->insertItem( i18n( "Help" ), helpMenu ); |
227 | QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this); | 227 | QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this); |
228 | connect( li, SIGNAL( activated() ), SLOT( showAbout()) ); | 228 | connect( li, SIGNAL( activated() ), SLOT( showAbout()) ); |
229 | li->addTo(helpMenu); | 229 | li->addTo(helpMenu); |
230 | li = new QAction(i18n("Licence"),QPixmap(), 0, 0, this); | 230 | li = new QAction(i18n("Licence"),QPixmap(), 0, 0, this); |
231 | connect( li, SIGNAL( activated() ), SLOT( showLicence()) ); | 231 | connect( li, SIGNAL( activated() ), SLOT( showLicence()) ); |
232 | li->addTo(helpMenu); | 232 | li->addTo(helpMenu); |
233 | li = new QAction(i18n("LibEtPan Licence"), QPixmap(), 0, 0, this); | 233 | li = new QAction(i18n("LibEtPan Licence"), QPixmap(), 0, 0, this); |
234 | connect( li, SIGNAL( activated() ), SLOT( showEtpanLicence()) ); | 234 | connect( li, SIGNAL( activated() ), SLOT( showEtpanLicence()) ); |
235 | li->addTo(helpMenu); | 235 | li->addTo(helpMenu); |
236 | connect( codecMenu, SIGNAL( activated(int) ), this, SLOT( slotSetCodec( int )) ); | 236 | connect( codecMenu, SIGNAL( activated(int) ), this, SLOT( slotSetCodec( int )) ); |
237 | slotSetCodec( KOPrefs::instance()->mCurrentCodec ); | 237 | slotSetCodec( KOPrefs::instance()->mCurrentCodec ); |
238 | menuBar->setMaximumWidth( menuBar->sizeHint().width()); | ||
239 | //menuBar->setMaximumSize( menuBar->sizeHint()); | ||
238 | #ifdef DESKTOP_VERSION | 240 | #ifdef DESKTOP_VERSION |
239 | resize ( 640, 480 ); | 241 | resize ( 640, 480 ); |
240 | #endif | 242 | #endif |
241 | } | 243 | } |
242 | 244 | ||
243 | MainWindow::~MainWindow() | 245 | MainWindow::~MainWindow() |
244 | { | 246 | { |
245 | } | 247 | } |
246 | 248 | ||
247 | void MainWindow::setInfoFields(QListViewItem* item ) | 249 | void MainWindow::setInfoFields(QListViewItem* item ) |
248 | { | 250 | { |
249 | if ( item == 0) { | 251 | if ( item == 0) { |
250 | if ( subLE ) subLE->setText(""); | 252 | if ( subLE ) subLE->setText(""); |
251 | if ( fromLE ) fromLE->setText(""); | 253 | if ( fromLE ) fromLE->setText(""); |
252 | if ( toLE ) toLE->setText(""); | 254 | if ( toLE ) toLE->setText(""); |
253 | return; | 255 | return; |
254 | } | 256 | } |
255 | RecMailP mail = ((MailListViewItem*)item)->data(); | 257 | RecMailP mail = ((MailListViewItem*)item)->data(); |
256 | if ( subLE ) subLE->setText(mail->getSubject()); | 258 | if ( subLE ) subLE->setText(mail->getSubject()); |
257 | if ( fromLE ) fromLE->setText(mail->getFrom()); | 259 | if ( fromLE ) fromLE->setText(mail->getFrom()); |
258 | if ( toLE ) toLE->setText(mail->To().join(";" )); | 260 | if ( toLE ) toLE->setText(mail->To().join(";" )); |
259 | if ( subLE ) subLE->setCursorPosition(0); | 261 | if ( subLE ) subLE->setCursorPosition(0); |
260 | if ( fromLE ) fromLE->setCursorPosition(0); | 262 | if ( fromLE ) fromLE->setCursorPosition(0); |
261 | if ( toLE ) toLE->setCursorPosition(0); | 263 | if ( toLE ) toLE->setCursorPosition(0); |