author | alwin <alwin> | 2005-03-07 23:12:51 (UTC) |
---|---|---|
committer | alwin <alwin> | 2005-03-07 23:12:51 (UTC) |
commit | 2ba21de3fce9ca9fe9a70474a1927f0106d1d7ce (patch) (unidiff) | |
tree | d0ff8c035e34a83fbc935c8f3f6ab926ed432559 /noncore/net/mail/opiemail.cpp | |
parent | a1fab1e1abd009a6a64c7ea3957bdb5587f4be81 (diff) | |
download | opie-2ba21de3fce9ca9fe9a70474a1927f0106d1d7ce.zip opie-2ba21de3fce9ca9fe9a70474a1927f0106d1d7ce.tar.gz opie-2ba21de3fce9ca9fe9a70474a1927f0106d1d7ce.tar.bz2 |
beauty
hopefull some speedups
obsolete stuff removed
fixed a crasher
-rw-r--r-- | noncore/net/mail/opiemail.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/noncore/net/mail/opiemail.cpp b/noncore/net/mail/opiemail.cpp index 2bbc8f1..9eba23e 100644 --- a/noncore/net/mail/opiemail.cpp +++ b/noncore/net/mail/opiemail.cpp | |||
@@ -98,32 +98,25 @@ void ValueExplode::splitit() | |||
98 | m_LastParsed.append(tkeyvalues(iLine.mid(startpos),"")); | 98 | m_LastParsed.append(tkeyvalues(iLine.mid(startpos),"")); |
99 | } else { | 99 | } else { |
100 | m_LastParsed.append(tkeyvalues(iLine.mid(startpos,pos2-startpos),iLine.mid(pos2+1))); | 100 | m_LastParsed.append(tkeyvalues(iLine.mid(startpos,pos2-startpos),iLine.mid(pos2+1))); |
101 | } | 101 | } |
102 | } | 102 | } |
103 | } | 103 | } |
104 | 104 | ||
105 | OpieMail::OpieMail( QWidget *parent, const char *name, WFlags ) | 105 | OpieMail::OpieMail( QWidget *parent, const char *name, WFlags ) |
106 | : MainWindow( parent, name, WStyle_ContextHelp ) | 106 | : MainWindow( parent, name, WStyle_ContextHelp ) |
107 | { | 107 | { |
108 | setup_signalblocking(); | 108 | setup_signalblocking(); |
109 | settings = new Settings(); | 109 | settings = new Settings(); |
110 | |||
111 | folderView->populate( settings->getAccounts() ); | 110 | folderView->populate( settings->getAccounts() ); |
112 | #if 0 | ||
113 | tvaluelist s = ValueExplode("a=1&b=holladiewaldfee&c=3&d=&e=3450"); | ||
114 | for (int i = 0; i < s.count();++i) { | ||
115 | odebug<<"Key: " << s[i].key << " Value: " << s[i].data << oendl; | ||
116 | } | ||
117 | #endif | ||
118 | } | 111 | } |
119 | 112 | ||
120 | OpieMail::~OpieMail() | 113 | OpieMail::~OpieMail() |
121 | { | 114 | { |
122 | if (settings) delete settings; | 115 | if (settings) delete settings; |
123 | } | 116 | } |
124 | 117 | ||
125 | void OpieMail::setup_signalblocking() | 118 | void OpieMail::setup_signalblocking() |
126 | { | 119 | { |
127 | /* for networking we must block SIGPIPE and Co. */ | 120 | /* for networking we must block SIGPIPE and Co. */ |
128 | struct sigaction blocking_action,temp_action; | 121 | struct sigaction blocking_action,temp_action; |
129 | blocking_action.sa_handler = SIG_IGN; | 122 | blocking_action.sa_handler = SIG_IGN; |
@@ -239,28 +232,29 @@ void OpieMail::slotSearchMails() | |||
239 | 232 | ||
240 | void OpieMail::slotEditSettings() | 233 | void OpieMail::slotEditSettings() |
241 | { | 234 | { |
242 | SettingsDialog settingsDialog( this, 0, true, WStyle_ContextHelp ); | 235 | SettingsDialog settingsDialog( this, 0, true, WStyle_ContextHelp ); |
243 | QPEApplication::execDialog( &settingsDialog ); | 236 | QPEApplication::execDialog( &settingsDialog ); |
244 | } | 237 | } |
245 | 238 | ||
246 | void OpieMail::slotEditAccounts() | 239 | void OpieMail::slotEditAccounts() |
247 | { | 240 | { |
248 | odebug << "Edit Accounts" << oendl; | 241 | odebug << "Edit Accounts" << oendl; |
249 | EditAccounts eaDialog( settings, this, 0, true, WStyle_ContextHelp ); | 242 | EditAccounts eaDialog( settings, this, 0, true, WStyle_ContextHelp ); |
250 | eaDialog.slotAdjustColumns(); | 243 | eaDialog.slotAdjustColumns(); |
251 | QPEApplication::execDialog( &eaDialog ); | 244 | if (QPEApplication::execDialog( &eaDialog )==QDialog::Rejected);// return; |
245 | |||
252 | if ( settings ) delete settings; | 246 | if ( settings ) delete settings; |
253 | settings = new Settings(); | 247 | settings = new Settings(); |
254 | 248 | mailView->clear(); | |
255 | folderView->populate( settings->getAccounts() ); | 249 | folderView->populate( settings->getAccounts() ); |
256 | } | 250 | } |
257 | 251 | ||
258 | void OpieMail::displayMail() | 252 | void OpieMail::displayMail() |
259 | { | 253 | { |
260 | QListViewItem*item = mailView->currentItem(); | 254 | QListViewItem*item = mailView->currentItem(); |
261 | if (!item) return; | 255 | if (!item) return; |
262 | RecMailP mail = ((MailListViewItem*)item)->data(); | 256 | RecMailP mail = ((MailListViewItem*)item)->data(); |
263 | RecBodyP body = folderView->fetchBody(mail); | 257 | RecBodyP body = folderView->fetchBody(mail); |
264 | ViewMail readMail( this,"", Qt::WType_Modal | WStyle_ContextHelp ); | 258 | ViewMail readMail( this,"", Qt::WType_Modal | WStyle_ContextHelp ); |
265 | readMail.setBody( body ); | 259 | readMail.setBody( body ); |
266 | readMail.setMail( mail ); | 260 | readMail.setMail( mail ); |