author | alwin <alwin> | 2005-03-12 22:14:03 (UTC) |
---|---|---|
committer | alwin <alwin> | 2005-03-12 22:14:03 (UTC) |
commit | 3cb4c3983ee738f3221ecb4cb154ea1252d69d64 (patch) (side-by-side diff) | |
tree | 13357c046fd618b10546ad6d21992826eab3ad01 /noncore/net/mail/mainwindow.cpp | |
parent | 9dddeb81d7db5da718f3f467bb1511b7e72b9caa (diff) | |
download | opie-3cb4c3983ee738f3221ecb4cb154ea1252d69d64.zip opie-3cb4c3983ee738f3221ecb4cb154ea1252d69d64.tar.gz opie-3cb4c3983ee738f3221ecb4cb154ea1252d69d64.tar.bz2 |
rework of the structure of the main menues, them depends now on state of current selected folder/server
on small screens some "Folder" and "Server" menu will get submenus of the menu-item "Mail" cause lack of space on screen - have no other idea.
Diffstat (limited to 'noncore/net/mail/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/mainwindow.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp index 81c8fee..3689352 100644 --- a/noncore/net/mail/mainwindow.cpp +++ b/noncore/net/mail/mainwindow.cpp @@ -23,3 +23,2 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) toolBar = new QToolBar( this ); - menuBar = new QMenuBar( toolBar ); @@ -32,4 +31,13 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) + if (QApplication::desktop()->width()<330) { + serverMenu = new QPopupMenu( mailMenu ); + folderMenu = new QPopupMenu( mailMenu ); + m_ServerMenuId = mailMenu->insertItem( tr( "Server" ), serverMenu ); + m_FolderMenuId = mailMenu->insertItem( tr( "Folder" ), folderMenu ); + } else { serverMenu = new QPopupMenu( menuBar ); + folderMenu = new QPopupMenu( menuBar ); + m_FolderMenuId = menuBar->insertItem( tr( "Folder" ), folderMenu ); m_ServerMenuId = menuBar->insertItem( tr( "Server" ), serverMenu ); + } serverMenu->insertItem(tr("Disconnect"),SERVER_MENU_DISCONNECT); @@ -42,4 +50,2 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) - folderMenu = new QPopupMenu( menuBar ); - m_FolderMenuId = menuBar->insertItem( tr( "Folder" ), folderMenu ); folderMenu->insertItem(tr("Refresh headerlist"),FOLDER_MENU_REFRESH_HEADER); @@ -49,3 +55,2 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) folderMenu->insertItem(tr("Move/Copie all mails"),FOLDER_MENU_MOVE_MAILS); - menuBar->setItemEnabled(m_ServerMenuId,false); @@ -175,7 +180,5 @@ MainWindow::~MainWindow() -void MainWindow::serverSelected(int m_isFolder) +void MainWindow::serverSelected(int) { - mailView->clear(); - menuBar->setItemEnabled(m_ServerMenuId,m_isFolder&1); - menuBar->setItemEnabled(m_FolderMenuId,m_isFolder&2); + odebug << "slotShowFolders not reached" << oendl; } |