summaryrefslogtreecommitdiff
authoralwin <alwin>2005-03-20 00:12:11 (UTC)
committer alwin <alwin>2005-03-20 00:12:11 (UTC)
commitbde8cf28573964aeb78fa9785cf1514cb8aa35a7 (patch) (unidiff)
treee91895f42ea3f9f5ac3d77128b8715b359ab54bf
parent9b608c7c967b2a22d4c6a8d8b98a4635d3b21204 (diff)
downloadopie-bde8cf28573964aeb78fa9785cf1514cb8aa35a7.zip
opie-bde8cf28573964aeb78fa9785cf1514cb8aa35a7.tar.gz
opie-bde8cf28573964aeb78fa9785cf1514cb8aa35a7.tar.bz2
user may switch open folders/mails on single-click
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
@@ -13,2 +13,3 @@
13#include <qpe/qpeapplication.h> 13#include <qpe/qpeapplication.h>
14#include <qpe/config.h>
14 15
@@ -33,2 +34,3 @@ AccountView::AccountView( QWidget *parent, const char *name, WFlags flags )
33 m_currentItem = 0; 34 m_currentItem = 0;
35 readSettings();
34} 36}
@@ -41,2 +43,9 @@ AccountView::~AccountView()
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)
@@ -100,3 +109,3 @@ void AccountView::slotMouseClicked(QListViewItem*item)
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 */
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
@@ -35,2 +35,3 @@ public slots:
35 virtual void slotContextMenu(int id); 35 virtual void slotContextMenu(int id);
36 virtual void readSettings();
36 37
@@ -48,2 +49,3 @@ protected:
48 bool m_rightPressed:1; 49 bool m_rightPressed:1;
50 bool m_clickopens:1;
49 51
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
@@ -19,2 +19,3 @@
19#define PIC_OFFLINE "mail/notconnected" 19#define PIC_OFFLINE "mail/notconnected"
20#define PIC_DOCUMENT "DocsIcon"
20 21
@@ -27,2 +28,3 @@
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
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
@@ -65,2 +65,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
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,
@@ -70,2 +75,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
70 75
76
71 sendQueued = new QAction( tr( "Send queued mails" ), ICON_SENDQUEUED, 77 sendQueued = new QAction( tr( "Send queued mails" ), ICON_SENDQUEUED,
@@ -124,2 +130,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
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
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
@@ -51,3 +51,3 @@ protected:
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;
@@ -58,2 +58,4 @@ protected:
58 int m_ServerMenuId,m_FolderMenuId; 58 int m_ServerMenuId,m_FolderMenuId;
59signals:
60 void settingsChanged();
59}; 61};
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
@@ -17,2 +17,3 @@
17#include <qpe/qpeapplication.h> 17#include <qpe/qpeapplication.h>
18#include <qpe/config.h>
18 19
@@ -108,2 +109,6 @@ OpieMail::OpieMail( QWidget *parent, const char *name, WFlags )
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();
@@ -236,3 +241,8 @@ void OpieMail::slotEditSettings()
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}
@@ -344,2 +354,3 @@ 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 */
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
@@ -45,4 +45,7 @@ protected:
45 45
46 bool m_clickopens:1;
47
46private: 48private:
47 Settings *settings; 49 Settings *settings;
50signals:
48 51
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
@@ -22,2 +22,4 @@ void SettingsDialog::readConfig() {
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" );
@@ -35,2 +37,4 @@ void SettingsDialog::writeConfig() {
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() );
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
@@ -13,4 +13,4 @@
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>
@@ -61,3 +61,3 @@
61 <name>margin</name> 61 <name>margin</name>
62 <number>3</number> 62 <number>11</number>
63 </property> 63 </property>
@@ -65,3 +65,3 @@
65 <name>spacing</name> 65 <name>spacing</name>
66 <number>3</number> 66 <number>6</number>
67 </property> 67 </property>
@@ -78,2 +78,24 @@
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>