-rw-r--r-- | noncore/net/mail/opiemail.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/noncore/net/mail/opiemail.cpp b/noncore/net/mail/opiemail.cpp index 1bc81e4..fb8877a 100644 --- a/noncore/net/mail/opiemail.cpp +++ b/noncore/net/mail/opiemail.cpp | |||
@@ -12,12 +12,13 @@ | |||
12 | #include <libmailwrapper/mailtypes.h> | 12 | #include <libmailwrapper/mailtypes.h> |
13 | #include <libmailwrapper/abstractmail.h> | 13 | #include <libmailwrapper/abstractmail.h> |
14 | /* OPIE */ | 14 | /* OPIE */ |
15 | #include <opie2/odebug.h> | 15 | #include <opie2/odebug.h> |
16 | #include <qpe/resource.h> | 16 | #include <qpe/resource.h> |
17 | #include <qpe/qpeapplication.h> | 17 | #include <qpe/qpeapplication.h> |
18 | #include <qpe/config.h> | ||
18 | 19 | ||
19 | /* QT */ | 20 | /* QT */ |
20 | #include <qmap.h> | 21 | #include <qmap.h> |
21 | #include <qvaluelist.h> | 22 | #include <qvaluelist.h> |
22 | 23 | ||
23 | /* UNIX */ | 24 | /* UNIX */ |
@@ -103,12 +104,16 @@ void ValueExplode::splitit() | |||
103 | } | 104 | } |
104 | 105 | ||
105 | OpieMail::OpieMail( QWidget *parent, const char *name, WFlags ) | 106 | OpieMail::OpieMail( QWidget *parent, const char *name, WFlags ) |
106 | : MainWindow( parent, name, WStyle_ContextHelp ) | 107 | : MainWindow( parent, name, WStyle_ContextHelp ) |
107 | { | 108 | { |
108 | setup_signalblocking(); | 109 | setup_signalblocking(); |
110 | Config cfg("mail"); | ||
111 | cfg.setGroup( "Settings" ); | ||
112 | m_clickopens = cfg.readBoolEntry("clickOpensMail",true); | ||
113 | |||
109 | settings = new Settings(); | 114 | settings = new Settings(); |
110 | folderView->populate( settings->getAccounts() ); | 115 | folderView->populate( settings->getAccounts() ); |
111 | connect(folderView,SIGNAL(refreshMenues(int)),this,SLOT(refreshMenu(int))); | 116 | connect(folderView,SIGNAL(refreshMenues(int)),this,SLOT(refreshMenu(int))); |
112 | } | 117 | } |
113 | 118 | ||
114 | OpieMail::~OpieMail() | 119 | OpieMail::~OpieMail() |
@@ -231,13 +236,18 @@ void OpieMail::slotSearchMails() | |||
231 | odebug << "Search Mails" << oendl; | 236 | odebug << "Search Mails" << oendl; |
232 | } | 237 | } |
233 | 238 | ||
234 | void OpieMail::slotEditSettings() | 239 | void OpieMail::slotEditSettings() |
235 | { | 240 | { |
236 | SettingsDialog settingsDialog( this, 0, true, WStyle_ContextHelp ); | 241 | SettingsDialog settingsDialog( this, 0, true, WStyle_ContextHelp ); |
237 | QPEApplication::execDialog( &settingsDialog ); | 242 | if (QPEApplication::execDialog( &settingsDialog )) { |
243 | Config cfg("mail"); | ||
244 | cfg.setGroup( "Settings" ); | ||
245 | m_clickopens = cfg.readBoolEntry("clickOpensMail",true); | ||
246 | emit settingsChanged(); | ||
247 | } | ||
238 | } | 248 | } |
239 | 249 | ||
240 | void OpieMail::slotEditAccounts() | 250 | void OpieMail::slotEditAccounts() |
241 | { | 251 | { |
242 | odebug << "Edit Accounts" << oendl; | 252 | odebug << "Edit Accounts" << oendl; |
243 | EditAccounts eaDialog( settings, this, 0, true, WStyle_ContextHelp ); | 253 | EditAccounts eaDialog( settings, this, 0, true, WStyle_ContextHelp ); |
@@ -339,12 +349,13 @@ void OpieMail::refreshMailView(const QValueList<RecMailP>&list) | |||
339 | item->showEntry(); | 349 | item->showEntry(); |
340 | } | 350 | } |
341 | } | 351 | } |
342 | 352 | ||
343 | void OpieMail::mailLeftClicked(int button, QListViewItem *item,const QPoint&,int ) | 353 | void OpieMail::mailLeftClicked(int button, QListViewItem *item,const QPoint&,int ) |
344 | { | 354 | { |
355 | if (!m_clickopens) return; | ||
345 | /* just LEFT button - or tap with stylus on pda */ | 356 | /* just LEFT button - or tap with stylus on pda */ |
346 | if (button!=1) return; | 357 | if (button!=1) return; |
347 | if (!item) return; | 358 | if (!item) return; |
348 | if (folderView->currentisDraft()) { | 359 | if (folderView->currentisDraft()) { |
349 | reEditMail(); | 360 | reEditMail(); |
350 | } else { | 361 | } else { |