Diffstat (limited to 'noncore/net/mail/accountview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/accountview.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/noncore/net/mail/accountview.cpp b/noncore/net/mail/accountview.cpp index 1183704..0e739e2 100644 --- a/noncore/net/mail/accountview.cpp +++ b/noncore/net/mail/accountview.cpp | |||
@@ -8,12 +8,13 @@ | |||
8 | #include <libmailwrapper/mailtypes.h> | 8 | #include <libmailwrapper/mailtypes.h> |
9 | #include <libmailwrapper/abstractmail.h> | 9 | #include <libmailwrapper/abstractmail.h> |
10 | 10 | ||
11 | /* OPIE */ | 11 | /* OPIE */ |
12 | #include <opie2/odebug.h> | 12 | #include <opie2/odebug.h> |
13 | #include <qpe/qpeapplication.h> | 13 | #include <qpe/qpeapplication.h> |
14 | #include <qpe/config.h> | ||
14 | 15 | ||
15 | /* QT */ | 16 | /* QT */ |
16 | #include <qmessagebox.h> | 17 | #include <qmessagebox.h> |
17 | #include <qpopupmenu.h> | 18 | #include <qpopupmenu.h> |
18 | 19 | ||
19 | using namespace Opie::Core; | 20 | using namespace Opie::Core; |
@@ -28,20 +29,28 @@ AccountView::AccountView( QWidget *parent, const char *name, WFlags flags ) | |||
28 | SLOT( slotSelectionChanged(QListViewItem*) ) ); | 29 | SLOT( slotSelectionChanged(QListViewItem*) ) ); |
29 | connect( this, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, | 30 | connect( this, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, |
30 | SLOT( slotMouseButton(int,QListViewItem*,const QPoint&,int) ) ); | 31 | SLOT( slotMouseButton(int,QListViewItem*,const QPoint&,int) ) ); |
31 | connect( this, SIGNAL(clicked(QListViewItem*) ),this, | 32 | connect( this, SIGNAL(clicked(QListViewItem*) ),this, |
32 | SLOT( slotMouseClicked(QListViewItem*) ) ); | 33 | SLOT( slotMouseClicked(QListViewItem*) ) ); |
33 | m_currentItem = 0; | 34 | m_currentItem = 0; |
35 | readSettings(); | ||
34 | } | 36 | } |
35 | 37 | ||
36 | AccountView::~AccountView() | 38 | AccountView::~AccountView() |
37 | { | 39 | { |
38 | imapAccounts.clear(); | 40 | imapAccounts.clear(); |
39 | mhAccounts.clear(); | 41 | mhAccounts.clear(); |
40 | } | 42 | } |
41 | 43 | ||
44 | void AccountView::readSettings() | ||
45 | { | ||
46 | Config cfg("mail"); | ||
47 | cfg.setGroup( "Settings" ); | ||
48 | m_clickopens = cfg.readBoolEntry("clickOpensFolder",true); | ||
49 | } | ||
50 | |||
42 | void AccountView::slotSelectionChanged(QListViewItem*item) | 51 | void AccountView::slotSelectionChanged(QListViewItem*item) |
43 | { | 52 | { |
44 | if (!item) { | 53 | if (!item) { |
45 | emit serverSelected(0); | 54 | emit serverSelected(0); |
46 | return; | 55 | return; |
47 | } | 56 | } |
@@ -95,13 +104,13 @@ void AccountView::slotLeftButton(int, QListViewItem *,const QPoint&,int) | |||
95 | m_rightPressed = false; | 104 | m_rightPressed = false; |
96 | } | 105 | } |
97 | 106 | ||
98 | void AccountView::slotMouseClicked(QListViewItem*item) | 107 | void AccountView::slotMouseClicked(QListViewItem*item) |
99 | { | 108 | { |
100 | if (m_rightPressed) return; | 109 | if (m_rightPressed) return; |
101 | if (!item || m_currentItem == item) return; | 110 | if (!item || m_currentItem == item||!m_clickopens) return; |
102 | /* ### ToDo check settings if on single tab it should open */ | 111 | /* ### ToDo check settings if on single tab it should open */ |
103 | m_currentItem = item; | 112 | m_currentItem = item; |
104 | refresh(m_currentItem); | 113 | refresh(m_currentItem); |
105 | } | 114 | } |
106 | 115 | ||
107 | void AccountView::slotMouseButton(int button, QListViewItem * item,const QPoint&pos,int column) | 116 | void AccountView::slotMouseButton(int button, QListViewItem * item,const QPoint&pos,int column) |