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/accountview.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/accountview.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/accountview.cpp | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/noncore/net/mail/accountview.cpp b/noncore/net/mail/accountview.cpp index faa42c3..1183704 100644 --- a/noncore/net/mail/accountview.cpp +++ b/noncore/net/mail/accountview.cpp @@ -41,24 +41,43 @@ AccountView::~AccountView() void AccountView::slotSelectionChanged(QListViewItem*item) { - odebug << "AccountView: Selection changed" << oendl; if (!item) { emit serverSelected(0); return; } AccountViewItem *view = static_cast<AccountViewItem *>(item); - emit serverSelected(view->isServer()); } +QMap<int,QString> AccountView::currentServerMenu()const +{ + QMap<int,QString> smap; + AccountViewItem *view = static_cast<AccountViewItem *>(currentItem()); + if (!view)return smap; + smap = view->serverMenu(); + return smap; +} + +QMap<int,QString> AccountView::currentFolderMenu()const +{ + QMap<int,QString> fmap; + AccountViewItem *view = static_cast<AccountViewItem *>(currentItem()); + if (!view)return fmap; + fmap = view->folderMenu(); + return fmap; +} + void AccountView::slotContextMenu(int id) { AccountViewItem *view = static_cast<AccountViewItem *>(currentItem()); if (!view) return; - view->contextMenuSelected(id); + bool del = view->contextMenuSelected(id); + if (!del && view->isServer()!=2) { + emit refreshMenues(view->isServer()); + } } -void AccountView::slotRightButton(int button, QListViewItem * item,const QPoint&,int) +void AccountView::slotRightButton(int, QListViewItem * item,const QPoint&,int) { m_rightPressed = true; if (!item) return; @@ -71,7 +90,7 @@ void AccountView::slotRightButton(int button, QListViewItem * item,const QPoint& delete m; } -void AccountView::slotLeftButton(int button, QListViewItem * item,const QPoint&,int) +void AccountView::slotLeftButton(int, QListViewItem *,const QPoint&,int) { m_rightPressed = false; } |