summaryrefslogtreecommitdiffabout
path: root/kmicromail/opiemail.cpp
authorzautrix <zautrix>2004-10-30 17:07:04 (UTC)
committer zautrix <zautrix>2004-10-30 17:07:04 (UTC)
commit28df10a0eb5ff343191755a06391bc6ce2fd84b0 (patch) (unidiff)
tree930882e7400006887d68fd434939e3a376b8631b /kmicromail/opiemail.cpp
parentc8662dc632987a317386b923e24acb9507859528 (diff)
downloadkdepimpi-28df10a0eb5ff343191755a06391bc6ce2fd84b0.zip
kdepimpi-28df10a0eb5ff343191755a06391bc6ce2fd84b0.tar.gz
kdepimpi-28df10a0eb5ff343191755a06391bc6ce2fd84b0.tar.bz2
ompi fixes
Diffstat (limited to 'kmicromail/opiemail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/opiemail.cpp26
1 files changed, 16 insertions, 10 deletions
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index e088b9e..ca3faaf 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -1,54 +1,50 @@
1// CHANGED 2004-09-31 Lutz Rogowski 1// CHANGED 2004-09-31 Lutz Rogowski
2// CHANGED 2004-08-06 Lutz Rogowski 2// CHANGED 2004-08-06 Lutz Rogowski
3 3
4#include "koprefsdialog.h" 4#include "koprefsdialog.h"
5#include <kapplication.h>
5#include <libkdepim/externalapphandler.h> 6#include <libkdepim/externalapphandler.h>
6#include <libkdepim/kpimglobalprefs.h> 7#include <libkdepim/kpimglobalprefs.h>
7#ifdef MINIKDE_KDIALOG_H 8#ifdef MINIKDE_KDIALOG_H
8#undef MINIKDE_KDIALOG_H 9#undef MINIKDE_KDIALOG_H
9#endif 10#endif
10#include "settingsdialog.h" 11#include "settingsdialog.h"
11#include "opiemail.h" 12#include "opiemail.h"
12#include "editaccounts.h" 13#include "editaccounts.h"
13#include "composemail.h" 14#include "composemail.h"
14#include "mailistviewitem.h" 15#include "mailistviewitem.h"
15#include "viewmail.h" 16#include "viewmail.h"
16#include "selectstore.h" 17#include "selectstore.h"
17#include "selectsmtp.h" 18#include "selectsmtp.h"
18#include "accountitem.h" 19#include "accountitem.h"
19#include "klocale.h" 20#include "klocale.h"
20 21
21#include <qmessagebox.h> 22#include <qmessagebox.h>
22#include <qtimer.h> 23#include <qtimer.h>
23#include <qcursor.h> 24#include <qcursor.h>
24#include <qregexp.h> 25#include <qregexp.h>
25 26
26#ifdef DESKTOP_VERSION 27#ifdef DESKTOP_VERSION
27#include <qapplication.h> 28#include <qapplication.h>
28#else 29#else
29#include <qpe/qpeapplication.h> 30#include <qpe/qpeapplication.h>
30#endif 31#endif
31#include <libmailwrapper/smtpwrapper.h> 32#include <libmailwrapper/smtpwrapper.h>
32#include <libmailwrapper/mailtypes.h> 33#include <libmailwrapper/mailtypes.h>
33#include <libmailwrapper/abstractmail.h> 34#include <libmailwrapper/abstractmail.h>
34/* OPIE */
35//#include <qpe/resource.h>
36//#include <qpe/qpeapplication.h>
37
38/* QT */
39 35
40//using namespace Opie::Core; 36//using namespace Opie::Core;
41 37
42OpieMail::OpieMail( QWidget *parent, const char *name ) 38OpieMail::OpieMail( QWidget *parent, const char *name )
43 : MainWindow( parent, name) //, WStyle_ContextHelp ) 39 : MainWindow( parent, name) //, WStyle_ContextHelp )
44{ 40{
45 settings = new Settings(); 41 settings = new Settings();
46 42
47 folderView->populate( settings->getAccounts() ); 43 folderView->populate( settings->getAccounts() );
48 44
49} 45}
50 46
51OpieMail::~OpieMail() 47OpieMail::~OpieMail()
52{ 48{
53 if (settings) delete settings; 49 if (settings) delete settings;
54} 50}
@@ -208,64 +204,70 @@ void OpieMail::slotSendQueued()
208 SMTPwrapper * wrap = new SMTPwrapper(smtp); 204 SMTPwrapper * wrap = new SMTPwrapper(smtp);
209 if ( wrap->flushOutbox() ) 205 if ( wrap->flushOutbox() )
210 { 206 {
211 QMessageBox::information(0,i18n("Info"),i18n("Mail queue flushed")); 207 QMessageBox::information(0,i18n("Info"),i18n("Mail queue flushed"));
212 } 208 }
213 delete wrap; 209 delete wrap;
214 } 210 }
215} 211}
216 212
217void OpieMail::slotSearchMails() 213void OpieMail::slotSearchMails()
218{ 214{
219 qDebug("OpieMail::slotSearchMails():not implemented "); 215 qDebug("OpieMail::slotSearchMails():not implemented ");
220} 216}
221 217
222void OpieMail::slotEditSettings() 218void OpieMail::slotEditSettings()
223{ 219{
224#if 0 220
225 SettingsDialog settingsDialog( this, 0, true, WStyle_ContextHelp );
226 settingsDialog.showMaximized();
227 settingsDialog.exec();
228#endif
229 KOPrefsDialog settingsDialog( this, "koprefs", true ); 221 KOPrefsDialog settingsDialog( this, "koprefs", true );
222#ifndef DESKTOP_VERSION
230 settingsDialog.showMaximized(); 223 settingsDialog.showMaximized();
224#endif
231 settingsDialog.exec(); 225 settingsDialog.exec();
226
227 // KApplication::execDialog(settingsDialog);
232} 228}
233 229
234void OpieMail::slotEditAccounts() 230void OpieMail::slotEditAccounts()
235{ 231{
236 EditAccounts eaDialog( settings, this, 0, true ); 232 EditAccounts eaDialog( settings, this, 0, true );
237 eaDialog.slotAdjustColumns(); 233 eaDialog.slotAdjustColumns();
234#ifndef DESKTOP_VERSION
238 eaDialog.showMaximized(); 235 eaDialog.showMaximized();
236#endif
239 eaDialog.exec(); 237 eaDialog.exec();
240 if ( settings ) delete settings; 238 if ( settings ) delete settings;
241 settings = new Settings(); 239 settings = new Settings();
242 240
243 folderView->populate( settings->getAccounts() ); 241 folderView->populate( settings->getAccounts() );
244} 242}
245 243
246void OpieMail::displayMail() 244void OpieMail::displayMail()
247{ 245{
248 QListViewItem*item = mailView->currentItem(); 246 QListViewItem*item = mailView->currentItem();
249 if (!item) return; 247 if (!item) return;
250 RecMailP mail = ((MailListViewItem*)item)->data(); 248 RecMailP mail = ((MailListViewItem*)item)->data();
251 RecBodyP body = folderView->fetchBody(mail); 249 RecBodyP body = folderView->fetchBody(mail);
252 ViewMail readMail( this,"", Qt::WType_Modal ); 250 ViewMail readMail( this,"", Qt::WType_Modal );
253 readMail.setBody( body ); 251 readMail.setBody( body );
254 readMail.setMail( mail ); 252 readMail.setMail( mail );
253#ifndef DESKTOP_VERSION
255 readMail.showMaximized(); 254 readMail.showMaximized();
255#else
256 readMail.resize( 640, 480);
257#endif
256 readMail.exec(); 258 readMail.exec();
257 259
258 if ( readMail.deleted ) 260 if ( readMail.deleted )
259 { 261 {
260 folderView->refreshCurrent(); 262 folderView->refreshCurrent();
261 } 263 }
262 else 264 else
263 { 265 {
264 ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() ); 266 ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() );
265 } 267 }
266} 268}
267void OpieMail::slotGetAllMail() 269void OpieMail::slotGetAllMail()
268{ 270{
269 QListViewItem * item = folderView->firstChild(); 271 QListViewItem * item = folderView->firstChild();
270 while ( item ){ 272 while ( item ){
271 ((AccountViewItem *)item)->contextMenuSelected( 101 ); 273 ((AccountViewItem *)item)->contextMenuSelected( 101 );
@@ -459,19 +461,23 @@ void OpieMail::slotMoveCopyAllMail()
459 return; 461 return;
460 } 462 }
461 sels.hide(); 463 sels.hide();
462 qApp->processEvents(); 464 qApp->processEvents();
463 //qDebug("hiding sels "); 465 //qDebug("hiding sels ");
464 mail->Wrapper()->mvcpMailList(t,targetFolder,targetMail,sels.moveMails()); 466 mail->Wrapper()->mvcpMailList(t,targetFolder,targetMail,sels.moveMails());
465 folderView->refreshCurrent(); 467 folderView->refreshCurrent();
466} 468}
467 469
468void OpieMail::reEditMail() 470void OpieMail::reEditMail()
469{ 471{
470 if (!mailView->currentItem()) return; 472 if (!mailView->currentItem()) return;
471 473
472 ComposeMail compose( settings, this, 0, true ); 474 ComposeMail compose( settings, this, 0, true );
473 compose.reEditMail(((MailListViewItem*)mailView->currentItem() )->data()); 475 compose.reEditMail(((MailListViewItem*)mailView->currentItem() )->data());
474 compose.slotAdjustColumns(); 476 compose.slotAdjustColumns();
477#ifndef DESKTOP_VERSION
475 compose.showMaximized(); 478 compose.showMaximized();
479#else
480 compose.resize(640,480);
481#endif
476 compose.exec(); 482 compose.exec();
477} 483}