author | zautrix <zautrix> | 2004-09-11 08:56:57 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-11 08:56:57 (UTC) |
commit | 0f45c977d7530b6ca827b7a7c7da7469f01800ca (patch) (unidiff) | |
tree | 0368bbd4865a0b21bb197cfd0a190fd0c2cd9242 | |
parent | 1b41a0e3bf63364940daf132446939e3570c57ad (diff) | |
download | kdepimpi-0f45c977d7530b6ca827b7a7c7da7469f01800ca.zip kdepimpi-0f45c977d7530b6ca827b7a7c7da7469f01800ca.tar.gz kdepimpi-0f45c977d7530b6ca827b7a7c7da7469f01800ca.tar.bz2 |
More config changes
-rw-r--r-- | kmicromail/accountitem.cpp | 12 | ||||
-rw-r--r-- | kmicromail/accountitem.h | 1 | ||||
-rw-r--r-- | kmicromail/accountview.cpp | 27 | ||||
-rw-r--r-- | kmicromail/accountview.h | 1 | ||||
-rw-r--r-- | kmicromail/imapconfigui.ui | 506 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/settings.cpp | 14 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/settings.h | 4 | ||||
-rw-r--r-- | kmicromail/pop3configui.ui | 19 |
8 files changed, 434 insertions, 150 deletions
diff --git a/kmicromail/accountitem.cpp b/kmicromail/accountitem.cpp index d0321ef..1698b40 100644 --- a/kmicromail/accountitem.cpp +++ b/kmicromail/accountitem.cpp | |||
@@ -89,12 +89,13 @@ QPopupMenu * POP3viewItem::getContextMenu() | |||
89 | if (m) | 89 | if (m) |
90 | { | 90 | { |
91 | if (!account->getOffline()) | 91 | if (!account->getOffline()) |
92 | { | 92 | { |
93 | m->insertItem(QObject::tr("Disconnect",contextName),0); | 93 | m->insertItem(QObject::tr("Disconnect",contextName),0); |
94 | m->insertItem(QObject::tr("Set offline",contextName),1); | 94 | m->insertItem(QObject::tr("Set offline",contextName),1); |
95 | m->insertItem(QObject::tr("Download messages",contextName),2); | ||
95 | } | 96 | } |
96 | else | 97 | else |
97 | { | 98 | { |
98 | m->insertItem(QObject::tr("Set online",contextName),1); | 99 | m->insertItem(QObject::tr("Set online",contextName),1); |
99 | } | 100 | } |
100 | } | 101 | } |
@@ -132,12 +133,21 @@ void POP3viewItem::contextMenuSelected(int which) | |||
132 | case 0: | 133 | case 0: |
133 | disconnect(); | 134 | disconnect(); |
134 | break; | 135 | break; |
135 | case 1: | 136 | case 1: |
136 | setOnOffline(); | 137 | setOnOffline(); |
137 | break; | 138 | break; |
139 | case 2: // daunlood | ||
140 | AccountView*bl = accountView(); | ||
141 | if (!bl) return; | ||
142 | AccountViewItem* in = findSubItem( "inbox" , 0); | ||
143 | if ( ! in ) | ||
144 | return; | ||
145 | bl->downloadMailsInbox(in->getFolder() ,getWrapper()); | ||
146 | setOnOffline(); | ||
147 | break; | ||
138 | } | 148 | } |
139 | } | 149 | } |
140 | 150 | ||
141 | POP3folderItem::~POP3folderItem() | 151 | POP3folderItem::~POP3folderItem() |
142 | {} | 152 | {} |
143 | 153 | ||
@@ -1102,13 +1112,13 @@ void AccountViewItem::removeChilds() | |||
1102 | } | 1112 | } |
1103 | } | 1113 | } |
1104 | 1114 | ||
1105 | bool AccountViewItem::matchName(const QString&name)const | 1115 | bool AccountViewItem::matchName(const QString&name)const |
1106 | { | 1116 | { |
1107 | if (!folder) return false; | 1117 | if (!folder) return false; |
1108 | return folder->getDisplayName()==name; | 1118 | return folder->getDisplayName().lower()==name.lower(); |
1109 | } | 1119 | } |
1110 | 1120 | ||
1111 | 1121 | ||
1112 | AccountViewItem*AccountViewItem::findSubItem(const QString&path,AccountViewItem*start) | 1122 | AccountViewItem*AccountViewItem::findSubItem(const QString&path,AccountViewItem*start) |
1113 | { | 1123 | { |
1114 | AccountViewItem*pitem,*sitem; | 1124 | AccountViewItem*pitem,*sitem; |
diff --git a/kmicromail/accountitem.h b/kmicromail/accountitem.h index f125eeb..faf919d 100644 --- a/kmicromail/accountitem.h +++ b/kmicromail/accountitem.h | |||
@@ -33,12 +33,13 @@ public: | |||
33 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&)=0; | 33 | virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&)=0; |
34 | virtual QPopupMenu * getContextMenu(){return 0;}; | 34 | virtual QPopupMenu * getContextMenu(){return 0;}; |
35 | virtual void contextMenuSelected(int){} | 35 | virtual void contextMenuSelected(int){} |
36 | virtual AccountView*accountView(); | 36 | virtual AccountView*accountView(); |
37 | virtual bool matchName(const QString&name)const; | 37 | virtual bool matchName(const QString&name)const; |
38 | virtual bool isDraftfolder(); | 38 | virtual bool isDraftfolder(); |
39 | Opie::Core::OSmartPointer<Folder> getFolder() { return folder; }; | ||
39 | 40 | ||
40 | protected: | 41 | protected: |
41 | AccountViewItem*findSubItem(const QString&path,AccountViewItem*start=0); | 42 | AccountViewItem*findSubItem(const QString&path,AccountViewItem*start=0); |
42 | virtual void init(); | 43 | virtual void init(); |
43 | virtual void removeChilds(); | 44 | virtual void removeChilds(); |
44 | virtual void deleteAllMail(AbstractMail*wrapper,const Opie::Core::OSmartPointer<Folder>&f); | 45 | virtual void deleteAllMail(AbstractMail*wrapper,const Opie::Core::OSmartPointer<Folder>&f); |
diff --git a/kmicromail/accountview.cpp b/kmicromail/accountview.cpp index 4ead545..85523b1 100644 --- a/kmicromail/accountview.cpp +++ b/kmicromail/accountview.cpp | |||
@@ -136,12 +136,39 @@ void AccountView::setupFolderselect(Selectstore*sels) | |||
136 | if (imapAccounts[i]->offline()) | 136 | if (imapAccounts[i]->offline()) |
137 | continue; | 137 | continue; |
138 | imapAccounts[i]->refreshFolders(false); | 138 | imapAccounts[i]->refreshFolders(false); |
139 | sels->addAccounts(imapAccounts[i]->getWrapper(),imapAccounts[i]->subFolders()); | 139 | sels->addAccounts(imapAccounts[i]->getWrapper(),imapAccounts[i]->subFolders()); |
140 | } | 140 | } |
141 | } | 141 | } |
142 | void AccountView::downloadMailsInbox(const FolderP&fromFolder,AbstractMail*fromWrapper) | ||
143 | { | ||
144 | AbstractMail*targetMail = 0; | ||
145 | QString targetFolder = ""; | ||
146 | Selectstore sels; | ||
147 | setupFolderselect(&sels); | ||
148 | if (!sels.exec()) return; | ||
149 | targetMail = sels.currentMail(); | ||
150 | targetFolder = sels.currentFolder(); | ||
151 | if ( (fromWrapper==targetMail && fromFolder->getName()==targetFolder) || | ||
152 | targetFolder.isEmpty()) | ||
153 | { | ||
154 | return; | ||
155 | } | ||
156 | if (sels.newFolder() && !targetMail->createMbox(targetFolder)) | ||
157 | { | ||
158 | QMessageBox::critical(0,tr("Error creating new Folder"), | ||
159 | tr("<center>Error while creating<br>new folder - breaking.</center>")); | ||
160 | return; | ||
161 | } | ||
162 | int maxsize = 0; | ||
163 | if ( sels.useSize->isChecked()) | ||
164 | maxsize = sels.sizeSpinBox->value(); | ||
165 | |||
166 | fromWrapper->mvcpAllMails(fromFolder,targetFolder,targetMail,sels.moveMails(), maxsize); | ||
167 | refreshCurrent(); | ||
168 | } | ||
142 | 169 | ||
143 | void AccountView::downloadMails(const FolderP&fromFolder,AbstractMail*fromWrapper) | 170 | void AccountView::downloadMails(const FolderP&fromFolder,AbstractMail*fromWrapper) |
144 | { | 171 | { |
145 | AbstractMail*targetMail = 0; | 172 | AbstractMail*targetMail = 0; |
146 | QString targetFolder = ""; | 173 | QString targetFolder = ""; |
147 | Selectstore sels; | 174 | Selectstore sels; |
diff --git a/kmicromail/accountview.h b/kmicromail/accountview.h index 787b0b0..fcf33d1 100644 --- a/kmicromail/accountview.h +++ b/kmicromail/accountview.h | |||
@@ -20,12 +20,13 @@ class AccountView : public QListView | |||
20 | public: | 20 | public: |
21 | AccountView( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 ); | 21 | AccountView( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 ); |
22 | virtual ~AccountView(); | 22 | virtual ~AccountView(); |
23 | virtual void populate( QList<Account> list ); | 23 | virtual void populate( QList<Account> list ); |
24 | virtual RecBodyP fetchBody(const Opie::Core::OSmartPointer<RecMail>&aMail); | 24 | virtual RecBodyP fetchBody(const Opie::Core::OSmartPointer<RecMail>&aMail); |
25 | virtual void downloadMails(const Opie::Core::OSmartPointer<Folder>&fromFolder,AbstractMail*fromWrapper); | 25 | virtual void downloadMails(const Opie::Core::OSmartPointer<Folder>&fromFolder,AbstractMail*fromWrapper); |
26 | virtual void downloadMailsInbox(const Opie::Core::OSmartPointer<Folder>&fromFolder,AbstractMail*fromWrapper); | ||
26 | virtual bool currentisDraft(); | 27 | virtual bool currentisDraft(); |
27 | 28 | ||
28 | public slots: | 29 | public slots: |
29 | virtual void refreshAll(); | 30 | virtual void refreshAll(); |
30 | virtual void refresh(QListViewItem *item); | 31 | virtual void refresh(QListViewItem *item); |
31 | virtual void refreshCurrent(); | 32 | virtual void refreshCurrent(); |
diff --git a/kmicromail/imapconfigui.ui b/kmicromail/imapconfigui.ui index a96c1a2..2e4c9ca 100644 --- a/kmicromail/imapconfigui.ui +++ b/kmicromail/imapconfigui.ui | |||
@@ -8,173 +8,202 @@ | |||
8 | </property> | 8 | </property> |
9 | <property stdset="1"> | 9 | <property stdset="1"> |
10 | <name>geometry</name> | 10 | <name>geometry</name> |
11 | <rect> | 11 | <rect> |
12 | <x>0</x> | 12 | <x>0</x> |
13 | <y>0</y> | 13 | <y>0</y> |
14 | <width>425</width> | 14 | <width>306</width> |
15 | <height>428</height> | 15 | <height>396</height> |
16 | </rect> | 16 | </rect> |
17 | </property> | 17 | </property> |
18 | <property stdset="1"> | 18 | <property stdset="1"> |
19 | <name>caption</name> | 19 | <name>caption</name> |
20 | <string>Configure IMAP</string> | 20 | <string>Configure IMAP</string> |
21 | </property> | 21 | </property> |
22 | <property> | 22 | <property> |
23 | <name>layoutMargin</name> | 23 | <name>layoutMargin</name> |
24 | </property> | 24 | </property> |
25 | <property> | 25 | <property> |
26 | <name>layoutSpacing</name> | 26 | <name>layoutSpacing</name> |
27 | </property> | 27 | </property> |
28 | <grid> | 28 | <vbox> |
29 | <property stdset="1"> | 29 | <property stdset="1"> |
30 | <name>margin</name> | 30 | <name>margin</name> |
31 | <number>3</number> | 31 | <number>3</number> |
32 | </property> | 32 | </property> |
33 | <property stdset="1"> | 33 | <property stdset="1"> |
34 | <name>spacing</name> | 34 | <name>spacing</name> |
35 | <number>3</number> | 35 | <number>1</number> |
36 | </property> | 36 | </property> |
37 | <widget row="2" column="1" > | 37 | <widget> |
38 | <class>QLineEdit</class> | 38 | <class>QLayoutWidget</class> |
39 | <property stdset="1"> | 39 | <property stdset="1"> |
40 | <name>name</name> | 40 | <name>name</name> |
41 | <cstring>serverLine</cstring> | 41 | <cstring>Layout22</cstring> |
42 | </property> | 42 | </property> |
43 | </widget> | 43 | <hbox> |
44 | <widget row="3" column="0" > | 44 | <property stdset="1"> |
45 | <class>QLabel</class> | 45 | <name>margin</name> |
46 | <property stdset="1"> | 46 | <number>0</number> |
47 | <name>name</name> | 47 | </property> |
48 | <cstring>portLabel</cstring> | 48 | <property stdset="1"> |
49 | </property> | 49 | <name>spacing</name> |
50 | <property stdset="1"> | 50 | <number>6</number> |
51 | <name>text</name> | 51 | </property> |
52 | <string>Port</string> | 52 | <widget> |
53 | </property> | 53 | <class>QLabel</class> |
54 | <property stdset="1"> | ||
55 | <name>name</name> | ||
56 | <cstring>accountLabel</cstring> | ||
57 | </property> | ||
58 | <property stdset="1"> | ||
59 | <name>text</name> | ||
60 | <string>Account</string> | ||
61 | </property> | ||
62 | </widget> | ||
63 | <widget> | ||
64 | <class>QLineEdit</class> | ||
65 | <property stdset="1"> | ||
66 | <name>name</name> | ||
67 | <cstring>accountLine</cstring> | ||
68 | </property> | ||
69 | <property> | ||
70 | <name>toolTip</name> | ||
71 | <string>Name of the Account</string> | ||
72 | </property> | ||
73 | </widget> | ||
74 | </hbox> | ||
54 | </widget> | 75 | </widget> |
55 | <widget row="2" column="0" > | 76 | <widget> |
56 | <class>QLabel</class> | ||
57 | <property stdset="1"> | ||
58 | <name>name</name> | ||
59 | <cstring>serverLabel</cstring> | ||
60 | </property> | ||
61 | <property stdset="1"> | ||
62 | <name>text</name> | ||
63 | <string>Server</string> | ||
64 | </property> | ||
65 | </widget> | ||
66 | <widget row="3" column="1" > | ||
67 | <class>QLineEdit</class> | ||
68 | <property stdset="1"> | ||
69 | <name>name</name> | ||
70 | <cstring>portLine</cstring> | ||
71 | </property> | ||
72 | </widget> | ||
73 | <widget row="0" column="1" > | ||
74 | <class>QLineEdit</class> | ||
75 | <property stdset="1"> | ||
76 | <name>name</name> | ||
77 | <cstring>accountLine</cstring> | ||
78 | </property> | ||
79 | <property> | ||
80 | <name>toolTip</name> | ||
81 | <string>Name of the Account</string> | ||
82 | </property> | ||
83 | </widget> | ||
84 | <widget row="0" column="0" > | ||
85 | <class>QLabel</class> | ||
86 | <property stdset="1"> | ||
87 | <name>name</name> | ||
88 | <cstring>accountLabel</cstring> | ||
89 | </property> | ||
90 | <property stdset="1"> | ||
91 | <name>text</name> | ||
92 | <string>Account</string> | ||
93 | </property> | ||
94 | </widget> | ||
95 | <widget row="1" column="0" rowspan="1" colspan="2" > | ||
96 | <class>Line</class> | 77 | <class>Line</class> |
97 | <property stdset="1"> | 78 | <property stdset="1"> |
98 | <name>name</name> | 79 | <name>name</name> |
99 | <cstring>line1</cstring> | 80 | <cstring>line1</cstring> |
100 | </property> | 81 | </property> |
101 | <property stdset="1"> | 82 | <property stdset="1"> |
102 | <name>orientation</name> | 83 | <name>orientation</name> |
103 | <enum>Horizontal</enum> | 84 | <enum>Horizontal</enum> |
104 | </property> | 85 | </property> |
105 | </widget> | 86 | </widget> |
106 | <spacer row="12" column="1" > | 87 | <widget> |
107 | <property> | 88 | <class>QLayoutWidget</class> |
108 | <name>name</name> | ||
109 | <cstring>spacer</cstring> | ||
110 | </property> | ||
111 | <property stdset="1"> | ||
112 | <name>orientation</name> | ||
113 | <enum>Vertical</enum> | ||
114 | </property> | ||
115 | <property stdset="1"> | ||
116 | <name>sizeType</name> | ||
117 | <enum>Expanding</enum> | ||
118 | </property> | ||
119 | <property> | ||
120 | <name>sizeHint</name> | ||
121 | <size> | ||
122 | <width>20</width> | ||
123 | <height>20</height> | ||
124 | </size> | ||
125 | </property> | ||
126 | </spacer> | ||
127 | <widget row="8" column="1" > | ||
128 | <class>QLineEdit</class> | ||
129 | <property stdset="1"> | 89 | <property stdset="1"> |
130 | <name>name</name> | 90 | <name>name</name> |
131 | <cstring>userLine</cstring> | 91 | <cstring>Layout23</cstring> |
132 | </property> | 92 | </property> |
133 | </widget> | 93 | <hbox> |
134 | <widget row="9" column="1" > | 94 | <property stdset="1"> |
135 | <class>QLineEdit</class> | 95 | <name>margin</name> |
136 | <property stdset="1"> | 96 | <number>0</number> |
137 | <name>name</name> | 97 | </property> |
138 | <cstring>passLine</cstring> | 98 | <property stdset="1"> |
139 | </property> | 99 | <name>spacing</name> |
140 | <property stdset="1"> | 100 | <number>6</number> |
141 | <name>echoMode</name> | 101 | </property> |
142 | <enum>Password</enum> | 102 | <widget> |
143 | </property> | 103 | <class>QLabel</class> |
144 | </widget> | 104 | <property stdset="1"> |
145 | <widget row="11" column="0" > | 105 | <name>name</name> |
146 | <class>QLabel</class> | 106 | <cstring>serverLabel</cstring> |
147 | <property stdset="1"> | 107 | </property> |
148 | <name>name</name> | 108 | <property stdset="1"> |
149 | <cstring>prefixLabel</cstring> | 109 | <name>text</name> |
150 | </property> | 110 | <string>Server</string> |
151 | <property stdset="1"> | 111 | </property> |
152 | <name>text</name> | 112 | </widget> |
153 | <string>Prefix</string> | 113 | <widget> |
154 | </property> | 114 | <class>QLineEdit</class> |
115 | <property stdset="1"> | ||
116 | <name>name</name> | ||
117 | <cstring>serverLine</cstring> | ||
118 | </property> | ||
119 | </widget> | ||
120 | </hbox> | ||
155 | </widget> | 121 | </widget> |
156 | <widget row="11" column="1" > | 122 | <widget> |
157 | <class>QLineEdit</class> | 123 | <class>QLayoutWidget</class> |
158 | <property stdset="1"> | 124 | <property stdset="1"> |
159 | <name>name</name> | 125 | <name>name</name> |
160 | <cstring>prefixLine</cstring> | 126 | <cstring>Layout24</cstring> |
161 | </property> | 127 | </property> |
128 | <hbox> | ||
129 | <property stdset="1"> | ||
130 | <name>margin</name> | ||
131 | <number>0</number> | ||
132 | </property> | ||
133 | <property stdset="1"> | ||
134 | <name>spacing</name> | ||
135 | <number>6</number> | ||
136 | </property> | ||
137 | <widget> | ||
138 | <class>QLabel</class> | ||
139 | <property stdset="1"> | ||
140 | <name>name</name> | ||
141 | <cstring>portLabel</cstring> | ||
142 | </property> | ||
143 | <property stdset="1"> | ||
144 | <name>text</name> | ||
145 | <string>Port</string> | ||
146 | </property> | ||
147 | </widget> | ||
148 | <widget> | ||
149 | <class>QLineEdit</class> | ||
150 | <property stdset="1"> | ||
151 | <name>name</name> | ||
152 | <cstring>portLine</cstring> | ||
153 | </property> | ||
154 | </widget> | ||
155 | </hbox> | ||
162 | </widget> | 156 | </widget> |
163 | <widget row="8" column="0" > | 157 | <widget> |
164 | <class>QLabel</class> | 158 | <class>QLayoutWidget</class> |
165 | <property stdset="1"> | 159 | <property stdset="1"> |
166 | <name>name</name> | 160 | <name>name</name> |
167 | <cstring>userLabel</cstring> | 161 | <cstring>Layout16</cstring> |
168 | </property> | 162 | </property> |
169 | <property stdset="1"> | 163 | <vbox> |
170 | <name>text</name> | 164 | <property stdset="1"> |
171 | <string>User</string> | 165 | <name>margin</name> |
172 | </property> | 166 | <number>0</number> |
167 | </property> | ||
168 | <property stdset="1"> | ||
169 | <name>spacing</name> | ||
170 | <number>6</number> | ||
171 | </property> | ||
172 | <widget> | ||
173 | <class>QLabel</class> | ||
174 | <property stdset="1"> | ||
175 | <name>name</name> | ||
176 | <cstring>TextLabel1</cstring> | ||
177 | </property> | ||
178 | <property stdset="1"> | ||
179 | <name>text</name> | ||
180 | <string>Use secure sockets:</string> | ||
181 | </property> | ||
182 | </widget> | ||
183 | <widget> | ||
184 | <class>QComboBox</class> | ||
185 | <property stdset="1"> | ||
186 | <name>name</name> | ||
187 | <cstring>ComboBox1</cstring> | ||
188 | </property> | ||
189 | </widget> | ||
190 | <widget> | ||
191 | <class>QLineEdit</class> | ||
192 | <property stdset="1"> | ||
193 | <name>name</name> | ||
194 | <cstring>CommandEdit</cstring> | ||
195 | </property> | ||
196 | <property stdset="1"> | ||
197 | <name>text</name> | ||
198 | <string>ssh $SERVER exec</string> | ||
199 | </property> | ||
200 | </widget> | ||
201 | </vbox> | ||
173 | </widget> | 202 | </widget> |
174 | <widget row="7" column="0" rowspan="1" colspan="2" > | 203 | <widget> |
175 | <class>Line</class> | 204 | <class>Line</class> |
176 | <property stdset="1"> | 205 | <property stdset="1"> |
177 | <name>name</name> | 206 | <name>name</name> |
178 | <cstring>line2</cstring> | 207 | <cstring>line2</cstring> |
179 | </property> | 208 | </property> |
180 | <property stdset="1"> | 209 | <property stdset="1"> |
@@ -193,64 +222,251 @@ | |||
193 | <name>layoutMargin</name> | 222 | <name>layoutMargin</name> |
194 | </property> | 223 | </property> |
195 | <property> | 224 | <property> |
196 | <name>layoutSpacing</name> | 225 | <name>layoutSpacing</name> |
197 | </property> | 226 | </property> |
198 | </widget> | 227 | </widget> |
199 | <widget row="10" column="0" rowspan="1" colspan="2" > | 228 | <widget> |
229 | <class>QLayoutWidget</class> | ||
230 | <property stdset="1"> | ||
231 | <name>name</name> | ||
232 | <cstring>Layout25</cstring> | ||
233 | </property> | ||
234 | <hbox> | ||
235 | <property stdset="1"> | ||
236 | <name>margin</name> | ||
237 | <number>0</number> | ||
238 | </property> | ||
239 | <property stdset="1"> | ||
240 | <name>spacing</name> | ||
241 | <number>6</number> | ||
242 | </property> | ||
243 | <widget> | ||
244 | <class>QLabel</class> | ||
245 | <property stdset="1"> | ||
246 | <name>name</name> | ||
247 | <cstring>userLabel</cstring> | ||
248 | </property> | ||
249 | <property stdset="1"> | ||
250 | <name>text</name> | ||
251 | <string>User</string> | ||
252 | </property> | ||
253 | </widget> | ||
254 | <widget> | ||
255 | <class>QLineEdit</class> | ||
256 | <property stdset="1"> | ||
257 | <name>name</name> | ||
258 | <cstring>userLine</cstring> | ||
259 | </property> | ||
260 | </widget> | ||
261 | </hbox> | ||
262 | </widget> | ||
263 | <widget> | ||
264 | <class>QLayoutWidget</class> | ||
265 | <property stdset="1"> | ||
266 | <name>name</name> | ||
267 | <cstring>Layout26</cstring> | ||
268 | </property> | ||
269 | <hbox> | ||
270 | <property stdset="1"> | ||
271 | <name>margin</name> | ||
272 | <number>0</number> | ||
273 | </property> | ||
274 | <property stdset="1"> | ||
275 | <name>spacing</name> | ||
276 | <number>6</number> | ||
277 | </property> | ||
278 | <widget> | ||
279 | <class>QLabel</class> | ||
280 | <property stdset="1"> | ||
281 | <name>name</name> | ||
282 | <cstring>passLabel</cstring> | ||
283 | </property> | ||
284 | <property stdset="1"> | ||
285 | <name>text</name> | ||
286 | <string>Password</string> | ||
287 | </property> | ||
288 | </widget> | ||
289 | <widget> | ||
290 | <class>QLineEdit</class> | ||
291 | <property stdset="1"> | ||
292 | <name>name</name> | ||
293 | <cstring>passLine</cstring> | ||
294 | </property> | ||
295 | <property stdset="1"> | ||
296 | <name>echoMode</name> | ||
297 | <enum>Password</enum> | ||
298 | </property> | ||
299 | </widget> | ||
300 | </hbox> | ||
301 | </widget> | ||
302 | <widget> | ||
200 | <class>Line</class> | 303 | <class>Line</class> |
201 | <property stdset="1"> | 304 | <property stdset="1"> |
202 | <name>name</name> | 305 | <name>name</name> |
203 | <cstring>Line3</cstring> | 306 | <cstring>Line3</cstring> |
204 | </property> | 307 | </property> |
205 | <property stdset="1"> | 308 | <property stdset="1"> |
206 | <name>orientation</name> | 309 | <name>orientation</name> |
207 | <enum>Horizontal</enum> | 310 | <enum>Horizontal</enum> |
208 | </property> | 311 | </property> |
209 | </widget> | 312 | </widget> |
210 | <widget row="9" column="0" > | 313 | <widget> |
211 | <class>QLabel</class> | 314 | <class>QLayoutWidget</class> |
212 | <property stdset="1"> | 315 | <property stdset="1"> |
213 | <name>name</name> | 316 | <name>name</name> |
214 | <cstring>passLabel</cstring> | 317 | <cstring>Layout27</cstring> |
215 | </property> | 318 | </property> |
319 | <hbox> | ||
320 | <property stdset="1"> | ||
321 | <name>margin</name> | ||
322 | <number>0</number> | ||
323 | </property> | ||
324 | <property stdset="1"> | ||
325 | <name>spacing</name> | ||
326 | <number>6</number> | ||
327 | </property> | ||
328 | <widget> | ||
329 | <class>QLabel</class> | ||
330 | <property stdset="1"> | ||
331 | <name>name</name> | ||
332 | <cstring>prefixLabel</cstring> | ||
333 | </property> | ||
334 | <property stdset="1"> | ||
335 | <name>text</name> | ||
336 | <string>Prefix</string> | ||
337 | </property> | ||
338 | </widget> | ||
339 | <widget> | ||
340 | <class>QLineEdit</class> | ||
341 | <property stdset="1"> | ||
342 | <name>name</name> | ||
343 | <cstring>prefixLine</cstring> | ||
344 | </property> | ||
345 | </widget> | ||
346 | </hbox> | ||
347 | </widget> | ||
348 | <widget> | ||
349 | <class>QLayoutWidget</class> | ||
216 | <property stdset="1"> | 350 | <property stdset="1"> |
217 | <name>text</name> | 351 | <name>name</name> |
218 | <string>Password</string> | 352 | <cstring>Layout11</cstring> |
219 | </property> | 353 | </property> |
354 | <hbox> | ||
355 | <property stdset="1"> | ||
356 | <name>margin</name> | ||
357 | <number>0</number> | ||
358 | </property> | ||
359 | <property stdset="1"> | ||
360 | <name>spacing</name> | ||
361 | <number>6</number> | ||
362 | </property> | ||
363 | <widget> | ||
364 | <class>QLabel</class> | ||
365 | <property stdset="1"> | ||
366 | <name>name</name> | ||
367 | <cstring>TextLabel1_2</cstring> | ||
368 | </property> | ||
369 | <property stdset="1"> | ||
370 | <name>text</name> | ||
371 | <string>Local storage folder:</string> | ||
372 | </property> | ||
373 | </widget> | ||
374 | <widget> | ||
375 | <class>QLineEdit</class> | ||
376 | <property stdset="1"> | ||
377 | <name>name</name> | ||
378 | <cstring>localFolder</cstring> | ||
379 | </property> | ||
380 | <property stdset="1"> | ||
381 | <name>text</name> | ||
382 | <string></string> | ||
383 | </property> | ||
384 | </widget> | ||
385 | </hbox> | ||
386 | </widget> | ||
387 | <widget> | ||
388 | <class>QLayoutWidget</class> | ||
389 | <property stdset="1"> | ||
390 | <name>name</name> | ||
391 | <cstring>Layout12</cstring> | ||
392 | </property> | ||
393 | <hbox> | ||
394 | <property stdset="1"> | ||
395 | <name>margin</name> | ||
396 | <number>0</number> | ||
397 | </property> | ||
398 | <property stdset="1"> | ||
399 | <name>spacing</name> | ||
400 | <number>6</number> | ||
401 | </property> | ||
402 | <widget> | ||
403 | <class>QCheckBox</class> | ||
404 | <property stdset="1"> | ||
405 | <name>name</name> | ||
406 | <cstring>CheckBoxDown</cstring> | ||
407 | </property> | ||
408 | <property stdset="1"> | ||
409 | <name>text</name> | ||
410 | <string>Download only messages smaller</string> | ||
411 | </property> | ||
412 | </widget> | ||
413 | <widget> | ||
414 | <class>QSpinBox</class> | ||
415 | <property stdset="1"> | ||
416 | <name>name</name> | ||
417 | <cstring>SpinBoxDown</cstring> | ||
418 | </property> | ||
419 | <property stdset="1"> | ||
420 | <name>suffix</name> | ||
421 | <string>kB</string> | ||
422 | </property> | ||
423 | <property stdset="1"> | ||
424 | <name>maxValue</name> | ||
425 | <number>99999</number> | ||
426 | </property> | ||
427 | <property stdset="1"> | ||
428 | <name>minValue</name> | ||
429 | <number>1</number> | ||
430 | </property> | ||
431 | </widget> | ||
432 | </hbox> | ||
220 | </widget> | 433 | </widget> |
221 | <widget row="6" column="0" rowspan="1" colspan="2" > | 434 | <widget> |
222 | <class>QLineEdit</class> | 435 | <class>QCheckBox</class> |
223 | <property stdset="1"> | 436 | <property stdset="1"> |
224 | <name>name</name> | 437 | <name>name</name> |
225 | <cstring>CommandEdit</cstring> | 438 | <cstring>CheckBoxLeaveOn</cstring> |
226 | </property> | 439 | </property> |
227 | <property stdset="1"> | 440 | <property stdset="1"> |
228 | <name>text</name> | 441 | <name>text</name> |
229 | <string>ssh $SERVER exec</string> | 442 | <string>Leave Messages on Server</string> |
230 | </property> | 443 | </property> |
231 | </widget> | 444 | </widget> |
232 | <widget row="5" column="0" rowspan="1" colspan="2" > | 445 | <spacer> |
233 | <class>QComboBox</class> | 446 | <property> |
234 | <property stdset="1"> | ||
235 | <name>name</name> | 447 | <name>name</name> |
236 | <cstring>ComboBox1</cstring> | 448 | <cstring>spacer</cstring> |
237 | </property> | 449 | </property> |
238 | </widget> | ||
239 | <widget row="4" column="0" rowspan="1" colspan="2" > | ||
240 | <class>QLabel</class> | ||
241 | <property stdset="1"> | 450 | <property stdset="1"> |
242 | <name>name</name> | 451 | <name>orientation</name> |
243 | <cstring>TextLabel1</cstring> | 452 | <enum>Vertical</enum> |
244 | </property> | 453 | </property> |
245 | <property stdset="1"> | 454 | <property stdset="1"> |
246 | <name>text</name> | 455 | <name>sizeType</name> |
247 | <string>Use secure sockets:</string> | 456 | <enum>Expanding</enum> |
248 | </property> | 457 | </property> |
249 | </widget> | 458 | <property> |
250 | </grid> | 459 | <name>sizeHint</name> |
460 | <size> | ||
461 | <width>20</width> | ||
462 | <height>20</height> | ||
463 | </size> | ||
464 | </property> | ||
465 | </spacer> | ||
466 | </vbox> | ||
251 | </widget> | 467 | </widget> |
252 | <tabstops> | 468 | <tabstops> |
253 | <tabstop>accountLine</tabstop> | 469 | <tabstop>accountLine</tabstop> |
254 | <tabstop>serverLine</tabstop> | 470 | <tabstop>serverLine</tabstop> |
255 | <tabstop>portLine</tabstop> | 471 | <tabstop>portLine</tabstop> |
256 | <tabstop>userLine</tabstop> | 472 | <tabstop>userLine</tabstop> |
diff --git a/kmicromail/libmailwrapper/settings.cpp b/kmicromail/libmailwrapper/settings.cpp index 90e32fa..f996d9c 100644 --- a/kmicromail/libmailwrapper/settings.cpp +++ b/kmicromail/libmailwrapper/settings.cpp | |||
@@ -174,12 +174,18 @@ void IMAPaccount::read() | |||
174 | if (user.isNull()) user = ""; | 174 | if (user.isNull()) user = ""; |
175 | password = conf->readEntryCrypt( "Password","" ); | 175 | password = conf->readEntryCrypt( "Password","" ); |
176 | if (password.isNull()) password = ""; | 176 | if (password.isNull()) password = ""; |
177 | prefix = conf->readEntry("MailPrefix",""); | 177 | prefix = conf->readEntry("MailPrefix",""); |
178 | if (prefix.isNull()) prefix = ""; | 178 | if (prefix.isNull()) prefix = ""; |
179 | offline = conf->readBoolEntry("Offline",false); | 179 | offline = conf->readBoolEntry("Offline",false); |
180 | localFolder = conf->readEntry( "LocalFolder" ); | ||
181 | maxMailSize = conf->readNumEntry( "MaxSize",0 ); | ||
182 | int lf = conf->readNumEntry( "LastFetch",0 ); | ||
183 | QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) ); | ||
184 | leaveOnServer = conf->readBoolEntry("LeaveOnServer",false); | ||
185 | lastFetch = dt.addSecs( lf ); | ||
180 | delete conf; | 186 | delete conf; |
181 | } | 187 | } |
182 | 188 | ||
183 | void IMAPaccount::save() | 189 | void IMAPaccount::save() |
184 | { | 190 | { |
185 | qDebug("saving %s ",getFileName().latin1() ); | 191 | qDebug("saving %s ",getFileName().latin1() ); |
@@ -193,12 +199,18 @@ void IMAPaccount::save() | |||
193 | conf->writeEntry( "SSL", ssl ); | 199 | conf->writeEntry( "SSL", ssl ); |
194 | conf->writeEntry( "ConnectionType", connectionType ); | 200 | conf->writeEntry( "ConnectionType", connectionType ); |
195 | conf->writeEntry( "User", user ); | 201 | conf->writeEntry( "User", user ); |
196 | conf->writeEntryCrypt( "Password", password ); | 202 | conf->writeEntryCrypt( "Password", password ); |
197 | conf->writeEntry( "MailPrefix",prefix); | 203 | conf->writeEntry( "MailPrefix",prefix); |
198 | conf->writeEntry( "Offline",offline); | 204 | conf->writeEntry( "Offline",offline); |
205 | conf->writeEntry( "LocalFolder", localFolder ); | ||
206 | conf->writeEntry( "MaxSize", maxMailSize ); | ||
207 | QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) ); | ||
208 | int lf = dt.secsTo ( lastFetch ); | ||
209 | conf->writeEntry( "LastFetch", lf ); | ||
210 | conf->writeEntry( "LeaveOnServer", leaveOnServer); | ||
199 | conf->write(); | 211 | conf->write(); |
200 | delete conf; | 212 | delete conf; |
201 | } | 213 | } |
202 | 214 | ||
203 | 215 | ||
204 | QString IMAPaccount::getFileName() | 216 | QString IMAPaccount::getFileName() |
@@ -256,12 +268,13 @@ void POP3account::read() | |||
256 | password = conf->readEntryCrypt( "Password" ); | 268 | password = conf->readEntryCrypt( "Password" ); |
257 | offline = conf->readBoolEntry("Offline",false); | 269 | offline = conf->readBoolEntry("Offline",false); |
258 | localFolder = conf->readEntry( "LocalFolder" ); | 270 | localFolder = conf->readEntry( "LocalFolder" ); |
259 | maxMailSize = conf->readNumEntry( "MaxSize",0 ); | 271 | maxMailSize = conf->readNumEntry( "MaxSize",0 ); |
260 | int lf = conf->readNumEntry( "LastFetch",0 ); | 272 | int lf = conf->readNumEntry( "LastFetch",0 ); |
261 | QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) ); | 273 | QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) ); |
274 | leaveOnServer = conf->readBoolEntry("LeaveOnServer",false); | ||
262 | lastFetch = dt.addSecs( lf ); | 275 | lastFetch = dt.addSecs( lf ); |
263 | delete conf; | 276 | delete conf; |
264 | } | 277 | } |
265 | 278 | ||
266 | void POP3account::save() | 279 | void POP3account::save() |
267 | { | 280 | { |
@@ -279,12 +292,13 @@ void POP3account::save() | |||
279 | conf->writeEntry( "Offline",offline); | 292 | conf->writeEntry( "Offline",offline); |
280 | conf->writeEntry( "LocalFolder", localFolder ); | 293 | conf->writeEntry( "LocalFolder", localFolder ); |
281 | conf->writeEntry( "MaxSize", maxMailSize ); | 294 | conf->writeEntry( "MaxSize", maxMailSize ); |
282 | QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) ); | 295 | QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) ); |
283 | int lf = dt.secsTo ( lastFetch ); | 296 | int lf = dt.secsTo ( lastFetch ); |
284 | conf->writeEntry( "LastFetch", lf ); | 297 | conf->writeEntry( "LastFetch", lf ); |
298 | conf->writeEntry( "LeaveOnServer", leaveOnServer); | ||
285 | conf->write(); | 299 | conf->write(); |
286 | delete conf; | 300 | delete conf; |
287 | } | 301 | } |
288 | 302 | ||
289 | 303 | ||
290 | QString POP3account::getFileName() | 304 | QString POP3account::getFileName() |
diff --git a/kmicromail/libmailwrapper/settings.h b/kmicromail/libmailwrapper/settings.h index c33c403..85b817c 100644 --- a/kmicromail/libmailwrapper/settings.h +++ b/kmicromail/libmailwrapper/settings.h | |||
@@ -46,12 +46,15 @@ public: | |||
46 | void setMaxMailSize( int x ) { maxMailSize = x; } | 46 | void setMaxMailSize( int x ) { maxMailSize = x; } |
47 | int getMaxMailSize() { return maxMailSize; } | 47 | int getMaxMailSize() { return maxMailSize; } |
48 | 48 | ||
49 | void setOffline(bool b) {offline = b;} | 49 | void setOffline(bool b) {offline = b;} |
50 | bool getOffline()const{return offline;} | 50 | bool getOffline()const{return offline;} |
51 | 51 | ||
52 | bool getLeaveOnServer(){ return leaveOnServer;} | ||
53 | void setLeaveOnServer(bool b){ leaveOnServer = b;} | ||
54 | |||
52 | virtual QString getFileName() { return accountName; } | 55 | virtual QString getFileName() { return accountName; } |
53 | virtual void read() { ; } | 56 | virtual void read() { ; } |
54 | virtual void save() { ; } | 57 | virtual void save() { ; } |
55 | 58 | ||
56 | protected: | 59 | protected: |
57 | QString accountName, server, port, user, password; | 60 | QString accountName, server, port, user, password; |
@@ -59,12 +62,13 @@ protected: | |||
59 | int connectionType; | 62 | int connectionType; |
60 | bool offline; | 63 | bool offline; |
61 | MAILLIB::ATYPE type; | 64 | MAILLIB::ATYPE type; |
62 | QString localFolder; | 65 | QString localFolder; |
63 | int maxMailSize; | 66 | int maxMailSize; |
64 | QDateTime lastFetch; | 67 | QDateTime lastFetch; |
68 | bool leaveOnServer; | ||
65 | }; | 69 | }; |
66 | 70 | ||
67 | class IMAPaccount : public Account | 71 | class IMAPaccount : public Account |
68 | { | 72 | { |
69 | 73 | ||
70 | public: | 74 | public: |
diff --git a/kmicromail/pop3configui.ui b/kmicromail/pop3configui.ui index a2d43bd..6acd394 100644 --- a/kmicromail/pop3configui.ui +++ b/kmicromail/pop3configui.ui | |||
@@ -8,14 +8,14 @@ | |||
8 | </property> | 8 | </property> |
9 | <property stdset="1"> | 9 | <property stdset="1"> |
10 | <name>geometry</name> | 10 | <name>geometry</name> |
11 | <rect> | 11 | <rect> |
12 | <x>0</x> | 12 | <x>0</x> |
13 | <y>0</y> | 13 | <y>0</y> |
14 | <width>322</width> | 14 | <width>306</width> |
15 | <height>404</height> | 15 | <height>371</height> |
16 | </rect> | 16 | </rect> |
17 | </property> | 17 | </property> |
18 | <property stdset="1"> | 18 | <property stdset="1"> |
19 | <name>caption</name> | 19 | <name>caption</name> |
20 | <string>Configure POP3</string> | 20 | <string>Configure POP3</string> |
21 | </property> | 21 | </property> |
@@ -25,17 +25,17 @@ | |||
25 | <property> | 25 | <property> |
26 | <name>layoutSpacing</name> | 26 | <name>layoutSpacing</name> |
27 | </property> | 27 | </property> |
28 | <vbox> | 28 | <vbox> |
29 | <property stdset="1"> | 29 | <property stdset="1"> |
30 | <name>margin</name> | 30 | <name>margin</name> |
31 | <number>11</number> | 31 | <number>3</number> |
32 | </property> | 32 | </property> |
33 | <property stdset="1"> | 33 | <property stdset="1"> |
34 | <name>spacing</name> | 34 | <name>spacing</name> |
35 | <number>6</number> | 35 | <number>1</number> |
36 | </property> | 36 | </property> |
37 | <widget> | 37 | <widget> |
38 | <class>QLayoutWidget</class> | 38 | <class>QLayoutWidget</class> |
39 | <property stdset="1"> | 39 | <property stdset="1"> |
40 | <name>name</name> | 40 | <name>name</name> |
41 | <cstring>Layout12</cstring> | 41 | <cstring>Layout12</cstring> |
@@ -402,12 +402,23 @@ | |||
402 | <name>minValue</name> | 402 | <name>minValue</name> |
403 | <number>1</number> | 403 | <number>1</number> |
404 | </property> | 404 | </property> |
405 | </widget> | 405 | </widget> |
406 | </hbox> | 406 | </hbox> |
407 | </widget> | 407 | </widget> |
408 | <widget> | ||
409 | <class>QCheckBox</class> | ||
410 | <property stdset="1"> | ||
411 | <name>name</name> | ||
412 | <cstring>CheckBoxLeaveOn</cstring> | ||
413 | </property> | ||
414 | <property stdset="1"> | ||
415 | <name>text</name> | ||
416 | <string>Leave Messages on Server</string> | ||
417 | </property> | ||
418 | </widget> | ||
408 | <spacer> | 419 | <spacer> |
409 | <property> | 420 | <property> |
410 | <name>name</name> | 421 | <name>name</name> |
411 | <cstring>spacer</cstring> | 422 | <cstring>spacer</cstring> |
412 | </property> | 423 | </property> |
413 | <property stdset="1"> | 424 | <property stdset="1"> |