summaryrefslogtreecommitdiffabout
path: root/kmicromail
authorzautrix <zautrix>2005-06-10 11:53:12 (UTC)
committer zautrix <zautrix>2005-06-10 11:53:12 (UTC)
commitd2f00fc2034450bc9a3cd1d2c3510bef1758d3bc (patch) (unidiff)
tree0764371abfdb5d663ffebf408d47d49f0ca919f3 /kmicromail
parente5ca8e0d8d6d08b597253f43de401aa1a99a6abe (diff)
downloadkdepimpi-d2f00fc2034450bc9a3cd1d2c3510bef1758d3bc.zip
kdepimpi-d2f00fc2034450bc9a3cd1d2c3510bef1758d3bc.tar.gz
kdepimpi-d2f00fc2034450bc9a3cd1d2c3510bef1758d3bc.tar.bz2
config dialog changes
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
@@ -76,68 +76,65 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
76 setupFontsTab(); 76 setupFontsTab();
77 readConfig(); 77 readConfig();
78#ifndef DESKTOP_VERSION 78#ifndef DESKTOP_VERSION
79 if ( QApplication::desktop()->height() == 480 ) 79 if ( QApplication::desktop()->height() == 480 )
80 hideButtons(); 80 hideButtons();
81#endif 81#endif
82 82
83#if 0 83#if 0
84 84
85 setupMainTab(); 85 setupMainTab();
86 setupLocaleTab(); 86 setupLocaleTab();
87 setupTimeZoneTab(); 87 setupTimeZoneTab();
88 setupTimeTab(); 88 setupTimeTab();
89 setupLocaleDateTab(); 89 setupLocaleDateTab();
90 setupFontsTab(); 90 setupFontsTab();
91 setupColorsTab(); 91 setupColorsTab();
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);
128 125
129 mEmailEdit = new QLineEdit(topFrame); 126 mEmailEdit = new QLineEdit(topFrame);
130 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); 127 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame);
131 topLayout->addWidget(mEmailLabel,1,0); 128 topLayout->addWidget(mEmailLabel,1,0);
132 topLayout->addWidget(mEmailEdit,1,1); 129 topLayout->addWidget(mEmailEdit,1,1);
133 QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame); 130 QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame);
134 topLayout->addMultiCellWidget(lab,2,2,0,1); 131 topLayout->addMultiCellWidget(lab,2,2,0,1);
135 KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"), 132 KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"),
136 &(KOPrefs::instance()->mUseKapi),topFrame); 133 &(KOPrefs::instance()->mUseKapi),topFrame);
137 topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1); 134 topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1);
138} 135}
139 136
140void KOPrefsDialog::setupMailTab() 137void KOPrefsDialog::setupMailTab()
141{ 138{
142 QFrame *topFrame = addPage(i18n("Mail"),0,0); 139 QFrame *topFrame = addPage(i18n("Mail"),0,0);
143 140
@@ -199,72 +196,70 @@ void KOPrefsDialog::setupFontsTab()
199 topLayout->addWidget(timeLabelsFont->label(),i,0); 196 topLayout->addWidget(timeLabelsFont->label(),i,0);
200 topLayout->addWidget(timeLabelsFont->preview(),i,1); 197 topLayout->addWidget(timeLabelsFont->preview(),i,1);
201 topLayout->addWidget(timeLabelsFont->button(),i,2); 198 topLayout->addWidget(timeLabelsFont->button(),i,2);
202 ++i; 199 ++i;
203 200
204 201
205 timeLabelsFont = 202 timeLabelsFont =
206 addWidFont(i18n("Dear Mr."),i18n("Compose mail:"), 203 addWidFont(i18n("Dear Mr."),i18n("Compose mail:"),
207 &(KOPrefs::instance()->mComposeFont),topFrame); 204 &(KOPrefs::instance()->mComposeFont),topFrame);
208 topLayout->addWidget(timeLabelsFont->label(),i,0); 205 topLayout->addWidget(timeLabelsFont->label(),i,0);
209 topLayout->addWidget(timeLabelsFont->preview(),i,1); 206 topLayout->addWidget(timeLabelsFont->preview(),i,1);
210 topLayout->addWidget(timeLabelsFont->button(),i,2); 207 topLayout->addWidget(timeLabelsFont->button(),i,2);
211 ++i; 208 ++i;
212 209
213 KPrefsDialogWidFont *timeBarFont = 210 KPrefsDialogWidFont *timeBarFont =
214 addWidFont(i18n("Hello"),i18n("Read mail:"), 211 addWidFont(i18n("Hello"),i18n("Read mail:"),
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);
255 QString format; 250 QString format;
256 if ( QApplication::desktop()->width() < 480 ) 251 if ( QApplication::desktop()->width() < 480 )
257 format = "(%d.%m.%Y)"; 252 format = "(%d.%m.%Y)";
258 else 253 else
259 format = "(%d.%m.%Y|%A %d %B %Y)"; 254 format = "(%d.%m.%Y|%A %d %B %Y)";
260 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); 255 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format));
261 if ( QApplication::desktop()->width() < 480 ) 256 if ( QApplication::desktop()->width() < 480 )
262 format = "(%m.%d.%Y)"; 257 format = "(%m.%d.%Y)";
263 else 258 else
264 format = "(%m.%d.%Y|%A %B %d %Y)"; 259 format = "(%m.%d.%Y|%A %B %d %Y)";
265 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); 260 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format));
266 if ( QApplication::desktop()->width() < 480 ) 261 if ( QApplication::desktop()->width() < 480 )
267 format = "(%Y-%m-%d)"; 262 format = "(%Y-%m-%d)";
268 else 263 else
269 format = "(%Y-%m-%d|%A %Y %B %d)"; 264 format = "(%Y-%m-%d|%A %Y %B %d)";
270 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); 265 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format));
diff --git a/kmicromail/koprefsdialog.h b/kmicromail/koprefsdialog.h
index a0416ae..7fa9261 100644
--- a/kmicromail/koprefsdialog.h
+++ b/kmicromail/koprefsdialog.h
@@ -32,65 +32,64 @@
32 32
33#include <libkdepim/kprefsdialog.h> 33#include <libkdepim/kprefsdialog.h>
34#include <libkdepim/kdateedit.h> 34#include <libkdepim/kdateedit.h>
35#include <kcmconfigs/kdepimconfigwidget.h> 35#include <kcmconfigs/kdepimconfigwidget.h>
36 36
37class KColorButton; 37class KColorButton;
38class QSpinBox; 38class QSpinBox;
39class QSlider; 39class QSlider;
40class KURLRequester; 40class KURLRequester;
41class QComboBox; 41class QComboBox;
42class QLineEdit; 42class QLineEdit;
43class QStringList; 43class QStringList;
44 44
45/** Dialog to change the korganizer configuration. 45/** Dialog to change the korganizer configuration.
46 */ 46 */
47class KOPrefsDialog : public KPrefsDialog 47class 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();
81 void updateCategoryColor(); 80 void updateCategoryColor();
82 void updateTimezoneOffset( int ); 81 void updateTimezoneOffset( int );
83 82
84 83
85 void warningExperimental(bool on); 84 void warningExperimental(bool on);
86 void warningGroupScheduling(); 85 void warningGroupScheduling();
87 void warningProjectView(); 86 void warningProjectView();
88 87
89 void toggleEmailSettings(bool); 88 void toggleEmailSettings(bool);
90 89
91 //additional emails 90 //additional emails
92 void addItem(); 91 void addItem();
93 void removeItem(); 92 void removeItem();
94 void updateItem(); 93 void updateItem();
95 void updateInput(); 94 void updateInput();
96*/ 95*/
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index 9a52d1b..e3c5ec3 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -66,69 +66,79 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
66 0, 0, this ); 66 0, 0, this );
67 sendQueued->addTo( toolBar ); 67 sendQueued->addTo( toolBar );
68 sendQueued->addTo( mailMenu ); 68 sendQueued->addTo( mailMenu );
69 69
70 /* 70 /*
71 syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC, 71 syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC,
72 0, 0, this ); 72 0, 0, this );
73 syncFolders->addTo( toolBar ); 73 syncFolders->addTo( toolBar );
74 syncFolders->addTo( mailMenu ); 74 syncFolders->addTo( mailMenu );
75 */ 75 */
76 76
77 showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") , 77 showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") ,
78 0, 0, this, 0, true ); 78 0, 0, this, 0, true );
79 showFolders->addTo( toolBar ); 79 showFolders->addTo( toolBar );
80 showFolders->addTo( mailMenu ); 80 showFolders->addTo( mailMenu );
81 showFolders->setOn( true ); 81 showFolders->setOn( true );
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 );
119 129
120 // QWidget *view = new QWidget( wrapperBox ); 130 // QWidget *view = new QWidget( wrapperBox );
121 KDGanttMinimizeSplitter* splithor = new KDGanttMinimizeSplitter( Qt::Vertical, wrapperBox); 131 KDGanttMinimizeSplitter* splithor = new KDGanttMinimizeSplitter( Qt::Vertical, wrapperBox);
122 splithor->setMinimizeDirection( KDGanttMinimizeSplitter::Down); 132 splithor->setMinimizeDirection( KDGanttMinimizeSplitter::Down);
123 KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, splithor); 133 KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, splithor);
124 split->setMinimizeDirection( KDGanttMinimizeSplitter::Left); 134 split->setMinimizeDirection( KDGanttMinimizeSplitter::Left);
125 //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight ); 135 //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight );
126 subLE = 0; 136 subLE = 0;
127 fromLE = 0; 137 fromLE = 0;
128 toLE = 0; 138 toLE = 0;
129 if ( KOPrefs::instance()->mShowInfoSub || KOPrefs::instance()->mShowInfoFrom || KOPrefs::instance()->mShowInfoTo ) { 139 if ( KOPrefs::instance()->mShowInfoSub || KOPrefs::instance()->mShowInfoFrom || KOPrefs::instance()->mShowInfoTo ) {
130 QWidget* infoBox = new QWidget( splithor ); 140 QWidget* infoBox = new QWidget( splithor );
131 QGridLayout *griLay = new QGridLayout( infoBox, 2,2); 141 QGridLayout *griLay = new QGridLayout( infoBox, 2,2);
132 if ( KOPrefs::instance()->mShowInfoSub ) { 142 if ( KOPrefs::instance()->mShowInfoSub ) {
133 griLay->addWidget( new QLabel ( i18n("Su:"), infoBox ),0,0 ); 143 griLay->addWidget( new QLabel ( i18n("Su:"), infoBox ),0,0 );
134 griLay->addWidget( subLE = new QLineEdit( infoBox ),0,1) ; 144 griLay->addWidget( subLE = new QLineEdit( infoBox ),0,1) ;
@@ -340,64 +350,67 @@ void MainWindow::appMessage(const QCString &, const QByteArray &)
340void MainWindow::slotAdjustLayout() { 350void MainWindow::slotAdjustLayout() {
341 351
342 /* 352 /*
343 QWidget *d = QApplication::desktop(); 353 QWidget *d = QApplication::desktop();
344 354
345 if ( d->width() < d->height() ) { 355 if ( d->width() < d->height() ) {
346 layout->setDirection( QBoxLayout::TopToBottom ); 356 layout->setDirection( QBoxLayout::TopToBottom );
347 } else { 357 } else {
348 layout->setDirection( QBoxLayout::LeftToRight ); 358 layout->setDirection( QBoxLayout::LeftToRight );
349 } 359 }
350 */ 360 */
351} 361}
352 362
353void MainWindow::slotAdjustColumns() 363void MainWindow::slotAdjustColumns()
354{ 364{
355 bool hidden = folderView->isHidden(); 365 bool hidden = folderView->isHidden();
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
388void MainWindow::displayMail() 401void MainWindow::displayMail()
389{ 402{
390 qDebug("not implemented: "); 403 qDebug("not implemented: ");
391} 404}
392 405
393void MainWindow::slotDeleteMail() 406void MainWindow::slotDeleteMail()
394{ 407{
395 qDebug("not implemented: "); 408 qDebug("not implemented: ");
396} 409}
397 410
398void MainWindow::mailHold(int, QListViewItem *,const QPoint&,int ) 411void MainWindow::mailHold(int, QListViewItem *,const QPoint&,int )
399{ 412{
400 qDebug("not implemented: "); 413 qDebug("not implemented: ");
401} 414}
402 415
403void MainWindow::slotSendQueued() 416void MainWindow::slotSendQueued()
diff --git a/kmicromail/mainwindow.h b/kmicromail/mainwindow.h
index ddb3fca..6894039 100644
--- a/kmicromail/mainwindow.h
+++ b/kmicromail/mainwindow.h
@@ -23,51 +23,52 @@
23#include <opie2/osmartpointer.h> 23#include <opie2/osmartpointer.h>
24 24
25class RecMail; 25class RecMail;
26 26
27class MainWindow : public QMainWindow 27class MainWindow : public QMainWindow
28{ 28{
29 Q_OBJECT 29 Q_OBJECT
30 30
31public: 31public:
32 MainWindow( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 ); 32 MainWindow( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 );
33 virtual ~MainWindow(); 33 virtual ~MainWindow();
34 34
35public slots: 35public slots:
36 virtual void slotAdjustColumns(); 36 virtual void slotAdjustColumns();
37 virtual void appMessage(const QCString &msg, const QByteArray &data); 37 virtual void appMessage(const QCString &msg, const QByteArray &data);
38 virtual void slotComposeMail(); 38 virtual void slotComposeMail();
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;
71}; 72};
72 73
73#endif 74#endif
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index 4436ad6..8ac3451 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -215,64 +215,69 @@ void OpieMail::slotSendQueued()
215 { 215 {
216 smtp = smtpList.at(0); 216 smtp = smtpList.at(0);
217 } 217 }
218 else 218 else
219 { 219 {
220 smtp = 0; 220 smtp = 0;
221 selectsmtp selsmtp; 221 selectsmtp selsmtp;
222 selsmtp.setSelectionlist(&smtpList); 222 selsmtp.setSelectionlist(&smtpList);
223 selsmtp.resize( selsmtp.sizeHint() ); 223 selsmtp.resize( selsmtp.sizeHint() );
224 if ( selsmtp.exec() == QDialog::Accepted ) 224 if ( selsmtp.exec() == QDialog::Accepted )
225 { 225 {
226 smtp = selsmtp.selected_smtp(); 226 smtp = selsmtp.selected_smtp();
227 } 227 }
228 } 228 }
229 if (smtp) 229 if (smtp)
230 { 230 {
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{
263 EditAccounts eaDialog( settings, this, 0, true ); 268 EditAccounts eaDialog( settings, this, 0, true );
264 eaDialog.slotAdjustColumns(); 269 eaDialog.slotAdjustColumns();
265#ifndef DESKTOP_VERSION 270#ifndef DESKTOP_VERSION
266 eaDialog.showMaximized(); 271 eaDialog.showMaximized();
267#endif 272#endif
268 eaDialog.exec(); 273 eaDialog.exec();
269 if ( settings ) delete settings; 274 if ( settings ) delete settings;
270 settings = new Settings(); 275 settings = new Settings();
271 276
272 folderView->populate( settings->getAccounts() ); 277 folderView->populate( settings->getAccounts() );
273} 278}
274void OpieMail::replyMail() 279void OpieMail::replyMail()
275{ 280{
276 281
277 QListViewItem*item = mailView->currentItem(); 282 QListViewItem*item = mailView->currentItem();
278 if (!item) return; 283 if (!item) return;
diff --git a/kmicromail/opiemail.h b/kmicromail/opiemail.h
index 4f75b3f..48c5dda 100644
--- a/kmicromail/opiemail.h
+++ b/kmicromail/opiemail.h
@@ -6,61 +6,62 @@
6#include <libmailwrapper/settings.h> 6#include <libmailwrapper/settings.h>
7 7
8#include <opie2/osmartpointer.h> 8#include <opie2/osmartpointer.h>
9#include <libmailwrapper/mailtypes.h> 9#include <libmailwrapper/mailtypes.h>
10#include <viewmail.h> 10#include <viewmail.h>
11#include <qstringlist.h> 11#include <qstringlist.h>
12 12
13class ComposeMail; 13class ComposeMail;
14 14
15class OpieMail : public MainWindow 15class OpieMail : public MainWindow
16{ 16{
17 Q_OBJECT 17 Q_OBJECT
18 18
19public: 19public:
20 OpieMail( QWidget *parent = 0, const char *name = 0 ); 20 OpieMail( QWidget *parent = 0, const char *name = 0 );
21 virtual ~OpieMail(); 21 virtual ~OpieMail();
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();
54private: 55private:
55 ComposeMail* mCurrentComposer; 56 ComposeMail* mCurrentComposer;
56 void closeViewMail(ViewMail * vm); 57 void closeViewMail(ViewMail * vm);
57 QString mPendingEmail; 58 QString mPendingEmail;
58 QString mPendingName; 59 QString mPendingName;
59 QByteArray mPendingData; 60 QByteArray mPendingData;
60 QCString mPendingMessage; 61 QCString mPendingMessage;
61 Settings *settings; 62 Settings *settings;
62 QTextBrowser * tb; 63 QTextBrowser * tb;
63 64
64}; 65};
65 66
66#endif 67#endif