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() | |||
41 | 41 | ||
42 | void AccountView::slotSelectionChanged(QListViewItem*item) | 42 | void AccountView::slotSelectionChanged(QListViewItem*item) |
43 | { | 43 | { |
44 | odebug << "AccountView: Selection changed" << oendl; | ||
45 | if (!item) { | 44 | if (!item) { |
46 | emit serverSelected(0); | 45 | emit serverSelected(0); |
47 | return; | 46 | return; |
48 | } | 47 | } |
49 | AccountViewItem *view = static_cast<AccountViewItem *>(item); | 48 | AccountViewItem *view = static_cast<AccountViewItem *>(item); |
50 | |||
51 | emit serverSelected(view->isServer()); | 49 | emit serverSelected(view->isServer()); |
52 | } | 50 | } |
53 | 51 | ||
52 | QMap<int,QString> AccountView::currentServerMenu()const | ||
53 | { | ||
54 | QMap<int,QString> smap; | ||
55 | AccountViewItem *view = static_cast<AccountViewItem *>(currentItem()); | ||
56 | if (!view)return smap; | ||
57 | smap = view->serverMenu(); | ||
58 | return smap; | ||
59 | } | ||
60 | |||
61 | QMap<int,QString> AccountView::currentFolderMenu()const | ||
62 | { | ||
63 | QMap<int,QString> fmap; | ||
64 | AccountViewItem *view = static_cast<AccountViewItem *>(currentItem()); | ||
65 | if (!view)return fmap; | ||
66 | fmap = view->folderMenu(); | ||
67 | return fmap; | ||
68 | } | ||
69 | |||
54 | void AccountView::slotContextMenu(int id) | 70 | void AccountView::slotContextMenu(int id) |
55 | { | 71 | { |
56 | AccountViewItem *view = static_cast<AccountViewItem *>(currentItem()); | 72 | AccountViewItem *view = static_cast<AccountViewItem *>(currentItem()); |
57 | if (!view) return; | 73 | if (!view) return; |
58 | view->contextMenuSelected(id); | 74 | bool del = view->contextMenuSelected(id); |
75 | if (!del && view->isServer()!=2) { | ||
76 | emit refreshMenues(view->isServer()); | ||
77 | } | ||
59 | } | 78 | } |
60 | 79 | ||
61 | void AccountView::slotRightButton(int button, QListViewItem * item,const QPoint&,int) | 80 | void AccountView::slotRightButton(int, QListViewItem * item,const QPoint&,int) |
62 | { | 81 | { |
63 | m_rightPressed = true; | 82 | m_rightPressed = true; |
64 | if (!item) return; | 83 | if (!item) return; |
@@ -71,7 +90,7 @@ void AccountView::slotRightButton(int button, QListViewItem * item,const QPoint& | |||
71 | delete m; | 90 | delete m; |
72 | } | 91 | } |
73 | 92 | ||
74 | void AccountView::slotLeftButton(int button, QListViewItem * item,const QPoint&,int) | 93 | void AccountView::slotLeftButton(int, QListViewItem *,const QPoint&,int) |
75 | { | 94 | { |
76 | m_rightPressed = false; | 95 | m_rightPressed = false; |
77 | } | 96 | } |