-rw-r--r-- | kmicromail/mainwindow.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp index 3dde3cd..d547dda 100644 --- a/kmicromail/mainwindow.cpp +++ b/kmicromail/mainwindow.cpp | |||
@@ -252,196 +252,195 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) | |||
252 | //menuBar->setMaximumSize( menuBar->sizeHint()); | 252 | //menuBar->setMaximumSize( menuBar->sizeHint()); |
253 | #ifdef DESKTOP_VERSION | 253 | #ifdef DESKTOP_VERSION |
254 | resize ( 640, 480 ); | 254 | resize ( 640, 480 ); |
255 | #endif | 255 | #endif |
256 | } | 256 | } |
257 | 257 | ||
258 | MainWindow::~MainWindow() | 258 | MainWindow::~MainWindow() |
259 | { | 259 | { |
260 | } | 260 | } |
261 | 261 | ||
262 | void MainWindow::setInfoFields(QListViewItem* item ) | 262 | void MainWindow::setInfoFields(QListViewItem* item ) |
263 | { | 263 | { |
264 | if ( item == 0) { | 264 | if ( item == 0) { |
265 | if ( subLE ) subLE->setText(""); | 265 | if ( subLE ) subLE->setText(""); |
266 | if ( fromLE ) fromLE->setText(""); | 266 | if ( fromLE ) fromLE->setText(""); |
267 | if ( toLE ) toLE->setText(""); | 267 | if ( toLE ) toLE->setText(""); |
268 | return; | 268 | return; |
269 | } | 269 | } |
270 | RecMailP mail = ((MailListViewItem*)item)->data(); | 270 | RecMailP mail = ((MailListViewItem*)item)->data(); |
271 | if ( subLE ) subLE->setText(mail->getSubject()); | 271 | if ( subLE ) subLE->setText(mail->getSubject()); |
272 | if ( fromLE ) fromLE->setText(mail->getFrom()); | 272 | if ( fromLE ) fromLE->setText(mail->getFrom()); |
273 | if ( toLE ) toLE->setText(mail->To().join(";" )); | 273 | if ( toLE ) toLE->setText(mail->To().join(";" )); |
274 | if ( subLE ) subLE->setCursorPosition(0); | 274 | if ( subLE ) subLE->setCursorPosition(0); |
275 | if ( fromLE ) fromLE->setCursorPosition(0); | 275 | if ( fromLE ) fromLE->setCursorPosition(0); |
276 | if ( toLE ) toLE->setCursorPosition(0); | 276 | if ( toLE ) toLE->setCursorPosition(0); |
277 | 277 | ||
278 | } | 278 | } |
279 | void MainWindow::slotSetCodec( int codec ) | 279 | void MainWindow::slotSetCodec( int codec ) |
280 | { | 280 | { |
281 | codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, false ); | 281 | codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, false ); |
282 | //qDebug("codec %d ", codec); | 282 | //qDebug("codec %d ", codec); |
283 | KOPrefs::instance()->mCurrentCodec = codec; | 283 | KOPrefs::instance()->mCurrentCodec = codec; |
284 | KOPrefs::instance()->isDirty = true; | 284 | KOPrefs::instance()->isDirty = true; |
285 | QString name; | 285 | QString name; |
286 | switch ( codec ) { | 286 | switch ( codec ) { |
287 | case 0: | 287 | case 0: |
288 | name = "iso-8859-1"; | 288 | name = "iso-8859-1"; |
289 | break; | 289 | break; |
290 | case 1: | 290 | case 1: |
291 | name = "iso-8859-5"; | 291 | name = "iso-8859-5"; |
292 | break; | 292 | break; |
293 | case 2: | 293 | case 2: |
294 | name = "iso-8859-15"; | 294 | name = "iso-8859-15"; |
295 | break; | 295 | break; |
296 | case 3: | 296 | case 3: |
297 | name = "big-5"; | 297 | name = "big-5"; |
298 | break; | 298 | break; |
299 | case 4: | 299 | case 4: |
300 | name = "utf-8"; | 300 | name = "utf-8"; |
301 | break; | 301 | break; |
302 | case 5: | 302 | case 5: |
303 | name = KOPrefs::instance()->mSendCodec.lower(); | 303 | name = KOPrefs::instance()->mSendCodec.lower(); |
304 | break; | 304 | break; |
305 | } | 305 | } |
306 | KOPrefs::instance()->mCurrentCodeName = name ; | 306 | KOPrefs::instance()->mCurrentCodeName = name ; |
307 | codecMenu->changeItem ( 5, "Userdefined ("+KOPrefs::instance()->mSendCodec+")"); | 307 | codecMenu->changeItem ( 5, "Userdefined ("+KOPrefs::instance()->mSendCodec+")"); |
308 | codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, true ); | 308 | codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, true ); |
309 | } | 309 | } |
310 | void MainWindow::showLicence() | 310 | void MainWindow::showLicence() |
311 | { | 311 | { |
312 | KApplication::showLicence(); | 312 | KApplication::showLicence(); |
313 | } | 313 | } |
314 | void MainWindow::showAbout() | 314 | void MainWindow::showAbout() |
315 | { | 315 | { |
316 | QString version; | 316 | QString version; |
317 | #include <../version> | 317 | #include <../version> |
318 | 318 | ||
319 | QString cap = "About KOpieMail/Pi"; | 319 | QString cap = "About KOpieMail/Pi"; |
320 | QString text =i18n("KOpieMail/Platform-independent\n") + | 320 | QString text =i18n("KOpieMail/Platform-independent\n") + |
321 | "(OM/Pi) " + version + " - " | 321 | "(OM/Pi) " + version + " - " |
322 | 322 | ||
323 | #ifdef DESKTOP_VERSION | 323 | #ifdef DESKTOP_VERSION |
324 | "Desktop Edition\n" | 324 | "Desktop Edition\n" |
325 | #else | 325 | #else |
326 | "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n" | 326 | "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n" |
327 | #endif | 327 | #endif |
328 | "www.pi-sync.info\n\n" | 328 | "www.pi-sync.info\n\n" |
329 | 329 | ||
330 | 330 | ||
331 | 331 | ||
332 | "Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.info>\n" | 332 | "Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.info>\n" |
333 | "KOpieMail/Pi is based on Opie Mail\n" | 333 | "KOpieMail/Pi is based on Opie Mail\n" |
334 | "Copyright (c) Rajko Albrecht and the Opie team\n" | 334 | "Copyright (c) Rajko Albrecht and the Opie team\n" |
335 | "KOpieMail/Pi is licensed under the GPL\n" | 335 | "KOpieMail/Pi is licensed under the GPL\n" |
336 | "\n" | 336 | "\n" |
337 | "KOpieMail/Pi uses LibEtPan - a mail stuff library\n" | 337 | "KOpieMail/Pi uses LibEtPan - a mail stuff library\n" |
338 | "Copyright (C) 2001, 2002 - DINH Viet Hoa\n" | 338 | "Copyright (C) 2001, 2002 - DINH Viet Hoa\n" |
339 | "libEtPan has its own licence - see LibEtPan licence\n"; | 339 | "libEtPan has its own licence - see LibEtPan licence\n"; |
340 | 340 | ||
341 | KApplication::showText( cap, text ); | 341 | KApplication::showText( cap, text ); |
342 | } | 342 | } |
343 | void MainWindow::showEtpanLicence() | 343 | void MainWindow::showEtpanLicence() |
344 | { | 344 | { |
345 | KApplication::showFile( "LibEtPan licence", "kdepim/kopiemail/COPYRIGHTlibetpan" ); | 345 | KApplication::showFile( "LibEtPan licence", "kdepim/kopiemail/COPYRIGHTlibetpan" ); |
346 | 346 | ||
347 | } | 347 | } |
348 | void MainWindow::appMessage(const QCString &, const QByteArray &) | 348 | void MainWindow::appMessage(const QCString &, const QByteArray &) |
349 | { | 349 | { |
350 | qDebug("appMessage implemented by subclass"); | 350 | qDebug("appMessage implemented by subclass"); |
351 | } | 351 | } |
352 | 352 | ||
353 | void MainWindow::slotAdjustLayout() { | 353 | void MainWindow::slotAdjustLayout() { |
354 | 354 | ||
355 | /* | 355 | /* |
356 | QWidget *d = QApplication::desktop(); | 356 | QWidget *d = QApplication::desktop(); |
357 | 357 | ||
358 | if ( d->width() < d->height() ) { | 358 | if ( d->width() < d->height() ) { |
359 | layout->setDirection( QBoxLayout::TopToBottom ); | 359 | layout->setDirection( QBoxLayout::TopToBottom ); |
360 | } else { | 360 | } else { |
361 | layout->setDirection( QBoxLayout::LeftToRight ); | 361 | layout->setDirection( QBoxLayout::LeftToRight ); |
362 | } | 362 | } |
363 | */ | 363 | */ |
364 | } | 364 | } |
365 | 365 | ||
366 | void MainWindow::slotAdjustColumns() | 366 | void MainWindow::slotAdjustColumns() |
367 | { | 367 | { |
368 | 368 | ||
369 | if ( !folderView->isHidden() ) | 369 | if ( !folderView->isHidden() ) |
370 | folderView->setColumnWidth( 0, folderView->visibleWidth() ); | 370 | folderView->setColumnWidth( 0, folderView->visibleWidth() ); |
371 | 371 | ||
372 | mailView->setColumnWidth( 0, 10 ); | 372 | mailView->setColumnWidth( 0, 10 ); |
373 | mailView->setColumnWidth( 1, 100 ); | 373 | mailView->setColumnWidth( 1, 100 ); |
374 | mailView->setColumnWidth( 2, 100 ); | 374 | mailView->setColumnWidth( 2, 100 ); |
375 | mailView->setColumnWidth( 3, 70 ); | 375 | mailView->setColumnWidth( 3, 70 ); |
376 | mailView->setColumnWidth( 4, 180 ); | 376 | mailView->setColumnWidth( 4, 180 ); |
377 | if ( KOPrefs::instance()->mShowToField ) | 377 | if ( KOPrefs::instance()->mShowToField ) |
378 | mailView->setColumnWidth( 5, 100 ); | 378 | mailView->setColumnWidth( 5, 100 ); |
379 | mailView->setColumnAlignment( 3, AlignRight); | 379 | mailView->setColumnAlignment( 3, AlignRight); |
380 | mailView->setColumnAlignment( 4, AlignRight); | ||
381 | } | 380 | } |
382 | void MainWindow::slotAdjustColumnsWide() | 381 | void MainWindow::slotAdjustColumnsWide() |
383 | { | 382 | { |
384 | if ( !folderView->isHidden() ) | 383 | if ( !folderView->isHidden() ) |
385 | folderView->setColumnWidth( 0, folderView->visibleWidth() ); | 384 | folderView->setColumnWidth( 0, folderView->visibleWidth() ); |
386 | 385 | ||
387 | mailView->setColumnWidth( 0, 10 ); | 386 | mailView->setColumnWidth( 0, 10 ); |
388 | mailView->setColumnWidth( 1, 200 ); | 387 | mailView->setColumnWidth( 1, 200 ); |
389 | mailView->setColumnWidth( 2, 200 ); | 388 | mailView->setColumnWidth( 2, 200 ); |
390 | mailView->setColumnWidth( 3, 70 ); | 389 | mailView->setColumnWidth( 3, 70 ); |
391 | mailView->setColumnWidth( 4, 180 ); | 390 | mailView->setColumnWidth( 4, 180 ); |
392 | if ( KOPrefs::instance()->mShowToField ) | 391 | if ( KOPrefs::instance()->mShowToField ) |
393 | mailView->setColumnWidth( 5, 100 ); | 392 | mailView->setColumnWidth( 5, 100 ); |
394 | mailView->setColumnAlignment( 3, AlignRight); | 393 | mailView->setColumnAlignment( 3, AlignRight); |
395 | } | 394 | } |
396 | 395 | ||
397 | void MainWindow::slotEditSettings() | 396 | void MainWindow::slotEditSettings() |
398 | { | 397 | { |
399 | } | 398 | } |
400 | void MainWindow::slotEditGlobalSettings() | 399 | void MainWindow::slotEditGlobalSettings() |
401 | { | 400 | { |
402 | } | 401 | } |
403 | 402 | ||
404 | void MainWindow::slotShowFolders( bool ) | 403 | void MainWindow::slotShowFolders( bool ) |
405 | { | 404 | { |
406 | qDebug("not implemented: "); | 405 | qDebug("not implemented: "); |
407 | } | 406 | } |
408 | 407 | ||
409 | void MainWindow::refreshMailView(const QValueList<RecMailP>&) | 408 | void MainWindow::refreshMailView(const QValueList<RecMailP>&) |
410 | { | 409 | { |
411 | qDebug("not implemented: "); | 410 | qDebug("not implemented: "); |
412 | } | 411 | } |
413 | 412 | ||
414 | void MainWindow::mailLeftClicked(QListViewItem * ) | 413 | void MainWindow::mailLeftClicked(QListViewItem * ) |
415 | { | 414 | { |
416 | qDebug("not implemented: "); | 415 | qDebug("not implemented: "); |
417 | } | 416 | } |
418 | 417 | ||
419 | void MainWindow::displayMail() | 418 | void MainWindow::displayMail() |
420 | { | 419 | { |
421 | qDebug("not implemented: "); | 420 | qDebug("not implemented: "); |
422 | } | 421 | } |
423 | 422 | ||
424 | void MainWindow::slotDeleteMail() | 423 | void MainWindow::slotDeleteMail() |
425 | { | 424 | { |
426 | qDebug("not implemented: "); | 425 | qDebug("not implemented: "); |
427 | } | 426 | } |
428 | 427 | ||
429 | void MainWindow::mailHold(int, QListViewItem *,const QPoint&,int ) | 428 | void MainWindow::mailHold(int, QListViewItem *,const QPoint&,int ) |
430 | { | 429 | { |
431 | qDebug("not implemented: "); | 430 | qDebug("not implemented: "); |
432 | } | 431 | } |
433 | 432 | ||
434 | void MainWindow::slotSendQueued() | 433 | void MainWindow::slotSendQueued() |
435 | { | 434 | { |
436 | qDebug("not implemented: "); | 435 | qDebug("not implemented: "); |
437 | } | 436 | } |
438 | 437 | ||
439 | void MainWindow::slotEditAccounts() | 438 | void MainWindow::slotEditAccounts() |
440 | { | 439 | { |
441 | qDebug("not implemented: "); | 440 | qDebug("not implemented: "); |
442 | } | 441 | } |
443 | 442 | ||
444 | void MainWindow::slotComposeMail() | 443 | void MainWindow::slotComposeMail() |
445 | { | 444 | { |
446 | qDebug("not implemented: "); | 445 | qDebug("not implemented: "); |
447 | } | 446 | } |