author | zautrix <zautrix> | 2005-06-10 11:53:12 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-10 11:53:12 (UTC) |
commit | d2f00fc2034450bc9a3cd1d2c3510bef1758d3bc (patch) (unidiff) | |
tree | 0764371abfdb5d663ffebf408d47d49f0ca919f3 /kmicromail | |
parent | e5ca8e0d8d6d08b597253f43de401aa1a99a6abe (diff) | |
download | kdepimpi-d2f00fc2034450bc9a3cd1d2c3510bef1758d3bc.zip kdepimpi-d2f00fc2034450bc9a3cd1d2c3510bef1758d3bc.tar.gz kdepimpi-d2f00fc2034450bc9a3cd1d2c3510bef1758d3bc.tar.bz2 |
config dialog changes
-rw-r--r-- | kmicromail/koprefsdialog.cpp | 7 | ||||
-rw-r--r-- | kmicromail/koprefsdialog.h | 1 | ||||
-rw-r--r-- | kmicromail/mainwindow.cpp | 15 | ||||
-rw-r--r-- | kmicromail/mainwindow.h | 1 | ||||
-rw-r--r-- | kmicromail/opiemail.cpp | 5 | ||||
-rw-r--r-- | kmicromail/opiemail.h | 1 |
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 | |||
@@ -96,28 +96,25 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : | |||
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 | ||
103 | KOPrefsDialog::~KOPrefsDialog() | 103 | KOPrefsDialog::~KOPrefsDialog() |
104 | { | 104 | { |
105 | } | 105 | } |
106 | void KOPrefsDialog::setupGlobalTab() | 106 | void 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 | } |
115 | void KOPrefsDialog::setupMainTab() | 112 | void 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 | ||
@@ -219,32 +216,30 @@ void KOPrefsDialog::setupFontsTab() | |||
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 | } |
225 | void KOPrefsDialog::usrReadConfig() | 222 | void 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 | } |
233 | void KOPrefsDialog::usrWriteConfig() | 229 | void 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 |
244 | void KOPrefsDialog::setupLocaleDateTab() | 239 | void KOPrefsDialog::setupLocaleDateTab() |
245 | { | 240 | { |
246 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); | 241 | QFrame *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; |
diff --git a/kmicromail/koprefsdialog.h b/kmicromail/koprefsdialog.h index a0416ae..7fa9261 100644 --- a/kmicromail/koprefsdialog.h +++ b/kmicromail/koprefsdialog.h | |||
@@ -52,25 +52,24 @@ class KOPrefsDialog : public KPrefsDialog | |||
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 | ||
55 | protected: | 55 | protected: |
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(); |
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp index 9a52d1b..e3c5ec3 100644 --- a/kmicromail/mainwindow.cpp +++ b/kmicromail/mainwindow.cpp | |||
@@ -86,29 +86,39 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) | |||
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); |
@@ -360,24 +370,27 @@ void MainWindow::slotAdjustColumns() | |||
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 | ||
369 | void MainWindow::slotEditSettings() | 379 | void MainWindow::slotEditSettings() |
370 | { | 380 | { |
371 | } | 381 | } |
382 | void MainWindow::slotEditGlobalSettings() | ||
383 | { | ||
384 | } | ||
372 | 385 | ||
373 | void MainWindow::slotShowFolders( bool ) | 386 | void MainWindow::slotShowFolders( bool ) |
374 | { | 387 | { |
375 | qDebug("not implemented: "); | 388 | qDebug("not implemented: "); |
376 | } | 389 | } |
377 | 390 | ||
378 | void MainWindow::refreshMailView(const QValueList<RecMailP>&) | 391 | void MainWindow::refreshMailView(const QValueList<RecMailP>&) |
379 | { | 392 | { |
380 | qDebug("not implemented: "); | 393 | qDebug("not implemented: "); |
381 | } | 394 | } |
382 | 395 | ||
383 | void MainWindow::mailLeftClicked(QListViewItem * ) | 396 | void MainWindow::mailLeftClicked(QListViewItem * ) |
diff --git a/kmicromail/mainwindow.h b/kmicromail/mainwindow.h index ddb3fca..6894039 100644 --- a/kmicromail/mainwindow.h +++ b/kmicromail/mainwindow.h | |||
@@ -43,24 +43,25 @@ protected slots: | |||
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 | ||
60 | protected: | 61 | protected: |
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; |
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp index 4436ad6..8ac3451 100644 --- a/kmicromail/opiemail.cpp +++ b/kmicromail/opiemail.cpp | |||
@@ -235,24 +235,29 @@ void OpieMail::slotSendQueued() | |||
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 | ||
243 | void OpieMail::slotSearchMails() | 243 | void OpieMail::slotSearchMails() |
244 | { | 244 | { |
245 | qDebug("OpieMail::slotSearchMails():not implemented "); | 245 | qDebug("OpieMail::slotSearchMails():not implemented "); |
246 | } | 246 | } |
247 | void OpieMail::slotEditGlobalSettings() | ||
248 | { | ||
249 | KPimPrefsGlobalDialog gc ( this ); | ||
250 | gc.exec(); | ||
251 | } | ||
247 | 252 | ||
248 | void OpieMail::slotEditSettings() | 253 | void 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); |
diff --git a/kmicromail/opiemail.h b/kmicromail/opiemail.h index 4f75b3f..48c5dda 100644 --- a/kmicromail/opiemail.h +++ b/kmicromail/opiemail.h | |||
@@ -26,24 +26,25 @@ public slots: | |||
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); |
32 | protected slots: | 32 | protected 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(); |