author | groucho <groucho> | 2003-04-14 08:22:55 (UTC) |
---|---|---|
committer | groucho <groucho> | 2003-04-14 08:22:55 (UTC) |
commit | 4624a73cd100f860371fb01facea442737e9336e (patch) (unidiff) | |
tree | ae06cfd24013ca39816a5ca035605988f4033dcd /noncore/unsupported/mailit/addresslist.cpp | |
parent | 6d737040698a9c7ebc6492ba4234b64bf4db6c0b (diff) | |
download | opie-4624a73cd100f860371fb01facea442737e9336e.zip opie-4624a73cd100f860371fb01facea442737e9336e.tar.gz opie-4624a73cd100f860371fb01facea442737e9336e.tar.bz2 |
- Buttonlayout changed in attach dialog
- Removed file access for address list (reduces size)
- Added header size sping box for accounts
- mailit shows an icon in the message list if attachments are present
- Added translations in pro file
- Removed resource.* references in header files, uses qpe/resource.h instead
Diffstat (limited to 'noncore/unsupported/mailit/addresslist.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/mailit/addresslist.cpp | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/noncore/unsupported/mailit/addresslist.cpp b/noncore/unsupported/mailit/addresslist.cpp index 43e3830..9fe558a 100644 --- a/noncore/unsupported/mailit/addresslist.cpp +++ b/noncore/unsupported/mailit/addresslist.cpp | |||
@@ -24,17 +24,15 @@ | |||
24 | 24 | ||
25 | #include "addresslist.h" | 25 | #include "addresslist.h" |
26 | 26 | ||
27 | AddressList::AddressList(QString file) | 27 | AddressList::AddressList() |
28 | { | 28 | { |
29 | addresses.setAutoDelete(TRUE); | 29 | addresses.setAutoDelete(TRUE); |
30 | filename = file; | ||
31 | read(); | 30 | read(); |
32 | dirty = FALSE; | 31 | dirty = FALSE; |
33 | } | 32 | } |
34 | 33 | ||
35 | AddressList::~AddressList() | 34 | AddressList::~AddressList() |
36 | { | 35 | { |
37 | write(); | ||
38 | addresses.clear(); | 36 | addresses.clear(); |
39 | } | 37 | } |
40 | 38 | ||
@@ -120,7 +118,6 @@ void AddressList::read() | |||
120 | { | 118 | { |
121 | OContactAccess::List::Iterator it; | 119 | OContactAccess::List::Iterator it; |
122 | 120 | ||
123 | //QFile f(filename); | ||
124 | QString lineEmail, lineName, email, name; | 121 | QString lineEmail, lineName, email, name; |
125 | OContactAccess m_contactdb("mailit"); | 122 | OContactAccess m_contactdb("mailit"); |
126 | OContactAccess::List m_list = m_contactdb.sorted( true, 0, 0, 0 ); | 123 | OContactAccess::List m_list = m_contactdb.sorted( true, 0, 0, 0 ); |
@@ -162,20 +159,3 @@ QString AddressList::getRightString(QString in) | |||
162 | return out; | 159 | return out; |
163 | } | 160 | } |
164 | 161 | ||
165 | void AddressList::write() | ||
166 | { | ||
167 | if ( (addresses.count() == 0) || (!dirty) ) | ||
168 | return; | ||
169 | |||
170 | QFile f(filename); | ||
171 | if (! f.open(IO_WriteOnly) ) | ||
172 | return; | ||
173 | |||
174 | QTextStream stream(&f); | ||
175 | Contact *ptr; | ||
176 | for (ptr = addresses.first(); ptr != 0; ptr = addresses.next() ) { | ||
177 | stream << "email = " + ptr->email + "\n"; | ||
178 | stream << "name = " + ptr->name + "\n"; | ||
179 | } | ||
180 | f.close(); | ||
181 | } | ||