summaryrefslogtreecommitdiffabout
path: root/kmicromail/koprefsdialog.cpp
Unidiff
Diffstat (limited to 'kmicromail/koprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/koprefsdialog.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp
index 4abf859..13d6681 100644
--- a/kmicromail/koprefsdialog.cpp
+++ b/kmicromail/koprefsdialog.cpp
@@ -118,123 +118,124 @@ void KOPrefsDialog::setupMainTab()
118 mNameEdit = new QLineEdit(topFrame); 118 mNameEdit = new QLineEdit(topFrame);
119 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); 119 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame);
120 topLayout->addWidget(mNameLabel,0,0); 120 topLayout->addWidget(mNameLabel,0,0);
121 topLayout->addWidget(mNameEdit,0,1); 121 topLayout->addWidget(mNameEdit,0,1);
122 122
123 mEmailEdit = new QLineEdit(topFrame); 123 mEmailEdit = new QLineEdit(topFrame);
124 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); 124 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame);
125 topLayout->addWidget(mEmailLabel,1,0); 125 topLayout->addWidget(mEmailLabel,1,0);
126 topLayout->addWidget(mEmailEdit,1,1); 126 topLayout->addWidget(mEmailEdit,1,1);
127 QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame); 127 QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame);
128 topLayout->addMultiCellWidget(lab,2,2,0,1); 128 topLayout->addMultiCellWidget(lab,2,2,0,1);
129 KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"), 129 KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"),
130 &(KOPrefs::instance()->mUseKapi),topFrame); 130 &(KOPrefs::instance()->mUseKapi),topFrame);
131 topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1); 131 topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1);
132} 132}
133 133
134void KOPrefsDialog::setupMailTab() 134void KOPrefsDialog::setupMailTab()
135{ 135{
136 QFrame *topFrame = addPage(i18n("Mail"),0,0); 136 QFrame *topFrame = addPage(i18n("Mail"),0,0);
137 137
138 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 138 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
139 topLayout->setSpacing(spacingHint()); 139 topLayout->setSpacing(spacingHint());
140 topLayout->setMargin(marginHint()); 140 topLayout->setMargin(marginHint());
141 141
142 KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"), 142 KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"),
143 &(KOPrefs::instance()->mViewAsHtml),topFrame); 143 &(KOPrefs::instance()->mViewAsHtml),topFrame);
144 topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1); 144 topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1);
145 145
146 146
147 ttt = addWidBool(i18n("Send mails later"), 147 ttt = addWidBool(i18n("Send mails later"),
148 &(KOPrefs::instance()->mSendLater),topFrame); 148 &(KOPrefs::instance()->mSendLater),topFrame);
149 topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1); 149 topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1);
150 /*
150 mCodecEdit = new QLineEdit(topFrame); 151 mCodecEdit = new QLineEdit(topFrame);
151 topLayout->addMultiCellWidget( new QLabel(mCodecEdit, i18n("User defined codec for new mails:"), topFrame),2,2,0,1); 152 topLayout->addMultiCellWidget( new QLabel(mCodecEdit, i18n("User defined codec for new mails:"), topFrame),2,2,0,1);
152 topLayout->addMultiCellWidget(mCodecEdit,3,3,0,1); 153 topLayout->addMultiCellWidget(mCodecEdit,3,3,0,1);
153 topLayout->addMultiCellWidget( new QLabel(0, i18n("Example: iso-8859-15"), topFrame),4,4,0,1); 154 topLayout->addMultiCellWidget( new QLabel(0, i18n("Example: iso-8859-15"), topFrame),4,4,0,1);
154 155 */
155} 156}
156void KOPrefsDialog::setupFontsTab() 157void KOPrefsDialog::setupFontsTab()
157{ 158{
158 159
159 QFrame *topFrame = addPage(i18n("Fonts"),0,0); 160 QFrame *topFrame = addPage(i18n("Fonts"),0,0);
160 // DesktopIcon("fonts",KIcon::SizeMedium)); 161 // DesktopIcon("fonts",KIcon::SizeMedium));
161 162
162 QGridLayout *topLayout = new QGridLayout(topFrame,7,3); 163 QGridLayout *topLayout = new QGridLayout(topFrame,7,3);
163 topLayout->setSpacing(1); 164 topLayout->setSpacing(1);
164 topLayout->setMargin(3); 165 topLayout->setMargin(3);
165 KPrefsDialogWidFont * tVFont; 166 KPrefsDialogWidFont * tVFont;
166 int i = 0; 167 int i = 0;
167 KPrefsDialogWidFont *timeLabelsFont = 168 KPrefsDialogWidFont *timeLabelsFont =
168 addWidFont(i18n("OK"),i18n("Application(nr)"), 169 addWidFont(i18n("OK"),i18n("Application(nr)"),
169 &(KOPrefs::instance()->mAppFont),topFrame); 170 &(KOPrefs::instance()->mAppFont),topFrame);
170 topLayout->addWidget(timeLabelsFont->label(),i,0); 171 topLayout->addWidget(timeLabelsFont->label(),i,0);
171 topLayout->addWidget(timeLabelsFont->preview(),i,1); 172 topLayout->addWidget(timeLabelsFont->preview(),i,1);
172 topLayout->addWidget(timeLabelsFont->button(),i,2); 173 topLayout->addWidget(timeLabelsFont->button(),i,2);
173 ++i; 174 ++i;
174 175
175 176
176 timeLabelsFont = 177 timeLabelsFont =
177 addWidFont(i18n("Dear Mr."),i18n("Compose mail:"), 178 addWidFont(i18n("Dear Mr."),i18n("Compose mail:"),
178 &(KOPrefs::instance()->mComposeFont),topFrame); 179 &(KOPrefs::instance()->mComposeFont),topFrame);
179 topLayout->addWidget(timeLabelsFont->label(),i,0); 180 topLayout->addWidget(timeLabelsFont->label(),i,0);
180 topLayout->addWidget(timeLabelsFont->preview(),i,1); 181 topLayout->addWidget(timeLabelsFont->preview(),i,1);
181 topLayout->addWidget(timeLabelsFont->button(),i,2); 182 topLayout->addWidget(timeLabelsFont->button(),i,2);
182 ++i; 183 ++i;
183 184
184 KPrefsDialogWidFont *timeBarFont = 185 KPrefsDialogWidFont *timeBarFont =
185 addWidFont(i18n("Hello"),i18n("Read mail:"), 186 addWidFont(i18n("Hello"),i18n("Read mail:"),
186 &(KOPrefs::instance()->mReadFont),topFrame); 187 &(KOPrefs::instance()->mReadFont),topFrame);
187 topLayout->addWidget(timeBarFont->label(),i,0); 188 topLayout->addWidget(timeBarFont->label(),i,0);
188 topLayout->addWidget(timeBarFont->preview(),i,1); 189 topLayout->addWidget(timeBarFont->preview(),i,1);
189 topLayout->addWidget(timeBarFont->button(),i,2); 190 topLayout->addWidget(timeBarFont->button(),i,2);
190 ++i; 191 ++i;
191 192
192 topLayout->setColStretch(1,1); 193 topLayout->setColStretch(1,1);
193 topLayout->setRowStretch(4,1); 194 topLayout->setRowStretch(4,1);
194 195
195} 196}
196void KOPrefsDialog::usrReadConfig() 197void KOPrefsDialog::usrReadConfig()
197{ 198{
198 199
199 mNameEdit->setText(KOPrefs::instance()->mName); 200 mNameEdit->setText(KOPrefs::instance()->mName);
200 mEmailEdit->setText(KOPrefs::instance()->mEmail); 201 mEmailEdit->setText(KOPrefs::instance()->mEmail);
201 mCodecEdit->setText(KOPrefs::instance()->mSendCodec); 202 //mCodecEdit->setText(KOPrefs::instance()->mSendCodec);
202 kdelibcfg->readConfig(); 203 kdelibcfg->readConfig();
203} 204}
204void KOPrefsDialog::usrWriteConfig() 205void KOPrefsDialog::usrWriteConfig()
205{ 206{
206 KOPrefs::instance()->mName = mNameEdit->text(); 207 KOPrefs::instance()->mName = mNameEdit->text();
207 KOPrefs::instance()->mEmail = mEmailEdit->text(); 208 KOPrefs::instance()->mEmail = mEmailEdit->text();
208 KOPrefs::instance()->mSendCodec = mCodecEdit->text(); 209 //KOPrefs::instance()->mSendCodec = mCodecEdit->text();
209 kdelibcfg->writeConfig(); 210 kdelibcfg->writeConfig();
210 211
211 212
212} 213}
213 214
214#if 0 215#if 0
215void KOPrefsDialog::setupLocaleDateTab() 216void KOPrefsDialog::setupLocaleDateTab()
216{ 217{
217QFrame *topFrame = addPage(i18n("Date Format"),0,0); 218QFrame *topFrame = addPage(i18n("Date Format"),0,0);
218 QGridLayout *topLayout = new QGridLayout(topFrame,3,2); 219 QGridLayout *topLayout = new QGridLayout(topFrame,3,2);
219 topLayout->setSpacing(spacingHint()); 220 topLayout->setSpacing(spacingHint());
220 topLayout->setMargin(marginHint()); 221 topLayout->setMargin(marginHint());
221 int iii = 0; 222 int iii = 0;
222 223
223 224
224 KPrefsWidRadios *syncPrefsGroup = 225 KPrefsWidRadios *syncPrefsGroup =
225 addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); 226 addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame);
226 QString format; 227 QString format;
227 if ( QApplication::desktop()->width() < 480 ) 228 if ( QApplication::desktop()->width() < 480 )
228 format = "(%d.%m.%Y)"; 229 format = "(%d.%m.%Y)";
229 else 230 else
230 format = "(%d.%m.%Y|%A %d %B %Y)"; 231 format = "(%d.%m.%Y|%A %d %B %Y)";
231 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); 232 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format));
232 if ( QApplication::desktop()->width() < 480 ) 233 if ( QApplication::desktop()->width() < 480 )
233 format = "(%m.%d.%Y)"; 234 format = "(%m.%d.%Y)";
234 else 235 else
235 format = "(%m.%d.%Y|%A %B %d %Y)"; 236 format = "(%m.%d.%Y|%A %B %d %Y)";
236 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); 237 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format));
237 if ( QApplication::desktop()->width() < 480 ) 238 if ( QApplication::desktop()->width() < 480 )
238 format = "(%Y-%m-%d)"; 239 format = "(%Y-%m-%d)";
239 else 240 else
240 format = "(%Y-%m-%d|%A %Y %B %d)"; 241 format = "(%Y-%m-%d|%A %Y %B %d)";