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) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/mainwindow.cpp | 23 |
1 files changed, 13 insertions, 10 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 @@ -21,7 +21,6 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) setToolBarsMovable( false ); toolBar = new QToolBar( this ); - menuBar = new QMenuBar( toolBar ); mailMenu = new QPopupMenu( menuBar ); @@ -30,8 +29,17 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) settingsMenu = new QPopupMenu( menuBar ); menuBar->insertItem( tr( "Settings" ), settingsMenu ); - serverMenu = new QPopupMenu( menuBar ); - m_ServerMenuId = menuBar->insertItem( tr( "Server" ), serverMenu ); + 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); serverMenu->insertItem(tr("Set on/offline"),SERVER_MENU_OFFLINE); serverMenu->insertSeparator(); @@ -40,14 +48,11 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) serverMenu->insertSeparator(); serverMenu->insertItem(tr("(Un-)Subscribe groups"),SERVER_MENU_SUBSCRIBE); - folderMenu = new QPopupMenu( menuBar ); - m_FolderMenuId = menuBar->insertItem( tr( "Folder" ), folderMenu ); folderMenu->insertItem(tr("Refresh headerlist"),FOLDER_MENU_REFRESH_HEADER); folderMenu->insertItem(tr("Delete all mails"),FOLDER_MENU_DELETE_ALL_MAILS); folderMenu->insertItem(tr("New subfolder"),FOLDER_MENU_NEW_SUBFOLDER); folderMenu->insertItem(tr("Delete folder"),FOLDER_MENU_DELETE_FOLDER); folderMenu->insertItem(tr("Move/Copie all mails"),FOLDER_MENU_MOVE_MAILS); - menuBar->setItemEnabled(m_ServerMenuId,false); menuBar->setItemEnabled(m_FolderMenuId,false); @@ -173,11 +178,9 @@ 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; } void MainWindow::systemMessage( const QCString& msg, const QByteArray& data ) |