summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/accountview.cpp11
-rw-r--r--noncore/net/mail/accountview.h2
-rw-r--r--noncore/net/mail/defines.h2
-rw-r--r--noncore/net/mail/mainwindow.cpp7
-rw-r--r--noncore/net/mail/mainwindow.h4
-rw-r--r--noncore/net/mail/opiemail.cpp13
-rw-r--r--noncore/net/mail/opiemail.h3
-rw-r--r--noncore/net/mail/settingsdialog.cpp4
-rw-r--r--noncore/net/mail/settingsdialogui.ui30
9 files changed, 69 insertions, 7 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
@@ -12,4 +12,5 @@
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 */
@@ -32,4 +33,5 @@ AccountView::AccountView( QWidget *parent, const char *name, WFlags flags )
32 SLOT( slotMouseClicked(QListViewItem*) ) ); 33 SLOT( slotMouseClicked(QListViewItem*) ) );
33 m_currentItem = 0; 34 m_currentItem = 0;
35 readSettings();
34} 36}
35 37
@@ -40,4 +42,11 @@ AccountView::~AccountView()
40} 42}
41 43
44void AccountView::readSettings()
45{
46 Config cfg("mail");
47 cfg.setGroup( "Settings" );
48 m_clickopens = cfg.readBoolEntry("clickOpensFolder",true);
49}
50
42void AccountView::slotSelectionChanged(QListViewItem*item) 51void AccountView::slotSelectionChanged(QListViewItem*item)
43{ 52{
@@ -99,5 +108,5 @@ 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;
diff --git a/noncore/net/mail/accountview.h b/noncore/net/mail/accountview.h
index 5c4b559..418f4f3 100644
--- a/noncore/net/mail/accountview.h
+++ b/noncore/net/mail/accountview.h
@@ -34,4 +34,5 @@ public slots:
34 virtual void refreshCurrent(); 34 virtual void refreshCurrent();
35 virtual void slotContextMenu(int id); 35 virtual void slotContextMenu(int id);
36 virtual void readSettings();
36 37
37 void setupFolderselect(Selectstore*sels); 38 void setupFolderselect(Selectstore*sels);
@@ -47,4 +48,5 @@ protected:
47 QValueList<MHviewItem*> mhAccounts; 48 QValueList<MHviewItem*> mhAccounts;
48 bool m_rightPressed:1; 49 bool m_rightPressed:1;
50 bool m_clickopens:1;
49 51
50protected slots: 52protected slots:
diff --git a/noncore/net/mail/defines.h b/noncore/net/mail/defines.h
index 5fcbf0f..50d63dd 100644
--- a/noncore/net/mail/defines.h
+++ b/noncore/net/mail/defines.h
@@ -18,4 +18,5 @@
18 18
19#define PIC_OFFLINE "mail/notconnected" 19#define PIC_OFFLINE "mail/notconnected"
20#define PIC_DOCUMENT "DocsIcon"
20 21
21#define ICON_COMPOSEMAIL QIconSet( Resource::loadPixmap( PIC_COMPOSEMAIL ) ) 22#define ICON_COMPOSEMAIL QIconSet( Resource::loadPixmap( PIC_COMPOSEMAIL ) )
@@ -26,4 +27,5 @@
26#define ICON_EDITACCOUNTS QIconSet( Resource::loadPixmap( PIC_EDITACCOUNTS ) ) 27#define ICON_EDITACCOUNTS QIconSet( Resource::loadPixmap( PIC_EDITACCOUNTS ) )
27#define ICON_SYNC QIconSet( Resource::loadPixmap( PIC_SYNC ) ) 28#define ICON_SYNC QIconSet( Resource::loadPixmap( PIC_SYNC ) )
29#define ICON_READMAIL QIconSet( Resource::loadPixmap( PIC_DOCUMENT))
28 30
29#define PIXMAP_IMAPFOLDER QPixmap( Resource::loadPixmap( PIC_IMAPFOLDER ) ) 31#define PIXMAP_IMAPFOLDER QPixmap( Resource::loadPixmap( PIC_IMAPFOLDER ) )
diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp
index 3689352..b587424 100644
--- a/noncore/net/mail/mainwindow.cpp
+++ b/noncore/net/mail/mainwindow.cpp
@@ -64,4 +64,9 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
64 toolBar->setStretchableWidget( spacer ); 64 toolBar->setStretchableWidget( spacer );
65 65
66 readMail = new QAction(tr("Read current mail"),ICON_READMAIL,0,0,this);
67 readMail->addTo(toolBar);
68 readMail->addTo(mailMenu);
69 connect(readMail,SIGNAL(activated()),this,SLOT(displayMail()));
70
66 composeMail = new QAction( tr( "Compose new mail" ), ICON_COMPOSEMAIL, 71 composeMail = new QAction( tr( "Compose new mail" ), ICON_COMPOSEMAIL,
67 0, 0, this ); 72 0, 0, this );
@@ -69,4 +74,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
69 composeMail->addTo( mailMenu ); 74 composeMail->addTo( mailMenu );
70 75
76
71 sendQueued = new QAction( tr( "Send queued mails" ), ICON_SENDQUEUED, 77 sendQueued = new QAction( tr( "Send queued mails" ), ICON_SENDQUEUED,
72 0, 0, this ); 78 0, 0, this );
@@ -123,4 +129,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
123 connect(serverMenu,SIGNAL(activated(int)),folderView,SLOT(slotContextMenu(int))); 129 connect(serverMenu,SIGNAL(activated(int)),folderView,SLOT(slotContextMenu(int)));
124 connect(folderMenu,SIGNAL(activated(int)),folderView,SLOT(slotContextMenu(int))); 130 connect(folderMenu,SIGNAL(activated(int)),folderView,SLOT(slotContextMenu(int)));
131 connect(this,SIGNAL(settingsChanged()),folderView,SLOT(readSettings()));
125 132
126 133
diff --git a/noncore/net/mail/mainwindow.h b/noncore/net/mail/mainwindow.h
index b781d62..6449ce8 100644
--- a/noncore/net/mail/mainwindow.h
+++ b/noncore/net/mail/mainwindow.h
@@ -50,5 +50,5 @@ protected:
50 50
51 QAction *composeMail, *sendQueued, *showFolders, *searchMails, *deleteMails, 51 QAction *composeMail, *sendQueued, *showFolders, *searchMails, *deleteMails,
52 *editSettings, *editAccounts, *syncFolders; 52 *editSettings, *editAccounts, *syncFolders,*readMail;
53 AccountView *folderView; 53 AccountView *folderView;
54 QListView *mailView; 54 QListView *mailView;
@@ -57,4 +57,6 @@ protected:
57 QCopChannel* m_sysChannel; 57 QCopChannel* m_sysChannel;
58 int m_ServerMenuId,m_FolderMenuId; 58 int m_ServerMenuId,m_FolderMenuId;
59signals:
60 void settingsChanged();
59}; 61};
60 62
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
@@ -16,4 +16,5 @@
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 */
@@ -107,4 +108,8 @@ OpieMail::OpieMail( QWidget *parent, const char *name, WFlags )
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() );
@@ -235,5 +240,10 @@ 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
@@ -343,4 +353,5 @@ void OpieMail::refreshMailView(const QValueList<RecMailP>&list)
343void OpieMail::mailLeftClicked(int button, QListViewItem *item,const QPoint&,int ) 353void 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;
diff --git a/noncore/net/mail/opiemail.h b/noncore/net/mail/opiemail.h
index 75a0b2d..327bef7 100644
--- a/noncore/net/mail/opiemail.h
+++ b/noncore/net/mail/opiemail.h
@@ -44,6 +44,9 @@ protected:
44 void setup_signalblocking(); 44 void setup_signalblocking();
45 45
46 bool m_clickopens:1;
47
46private: 48private:
47 Settings *settings; 49 Settings *settings;
50signals:
48 51
49}; 52};
diff --git a/noncore/net/mail/settingsdialog.cpp b/noncore/net/mail/settingsdialog.cpp
index 6441948..74b8b12 100644
--- a/noncore/net/mail/settingsdialog.cpp
+++ b/noncore/net/mail/settingsdialog.cpp
@@ -21,4 +21,6 @@ void SettingsDialog::readConfig() {
21 cfg.setGroup( "Settings" ); 21 cfg.setGroup( "Settings" );
22 showHtmlButton->setChecked( cfg.readBoolEntry( "showHtml", false ) ); 22 showHtmlButton->setChecked( cfg.readBoolEntry( "showHtml", false ) );
23 clickOpenMailButton->setChecked(cfg.readBoolEntry("clickOpensMail",true));
24 clickOpenFolderButton->setChecked(cfg.readBoolEntry("clickOpensFolder",true));
23 cfg.setGroup( "Compose" ); 25 cfg.setGroup( "Compose" );
24 checkBoxLater->setChecked( cfg.readBoolEntry( "sendLater", false ) ); 26 checkBoxLater->setChecked( cfg.readBoolEntry( "sendLater", false ) );
@@ -34,4 +36,6 @@ void SettingsDialog::writeConfig() {
34 Config cfg( "mail" ); 36 Config cfg( "mail" );
35 cfg.setGroup( "Settings" ); 37 cfg.setGroup( "Settings" );
38 cfg.writeEntry("clickOpensMail",clickOpenMailButton->isChecked());
39 cfg.writeEntry("clickOpensFolder",clickOpenFolderButton->isChecked());
36 cfg.writeEntry( "showHtml", showHtmlButton->isChecked() ); 40 cfg.writeEntry( "showHtml", showHtmlButton->isChecked() );
37 cfg.setGroup( "Compose" ); 41 cfg.setGroup( "Compose" );
diff --git a/noncore/net/mail/settingsdialogui.ui b/noncore/net/mail/settingsdialogui.ui
index 4acd84a..0a97da0 100644
--- a/noncore/net/mail/settingsdialogui.ui
+++ b/noncore/net/mail/settingsdialogui.ui
@@ -12,6 +12,6 @@
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>312</width> 14 <width>304</width>
15 <height>379</height> 15 <height>378</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
@@ -60,9 +60,9 @@
60 <property stdset="1"> 60 <property stdset="1">
61 <name>margin</name> 61 <name>margin</name>
62 <number>3</number> 62 <number>11</number>
63 </property> 63 </property>
64 <property stdset="1"> 64 <property stdset="1">
65 <name>spacing</name> 65 <name>spacing</name>
66 <number>3</number> 66 <number>6</number>
67 </property> 67 </property>
68 <widget> 68 <widget>
@@ -77,4 +77,26 @@
77 </property> 77 </property>
78 </widget> 78 </widget>
79 <widget>
80 <class>QCheckBox</class>
81 <property stdset="1">
82 <name>name</name>
83 <cstring>clickOpenMailButton</cstring>
84 </property>
85 <property stdset="1">
86 <name>text</name>
87 <string>Click opens mail</string>
88 </property>
89 </widget>
90 <widget>
91 <class>QCheckBox</class>
92 <property stdset="1">
93 <name>name</name>
94 <cstring>clickOpenFolderButton</cstring>
95 </property>
96 <property stdset="1">
97 <name>text</name>
98 <string>Click activate server/folder</string>
99 </property>
100 </widget>
79 <spacer> 101 <spacer>
80 <property> 102 <property>