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 @@ -2,52 +2,61 @@ #include "accountview.h" #include "accountitem.h" #include "selectstore.h" #include <libmailwrapper/settings.h> #include <libmailwrapper/mailwrapper.h> #include <libmailwrapper/mailtypes.h> #include <libmailwrapper/abstractmail.h> /* OPIE */ #include <opie2/odebug.h> #include <qpe/qpeapplication.h> +#include <qpe/config.h> /* QT */ #include <qmessagebox.h> #include <qpopupmenu.h> using namespace Opie::Core; AccountView::AccountView( QWidget *parent, const char *name, WFlags flags ) : QListView( parent, name, flags ) { setSorting(0); setSelectionMode(Single); m_rightPressed = false; connect( this, SIGNAL( selectionChanged(QListViewItem*) ), SLOT( slotSelectionChanged(QListViewItem*) ) ); connect( this, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, SLOT( slotMouseButton(int,QListViewItem*,const QPoint&,int) ) ); connect( this, SIGNAL(clicked(QListViewItem*) ),this, SLOT( slotMouseClicked(QListViewItem*) ) ); m_currentItem = 0; + readSettings(); } AccountView::~AccountView() { imapAccounts.clear(); mhAccounts.clear(); } +void AccountView::readSettings() +{ + Config cfg("mail"); + cfg.setGroup( "Settings" ); + m_clickopens = cfg.readBoolEntry("clickOpensFolder",true); +} + void AccountView::slotSelectionChanged(QListViewItem*item) { if (!item) { emit serverSelected(0); return; } AccountViewItem *view = static_cast<AccountViewItem *>(item); emit serverSelected(view->isServer()); } QMap<int,QString> AccountView::currentServerMenu()const { @@ -89,25 +98,25 @@ void AccountView::slotRightButton(int, QListViewItem * item,const QPoint&,int) m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); delete m; } void AccountView::slotLeftButton(int, QListViewItem *,const QPoint&,int) { m_rightPressed = false; } void AccountView::slotMouseClicked(QListViewItem*item) { if (m_rightPressed) return; - if (!item || m_currentItem == item) return; + if (!item || m_currentItem == item||!m_clickopens) return; /* ### ToDo check settings if on single tab it should open */ m_currentItem = item; refresh(m_currentItem); } void AccountView::slotMouseButton(int button, QListViewItem * item,const QPoint&pos,int column) { if (button==1) { slotLeftButton(button,item,pos,column); } else if (button==2) { slotRightButton(button,item,pos,column); } |