summaryrefslogtreecommitdiffabout
path: root/kmicromail
Unidiff
Diffstat (limited to 'kmicromail') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/koprefsdialog.cpp7
-rw-r--r--kmicromail/koprefsdialog.h1
-rw-r--r--kmicromail/mainwindow.cpp15
-rw-r--r--kmicromail/mainwindow.h1
-rw-r--r--kmicromail/opiemail.cpp5
-rw-r--r--kmicromail/opiemail.h1
6 files changed, 22 insertions, 8 deletions
diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp
index 7de7064..017f1f7 100644
--- a/kmicromail/koprefsdialog.cpp
+++ b/kmicromail/koprefsdialog.cpp
@@ -92,36 +92,33 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
92 setupViewsTab(); 92 setupViewsTab();
93 //setupSyncTab(); 93 //setupSyncTab();
94 //setupSyncAlgTab(); 94 //setupSyncAlgTab();
95 //setupPrinterTab(); 95 //setupPrinterTab();
96 //setupGroupSchedulingTab(); 96 //setupGroupSchedulingTab();
97 //setupGroupAutomationTab(); 97 //setupGroupAutomationTab();
98#endif 98#endif
99} 99}
100 100
101#include "kpimglobalprefs.h" 101#include "kpimglobalprefs.h"
102 102
103KOPrefsDialog::~KOPrefsDialog() 103KOPrefsDialog::~KOPrefsDialog()
104{ 104{
105} 105}
106void KOPrefsDialog::setupGlobalTab() 106void KOPrefsDialog::setupGlobalTab()
107{ 107{
108 QFrame *topFrame = addPage(i18n("Global"),0,0); 108
109 kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" );
110 QVBoxLayout *topLayout = new QVBoxLayout(topFrame);
111 topLayout->addWidget( kdelibcfg );
112 109
113 110
114} 111}
115void KOPrefsDialog::setupMainTab() 112void KOPrefsDialog::setupMainTab()
116{ 113{
117 QFrame *topFrame = addPage(i18n("General"),0,0); 114 QFrame *topFrame = addPage(i18n("General"),0,0);
118 115
119 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 116 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
120 topLayout->setSpacing(spacingHint()); 117 topLayout->setSpacing(spacingHint());
121 topLayout->setMargin(marginHint()); 118 topLayout->setMargin(marginHint());
122 119
123 120
124 mNameEdit = new QLineEdit(topFrame); 121 mNameEdit = new QLineEdit(topFrame);
125 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); 122 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame);
126 topLayout->addWidget(mNameLabel,0,0); 123 topLayout->addWidget(mNameLabel,0,0);
127 topLayout->addWidget(mNameEdit,0,1); 124 topLayout->addWidget(mNameEdit,0,1);
@@ -215,40 +212,38 @@ void KOPrefsDialog::setupFontsTab()
215 &(KOPrefs::instance()->mReadFont),topFrame); 212 &(KOPrefs::instance()->mReadFont),topFrame);
216 topLayout->addWidget(timeBarFont->label(),i,0); 213 topLayout->addWidget(timeBarFont->label(),i,0);
217 topLayout->addWidget(timeBarFont->preview(),i,1); 214 topLayout->addWidget(timeBarFont->preview(),i,1);
218 topLayout->addWidget(timeBarFont->button(),i,2); 215 topLayout->addWidget(timeBarFont->button(),i,2);
219 ++i; 216 ++i;
220 217
221 topLayout->setColStretch(1,1); 218 topLayout->setColStretch(1,1);
222 topLayout->setRowStretch(4,1); 219 topLayout->setRowStretch(4,1);
223 220
224} 221}
225void KOPrefsDialog::usrReadConfig() 222void KOPrefsDialog::usrReadConfig()
226{ 223{
227 224
228 mNameEdit->setText(KOPrefs::instance()->mName); 225 mNameEdit->setText(KOPrefs::instance()->mName);
229 mEmailEdit->setText(KOPrefs::instance()->mEmail); 226 mEmailEdit->setText(KOPrefs::instance()->mEmail);
230 //mCodecEdit->setText(KOPrefs::instance()->mSendCodec); 227 //mCodecEdit->setText(KOPrefs::instance()->mSendCodec);
231 kdelibcfg->readConfig();
232} 228}
233void KOPrefsDialog::usrWriteConfig() 229void KOPrefsDialog::usrWriteConfig()
234{ 230{
235 KOPrefs::instance()->mName = mNameEdit->text(); 231 KOPrefs::instance()->mName = mNameEdit->text();
236 KOPrefs::instance()->mEmail = mEmailEdit->text(); 232 KOPrefs::instance()->mEmail = mEmailEdit->text();
237 //KOPrefs::instance()->mSendCodec = mCodecEdit->text(); 233 //KOPrefs::instance()->mSendCodec = mCodecEdit->text();
238 kdelibcfg->writeConfig();
239 234
240 235
241} 236}
242 237
243#if 0 238#if 0
244void KOPrefsDialog::setupLocaleDateTab() 239void KOPrefsDialog::setupLocaleDateTab()
245{ 240{
246QFrame *topFrame = addPage(i18n("Date Format"),0,0); 241QFrame *topFrame = addPage(i18n("Date Format"),0,0);
247 QGridLayout *topLayout = new QGridLayout(topFrame,3,2); 242 QGridLayout *topLayout = new QGridLayout(topFrame,3,2);
248 topLayout->setSpacing(spacingHint()); 243 topLayout->setSpacing(spacingHint());
249 topLayout->setMargin(marginHint()); 244 topLayout->setMargin(marginHint());
250 int iii = 0; 245 int iii = 0;
251 246
252 247
253 KPrefsWidRadios *syncPrefsGroup = 248 KPrefsWidRadios *syncPrefsGroup =
254 addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); 249 addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame);
diff --git a/kmicromail/koprefsdialog.h b/kmicromail/koprefsdialog.h
index a0416ae..7fa9261 100644
--- a/kmicromail/koprefsdialog.h
+++ b/kmicromail/koprefsdialog.h
@@ -48,33 +48,32 @@ class KOPrefsDialog : public KPrefsDialog
48{ 48{
49 Q_OBJECT 49 Q_OBJECT
50 public: 50 public:
51 /** Initialize dialog and pages */ 51 /** Initialize dialog and pages */
52 KOPrefsDialog(QWidget *parent=0,char *name=0,bool modal=false); 52 KOPrefsDialog(QWidget *parent=0,char *name=0,bool modal=false);
53 ~KOPrefsDialog(); 53 ~KOPrefsDialog();
54 54
55protected: 55protected:
56 void usrReadConfig(); 56 void usrReadConfig();
57 void usrWriteConfig(); 57 void usrWriteConfig();
58 58
59 void setupMainTab(); 59 void setupMainTab();
60 void setupGlobalTab(); 60 void setupGlobalTab();
61 void setupMailTab(); 61 void setupMailTab();
62 void setupFontsTab(); 62 void setupFontsTab();
63 private: 63 private:
64 KDEPIMConfigWidget* kdelibcfg;
65 QLineEdit *mNameEdit; 64 QLineEdit *mNameEdit;
66 QLineEdit *mCodecEdit; 65 QLineEdit *mCodecEdit;
67 QLineEdit *mEmailEdit; 66 QLineEdit *mEmailEdit;
68 QLabel *mNameLabel; 67 QLabel *mNameLabel;
69 QLabel *mEmailLabel; 68 QLabel *mEmailLabel;
70#if 0 69#if 0
71 /* 70 /*
72 public slots: 71 public slots:
73 void showPrinterTab(); 72 void showPrinterTab();
74 73
75 74
76 void updateCategories(); 75 void updateCategories();
77 void showSyncPage(); 76 void showSyncPage();
78 protected slots: 77 protected slots:
79 void selectSoundFile(); 78 void selectSoundFile();
80 void setCategoryColor(); 79 void setCategoryColor();
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index 9a52d1b..e3c5ec3 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -82,37 +82,47 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
82 connect(showFolders, SIGNAL( toggled(bool) ), 82 connect(showFolders, SIGNAL( toggled(bool) ),
83 SLOT( slotShowFolders(bool) ) ); 83 SLOT( slotShowFolders(bool) ) );
84 84
85 /* 85 /*
86 searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ), 86 searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ),
87 0, 0, this ); 87 0, 0, this );
88 searchMails->kopddTo( toolBar ); 88 searchMails->kopddTo( toolBar );
89 searchMails->addTo( mailMenu ); 89 searchMails->addTo( mailMenu );
90 */ 90 */
91 91
92 deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this); 92 deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this);
93 deleteMails->addTo( toolBar ); 93 deleteMails->addTo( toolBar );
94 deleteMails->addTo( mailMenu ); 94 deleteMails->addTo( mailMenu );
95 connect( deleteMails, SIGNAL( activated() ), 95 connect( deleteMails, SIGNAL( activated() ),
96 SLOT( slotDeleteAllMail() ) ); 96 SLOT( slotDeleteAllMail() ) );
97 97
98 editSettings = new QAction( i18n( "Edit settings" ), SmallIcon("SettingsIcon") , 98 editSettings = new QAction( i18n( "Configure OM/Pi..." ), SmallIcon("SettingsIcon") ,
99 0, 0, this ); 99 0, 0, this );
100 editSettings->addTo( settingsMenu ); 100 editSettings->addTo( settingsMenu );
101 connect( editSettings, SIGNAL( activated() ), 101 connect( editSettings, SIGNAL( activated() ),
102 SLOT( slotEditSettings() ) ); 102 SLOT( slotEditSettings() ) );
103
104
105 QAction * editSettings2 = new QAction( i18n( "Global Settings..." ), SmallIcon("SettingsIcon") ,
106 0, 0, this );
107 editSettings2->addTo( settingsMenu );
108 connect( editSettings2, SIGNAL( activated() ),
109 SLOT( slotEditGlobalSettings() ) );
110
111
112
103 editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") , 113 editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") ,
104 0, 0, this ); 114 0, 0, this );
105 editAccounts->addTo( settingsMenu ); 115 editAccounts->addTo( settingsMenu );
106 codecMenu = new QPopupMenu( menuBar ); 116 codecMenu = new QPopupMenu( menuBar );
107 codecMenu->insertItem( "Western (iso-8859-1)",0,0); 117 codecMenu->insertItem( "Western (iso-8859-1)",0,0);
108 codecMenu->insertItem( "Cyrillic (iso-8859-5)",1,1); 118 codecMenu->insertItem( "Cyrillic (iso-8859-5)",1,1);
109 codecMenu->insertItem( "Western (iso-8859-15)",2,2); 119 codecMenu->insertItem( "Western (iso-8859-15)",2,2);
110 codecMenu->insertItem( "Chinese (big-5)",3,3); 120 codecMenu->insertItem( "Chinese (big-5)",3,3);
111 codecMenu->insertItem( "Unicode (utf-8)",4,4); 121 codecMenu->insertItem( "Unicode (utf-8)",4,4);
112 codecMenu->insertItem( "Userdefined ("+KOPrefs::instance()->mSendCodec+")",5,5); 122 codecMenu->insertItem( "Userdefined ("+KOPrefs::instance()->mSendCodec+")",5,5);
113 //disabled 123 //disabled
114 //settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu); 124 //settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu);
115 //setCentralWidget( view ); 125 //setCentralWidget( view );
116 126
117 QVBox* wrapperBox = new QVBox( this ); 127 QVBox* wrapperBox = new QVBox( this );
118 setCentralWidget( wrapperBox ); 128 setCentralWidget( wrapperBox );
@@ -356,32 +366,35 @@ void MainWindow::slotAdjustColumns()
356 if ( hidden ) folderView->show(); 366 if ( hidden ) folderView->show();
357 folderView->setColumnWidth( 0, folderView->visibleWidth() ); 367 folderView->setColumnWidth( 0, folderView->visibleWidth() );
358 if ( hidden ) folderView->hide(); 368 if ( hidden ) folderView->hide();
359 369
360 mailView->setColumnWidth( 0, 10 ); 370 mailView->setColumnWidth( 0, 10 );
361 mailView->setColumnWidth( 1, 100 ); 371 mailView->setColumnWidth( 1, 100 );
362 mailView->setColumnWidth( 2, 100 ); 372 mailView->setColumnWidth( 2, 100 );
363 mailView->setColumnWidth( 3, 50 ); 373 mailView->setColumnWidth( 3, 50 );
364 mailView->setColumnWidth( 4, 120 ); 374 mailView->setColumnWidth( 4, 120 );
365 if ( KOPrefs::instance()->mShowToField ) 375 if ( KOPrefs::instance()->mShowToField )
366 mailView->setColumnWidth( 5, 100 ); 376 mailView->setColumnWidth( 5, 100 );
367} 377}
368 378
369void MainWindow::slotEditSettings() 379void MainWindow::slotEditSettings()
370{ 380{
371} 381}
382void MainWindow::slotEditGlobalSettings()
383{
384}
372 385
373void MainWindow::slotShowFolders( bool ) 386void MainWindow::slotShowFolders( bool )
374{ 387{
375 qDebug("not implemented: "); 388 qDebug("not implemented: ");
376} 389}
377 390
378void MainWindow::refreshMailView(const QValueList<RecMailP>&) 391void MainWindow::refreshMailView(const QValueList<RecMailP>&)
379{ 392{
380 qDebug("not implemented: "); 393 qDebug("not implemented: ");
381} 394}
382 395
383void MainWindow::mailLeftClicked(QListViewItem * ) 396void MainWindow::mailLeftClicked(QListViewItem * )
384{ 397{
385 qDebug("not implemented: "); 398 qDebug("not implemented: ");
386} 399}
387 400
diff --git a/kmicromail/mainwindow.h b/kmicromail/mainwindow.h
index ddb3fca..6894039 100644
--- a/kmicromail/mainwindow.h
+++ b/kmicromail/mainwindow.h
@@ -39,32 +39,33 @@ public slots:
39 39
40protected slots: 40protected slots:
41 virtual void setInfoFields(QListViewItem* ); 41 virtual void setInfoFields(QListViewItem* );
42 virtual void slotSendQueued(); 42 virtual void slotSendQueued();
43 virtual void slotEditAccounts(); 43 virtual void slotEditAccounts();
44 virtual void slotShowFolders( bool show ); 44 virtual void slotShowFolders( bool show );
45 virtual void refreshMailView(const QValueList<RecMailP>&); 45 virtual void refreshMailView(const QValueList<RecMailP>&);
46 virtual void displayMail(); 46 virtual void displayMail();
47 virtual void slotGetMail() = 0; 47 virtual void slotGetMail() = 0;
48 virtual void slotGetAllMail() = 0; 48 virtual void slotGetAllMail() = 0;
49 virtual void slotDeleteMail(); 49 virtual void slotDeleteMail();
50 virtual void slotDeleteAllMail() = 0; 50 virtual void slotDeleteAllMail() = 0;
51 virtual void slotSetCodec(int); 51 virtual void slotSetCodec(int);
52 virtual void mailHold(int, QListViewItem *,const QPoint&,int); 52 virtual void mailHold(int, QListViewItem *,const QPoint&,int);
53 virtual void slotAdjustLayout(); 53 virtual void slotAdjustLayout();
54 virtual void slotEditSettings(); 54 virtual void slotEditSettings();
55 virtual void slotEditGlobalSettings();
55 virtual void mailLeftClicked( QListViewItem * ); 56 virtual void mailLeftClicked( QListViewItem * );
56 void showLicence(); 57 void showLicence();
57 void showAbout(); 58 void showAbout();
58 void showEtpanLicence(); 59 void showEtpanLicence();
59 60
60protected: 61protected:
61 QToolBar *toolBar; 62 QToolBar *toolBar;
62 StatusWidget *statusWidget; 63 StatusWidget *statusWidget;
63 QPEMenuBar *menuBar; 64 QPEMenuBar *menuBar;
64 QPopupMenu *mailMenu, *settingsMenu, *codecMenu; 65 QPopupMenu *mailMenu, *settingsMenu, *codecMenu;
65 QAction *composeMail, *sendQueued, *showFolders, *searchMails, *deleteMails, 66 QAction *composeMail, *sendQueued, *showFolders, *searchMails, *deleteMails,
66 *editSettings, *editAccounts, *syncFolders; 67 *editSettings, *editAccounts, *syncFolders;
67 AccountView *folderView; 68 AccountView *folderView;
68 QListView *mailView; 69 QListView *mailView;
69 QLineEdit* toLE,*fromLE,*subLE; 70 QLineEdit* toLE,*fromLE,*subLE;
70 //QBoxLayout *layout; 71 //QBoxLayout *layout;
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index 4436ad6..8ac3451 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -231,32 +231,37 @@ void OpieMail::slotSendQueued()
231 231
232 Global::statusMessage("Sending mails...!"); 232 Global::statusMessage("Sending mails...!");
233 SMTPwrapper * wrap = new SMTPwrapper(smtp); 233 SMTPwrapper * wrap = new SMTPwrapper(smtp);
234 if ( wrap->flushOutbox() ) 234 if ( wrap->flushOutbox() )
235 { 235 {
236 Global::statusMessage("Mails sent!"); 236 Global::statusMessage("Mails sent!");
237 } 237 }
238 delete wrap; 238 delete wrap;
239 } 239 }
240 folderView->refreshOutgoing(); 240 folderView->refreshOutgoing();
241} 241}
242 242
243void OpieMail::slotSearchMails() 243void OpieMail::slotSearchMails()
244{ 244{
245 qDebug("OpieMail::slotSearchMails():not implemented "); 245 qDebug("OpieMail::slotSearchMails():not implemented ");
246} 246}
247void OpieMail::slotEditGlobalSettings()
248{
249 KPimPrefsGlobalDialog gc ( this );
250 gc.exec();
251}
247 252
248void OpieMail::slotEditSettings() 253void OpieMail::slotEditSettings()
249{ 254{
250 255
251 KOPrefsDialog settingsDialog( this, "koprefs", true ); 256 KOPrefsDialog settingsDialog( this, "koprefs", true );
252#ifndef DESKTOP_VERSION 257#ifndef DESKTOP_VERSION
253 settingsDialog.showMaximized(); 258 settingsDialog.showMaximized();
254#endif 259#endif
255 settingsDialog.exec(); 260 settingsDialog.exec();
256 261
257 slotSetCodec( KOPrefs::instance()->mCurrentCodec ); 262 slotSetCodec( KOPrefs::instance()->mCurrentCodec );
258 // KApplication::execDialog(settingsDialog); 263 // KApplication::execDialog(settingsDialog);
259} 264}
260 265
261void OpieMail::slotEditAccounts() 266void OpieMail::slotEditAccounts()
262{ 267{
diff --git a/kmicromail/opiemail.h b/kmicromail/opiemail.h
index 4f75b3f..48c5dda 100644
--- a/kmicromail/opiemail.h
+++ b/kmicromail/opiemail.h
@@ -22,32 +22,33 @@ public:
22 static QString appName() { return QString::fromLatin1("kopiemail"); } 22 static QString appName() { return QString::fromLatin1("kopiemail"); }
23 23
24public slots: 24public slots:
25 virtual void slotwriteMail(const QString&name,const QString&email); 25 virtual void slotwriteMail(const QString&name,const QString&email);
26 virtual void slotwriteMail2(const QString&nameemail); 26 virtual void slotwriteMail2(const QString&nameemail);
27 virtual void slotComposeMail(); 27 virtual void slotComposeMail();
28 virtual void slotExtAppHandler(); 28 virtual void slotExtAppHandler();
29 virtual void appMessage(const QCString &msg, const QByteArray &data); 29 virtual void appMessage(const QCString &msg, const QByteArray &data);
30 virtual void message(const QCString &msg, const QByteArray &data); 30 virtual void message(const QCString &msg, const QByteArray &data);
31 void insertAttendees(const QString&, const QStringList& namelist, const QStringList& emaillist, const QStringList& uidlist); 31 void insertAttendees(const QString&, const QStringList& namelist, const QStringList& emaillist, const QStringList& uidlist);
32protected slots: 32protected slots:
33 virtual void deleteAndDisplayNextMail(ViewMail * vm); 33 virtual void deleteAndDisplayNextMail(ViewMail * vm);
34 virtual void displayNextMail(ViewMail * vm); 34 virtual void displayNextMail(ViewMail * vm);
35 virtual void slotSendQueued(); 35 virtual void slotSendQueued();
36 virtual void slotSearchMails(); 36 virtual void slotSearchMails();
37 virtual void slotEditSettings(); 37 virtual void slotEditSettings();
38 virtual void slotEditGlobalSettings();
38 virtual void slotEditAccounts(); 39 virtual void slotEditAccounts();
39 virtual void displayMail(); 40 virtual void displayMail();
40 virtual void replyMail(); 41 virtual void replyMail();
41 virtual void slotDeleteMail(); 42 virtual void slotDeleteMail();
42 virtual void slotGetMail(); 43 virtual void slotGetMail();
43 virtual void slotGetAllMail(); 44 virtual void slotGetAllMail();
44 virtual void slotDeleteAllMail(); 45 virtual void slotDeleteAllMail();
45 virtual void mailHold(int, QListViewItem *,const QPoint&,int); 46 virtual void mailHold(int, QListViewItem *,const QPoint&,int);
46 virtual void slotShowFolders( bool show ); 47 virtual void slotShowFolders( bool show );
47 virtual void refreshMailView(const QValueList<RecMailP>&); 48 virtual void refreshMailView(const QValueList<RecMailP>&);
48 virtual void mailLeftClicked( QListViewItem * ); 49 virtual void mailLeftClicked( QListViewItem * );
49 virtual void slotMoveCopyMail(); 50 virtual void slotMoveCopyMail();
50 virtual void slotMoveCopyAllMail(); 51 virtual void slotMoveCopyAllMail();
51 virtual void reEditMail(); 52 virtual void reEditMail();
52 void clearSelection(); 53 void clearSelection();
53 void slotDownloadMail(); 54 void slotDownloadMail();