summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-12-13 12:35:00 (UTC)
committer zautrix <zautrix>2004-12-13 12:35:00 (UTC)
commit7ac6c21e832b7d16bd0888d0b66252b6e152005a (patch) (unidiff)
treec7610e0e25020f19af82ac6257c2debab2638316
parent17b25691f0332e648dd1d800e89ccf4e1da8955d (diff)
downloadkdepimpi-7ac6c21e832b7d16bd0888d0b66252b6e152005a.zip
kdepimpi-7ac6c21e832b7d16bd0888d0b66252b6e152005a.tar.gz
kdepimpi-7ac6c21e832b7d16bd0888d0b66252b6e152005a.tar.bz2
many bugfixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt10
-rw-r--r--kaddressbook/kabcore.cpp11
-rw-r--r--kaddressbook/viewmanager.cpp11
-rw-r--r--kmicromail/libmailwrapper/settings.cpp2
-rw-r--r--kmicromail/opiemail.cpp27
-rw-r--r--kmicromail/opiemail.h2
-rw-r--r--kmicromail/viewmail.cpp5
-rw-r--r--kmicromail/viewmail.h1
-rw-r--r--korganizer/calendarview.cpp24
-rw-r--r--qtcompat/qinputdialog.cpp7
10 files changed, 80 insertions, 20 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 46d59a3..ec75fad 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -11,6 +11,16 @@ That means, you can restore the latest
11event/todo/journal you have deleted. 11event/todo/journal you have deleted.
12A journal is deleted, if you clear all the text of the journal. 12A journal is deleted, if you clear all the text of the journal.
13 13
14Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14.
15
16KA/Pi starting in 480x640 resolution:
17Hide the filter action in toolbar
18and added icons for undo/delete/redo in toolbar.
19
20Change in OM/Pi ViewMail dialog:
21When clicking on the "delete" icon the mail is deleted after confirmation as usual. But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any).
22
23Fixed a crash when deleting mail-accounts in OM/Pi.
14 24
15 25
16********** VERSION 1.9.14 ************ 26********** VERSION 1.9.14 ************
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index b7edccd..f6bdda4 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -787,6 +787,7 @@ void KABCore::resizeEvent(QResizeEvent* e )
787{ 787{
788 if ( !mMiniSplitter ) 788 if ( !mMiniSplitter )
789 return; 789 return;
790 //qDebug("KABCore::resizeEvent(QResizeEvent* e ) ");
790 if ( QApplication::desktop()->width() >= 480 ) { 791 if ( QApplication::desktop()->width() >= 480 ) {
791 if (QApplication::desktop()->width() == 640 ) { // e.g. 640x480 792 if (QApplication::desktop()->width() == 640 ) { // e.g. 640x480
792 if ( mMiniSplitter->orientation() == Qt::Vertical ) { 793 if ( mMiniSplitter->orientation() == Qt::Vertical ) {
@@ -2192,11 +2193,13 @@ void KABCore::addActionsManually()
2192 2193
2193 mActionSave->plug( tb ); 2194 mActionSave->plug( tb );
2194 mViewManager->getFilterAction()->plug ( tb); 2195 mViewManager->getFilterAction()->plug ( tb);
2195 if (KGlobal::getDesktopSize() == KGlobal::Desktop ) { 2196 //LR hide filteraction on started in 480x640
2196 mActionUndo->plug( tb ); 2197 if (QApplication::desktop()->width() == 480 ) {
2197 mActionDelete->plug( tb ); 2198 mViewManager->getFilterAction()->setComboWidth( 0 );
2198 mActionRedo->plug( tb );
2199 } 2199 }
2200 mActionUndo->plug( tb );
2201 mActionDelete->plug( tb );
2202 mActionRedo->plug( tb );
2200 } else { 2203 } else {
2201 mActionSave->plug( tb ); 2204 mActionSave->plug( tb );
2202 tb->enableMoving(false); 2205 tb->enableMoving(false);
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp
index 0d91c12..33bef5a 100644
--- a/kaddressbook/viewmanager.cpp
+++ b/kaddressbook/viewmanager.cpp
@@ -60,6 +60,7 @@ $Id$
60#include <kactionclasses.h> 60#include <kactionclasses.h>
61 61
62#include <qlayout.h> 62#include <qlayout.h>
63#include <qapplication.h>
63#include <qwidgetstack.h> 64#include <qwidgetstack.h>
64 65
65#include <kabc/addressbook.h> 66#include <kabc/addressbook.h>
@@ -106,7 +107,10 @@ void ViewManager::restoreSettings()
106 mFilterList = Filter::restore( mCore->config(), "Filter" ); 107 mFilterList = Filter::restore( mCore->config(), "Filter" );
107 mActionSelectFilter->setItems( filterNames() ); 108 mActionSelectFilter->setItems( filterNames() );
108 mActionSelectFilter->setCurrentItem( KABPrefs::instance()->mCurrentFilter ); 109 mActionSelectFilter->setCurrentItem( KABPrefs::instance()->mCurrentFilter );
109 mActionSelectFilter->setComboWidth( 150 ); 110 int cw = 150;
111 if (QApplication::desktop()->width() == 480 )
112 cw = 0;
113 mActionSelectFilter->setComboWidth( cw );
110 // Tell the views to reread their config, since they may have 114 // Tell the views to reread their config, since they may have
111 // been modified by global settings 115 // been modified by global settings
112 QString _oldgroup = mCore->config()->group(); 116 QString _oldgroup = mCore->config()->group();
@@ -597,7 +601,10 @@ void ViewManager::configureFilters()
597 mActionSelectFilter->setItems( filterNames() ); 601 mActionSelectFilter->setItems( filterNames() );
598 mActionSelectFilter->setCurrentItem( pos ); 602 mActionSelectFilter->setCurrentItem( pos );
599 setActiveFilter( pos ); 603 setActiveFilter( pos );
600 mActionSelectFilter->setComboWidth( 150 ); 604 int cw = 150;
605 if (QApplication::desktop()->width() == 480 )
606 cw = 0;
607 mActionSelectFilter->setComboWidth( cw );
601} 608}
602 609
603QStringList ViewManager::filterNames() const 610QStringList ViewManager::filterNames() const
diff --git a/kmicromail/libmailwrapper/settings.cpp b/kmicromail/libmailwrapper/settings.cpp
index 04afe7c..19093b1 100644
--- a/kmicromail/libmailwrapper/settings.cpp
+++ b/kmicromail/libmailwrapper/settings.cpp
@@ -50,8 +50,8 @@ void Settings::addAccount( Account *account )
50 50
51void Settings::delAccount( Account *account ) 51void Settings::delAccount( Account *account )
52{ 52{
53 accounts.remove( account );
54 account->remove(); 53 account->remove();
54 accounts.remove( account );
55} 55}
56 56
57void Settings::updateAccounts() 57void Settings::updateAccounts()
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index ec192ea..915b3e8 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -299,10 +299,35 @@ void OpieMail::replyMail()
299 delete settings; 299 delete settings;
300 300
301} 301}
302void OpieMail::closeViewMail(ViewMail * vm)
303{
304 vm->hide();
305}
306void OpieMail::deleteAndDisplayNextMail(ViewMail * vm)
307{
308 QListViewItem*item = mailView->currentItem();
309 if (!item ) {
310 closeViewMail(vm);
311 return;
312 }
313 RecMailP mail = ((MailListViewItem*)item)->data();
314 mail->Wrapper()->deleteMail( mail );
315 item = item->itemBelow();
316 if (!item ) {
317 closeViewMail(vm);
318 return;
319 }
320 mailView->setCurrentItem(item);
321 mail = ((MailListViewItem*)item)->data();
322 RecBodyP body = folderView->fetchBody(mail);
323 vm->setBody( body );
324 vm->setMail( mail );
325}
302void OpieMail::displayNextMail(ViewMail * vm) 326void OpieMail::displayNextMail(ViewMail * vm)
303{ 327{
304 QListViewItem*item = mailView->currentItem(); 328 QListViewItem*item = mailView->currentItem();
305 if (!item) return; 329 if (!item) return;
330 ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() );
306 item = item->itemBelow(); 331 item = item->itemBelow();
307 if (!item) { 332 if (!item) {
308 vm->setCaption(i18n("End of List" )); 333 vm->setCaption(i18n("End of List" ));
@@ -329,6 +354,8 @@ void OpieMail::displayMail()
329 readMail.resize( 640, 480); 354 readMail.resize( 640, 480);
330#endif 355#endif
331 connect( &readMail,SIGNAL( showNextMail(ViewMail *) ), this, SLOT( displayNextMail(ViewMail *) ) ); 356 connect( &readMail,SIGNAL( showNextMail(ViewMail *) ), this, SLOT( displayNextMail(ViewMail *) ) );
357 connect( &readMail,SIGNAL( deleteAndDisplayNextMail(ViewMail *) ), this, SLOT(deleteAndDisplayNextMail(ViewMail *) ) );
358
332 readMail.exec(); 359 readMail.exec();
333 360
334 if ( readMail.deleted ) 361 if ( readMail.deleted )
diff --git a/kmicromail/opiemail.h b/kmicromail/opiemail.h
index 30968a7..a81a34c 100644
--- a/kmicromail/opiemail.h
+++ b/kmicromail/opiemail.h
@@ -26,6 +26,7 @@ public slots:
26 virtual void appMessage(const QCString &msg, const QByteArray &data); 26 virtual void appMessage(const QCString &msg, const QByteArray &data);
27 virtual void message(const QCString &msg, const QByteArray &data); 27 virtual void message(const QCString &msg, const QByteArray &data);
28protected slots: 28protected slots:
29 virtual void deleteAndDisplayNextMail(ViewMail * vm);
29 virtual void displayNextMail(ViewMail * vm); 30 virtual void displayNextMail(ViewMail * vm);
30 virtual void slotSendQueued(); 31 virtual void slotSendQueued();
31 virtual void slotSearchMails(); 32 virtual void slotSearchMails();
@@ -47,6 +48,7 @@ protected slots:
47 void clearSelection(); 48 void clearSelection();
48 49
49private: 50private:
51 void closeViewMail(ViewMail * vm);
50 QString mPendingEmail; 52 QString mPendingEmail;
51 QString mPendingName; 53 QString mPendingName;
52 QByteArray mPendingData; 54 QByteArray mPendingData;
diff --git a/kmicromail/viewmail.cpp b/kmicromail/viewmail.cpp
index 60c764c..6d88cad 100644
--- a/kmicromail/viewmail.cpp
+++ b/kmicromail/viewmail.cpp
@@ -506,8 +506,9 @@ void ViewMail::slotDeleteMail( )
506{ 506{
507 if ( QMessageBox::warning(this, i18n("Delete Mail"), QString( i18n("<p>Do you really want to delete this mail? <br><br>" ) + m_mail[0] + " - " + m_mail[1] ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) 507 if ( QMessageBox::warning(this, i18n("Delete Mail"), QString( i18n("<p>Do you really want to delete this mail? <br><br>" ) + m_mail[0] + " - " + m_mail[1] ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
508 { 508 {
509 m_recMail->Wrapper()->deleteMail( m_recMail ); 509 emit deleteAndDisplayNextMail( this);
510 hide(); 510 //m_recMail->Wrapper()->deleteMail( m_recMail );
511 //hide();
511 deleted = true; 512 deleted = true;
512 } 513 }
513} 514}
diff --git a/kmicromail/viewmail.h b/kmicromail/viewmail.h
index c2c2ce3..d85b8b2 100644
--- a/kmicromail/viewmail.h
+++ b/kmicromail/viewmail.h
@@ -44,6 +44,7 @@ public:
44 bool deleted; 44 bool deleted;
45 signals: 45 signals:
46 void showNextMail(ViewMail*); 46 void showNextMail(ViewMail*);
47 void deleteAndDisplayNextMail(ViewMail *);
47protected: 48protected:
48 QString deHtml(const QString &string); 49 QString deHtml(const QString &string);
49 AttachItem* searchParent(const QValueList<int>&path); 50 AttachItem* searchParent(const QValueList<int>&path);
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 15c5dd9..a46cd87 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2473,8 +2473,9 @@ void CalendarView::showEventEditor()
2473#ifdef DESKTOP_VERSION 2473#ifdef DESKTOP_VERSION
2474 mEventEditor->show(); 2474 mEventEditor->show();
2475#else 2475#else
2476 if ( mEventEditor->width() != QApplication::desktop()->width() ) { 2476 if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) {
2477 qDebug("CalendarView: recreate mEventEditor "); 2477 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
2478 qDebug("CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() );
2478 delete mEventEditor; 2479 delete mEventEditor;
2479 mEventEditor = mDialogManager->getEventEditor(); 2480 mEventEditor = mDialogManager->getEventEditor();
2480 } 2481 }
@@ -2486,8 +2487,9 @@ void CalendarView::showTodoEditor()
2486#ifdef DESKTOP_VERSION 2487#ifdef DESKTOP_VERSION
2487 mTodoEditor->show(); 2488 mTodoEditor->show();
2488#else 2489#else
2489 if ( mTodoEditor->width() != QApplication::desktop()->width() ) { 2490 if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) {
2490 qDebug("CalendarView: recreate mTodoEditor "); 2491 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
2492 qDebug("CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() );
2491 delete mTodoEditor; 2493 delete mTodoEditor;
2492 mTodoEditor = mDialogManager->getTodoEditor(); 2494 mTodoEditor = mDialogManager->getTodoEditor();
2493 } 2495 }
@@ -2542,8 +2544,8 @@ void CalendarView::cloneIncidence(Incidence * orgInc )
2542 2544
2543 if ( newInc->type() == "Todo" ) { 2545 if ( newInc->type() == "Todo" ) {
2544 Todo* t = (Todo*) newInc; 2546 Todo* t = (Todo*) newInc;
2545 mTodoEditor->editTodo( t );
2546 showTodoEditor(); 2547 showTodoEditor();
2548 mTodoEditor->editTodo( t );
2547 if ( mTodoEditor->exec() ) { 2549 if ( mTodoEditor->exec() ) {
2548 mCalendar->addTodo( t ); 2550 mCalendar->addTodo( t );
2549 updateView(); 2551 updateView();
@@ -2553,8 +2555,8 @@ void CalendarView::cloneIncidence(Incidence * orgInc )
2553 } 2555 }
2554 else { 2556 else {
2555 Event* e = (Event*) newInc; 2557 Event* e = (Event*) newInc;
2556 mEventEditor->editEvent( e );
2557 showEventEditor(); 2558 showEventEditor();
2559 mEventEditor->editEvent( e );
2558 if ( mEventEditor->exec() ) { 2560 if ( mEventEditor->exec() ) {
2559 mCalendar->addEvent( e ); 2561 mCalendar->addEvent( e );
2560 updateView(); 2562 updateView();
@@ -2606,6 +2608,7 @@ void CalendarView::newEvent(QDate dt)
2606void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay) 2608void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay)
2607{ 2609{
2608 2610
2611 showEventEditor();
2609 mEventEditor->newEvent(fromHint,toHint,allDay); 2612 mEventEditor->newEvent(fromHint,toHint,allDay);
2610 if ( mFilterView->filtersEnabled() ) { 2613 if ( mFilterView->filtersEnabled() ) {
2611 CalFilter *filter = mFilterView->selectedFilter(); 2614 CalFilter *filter = mFilterView->selectedFilter();
@@ -2615,7 +2618,6 @@ void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay)
2615 if ( filter ) 2618 if ( filter )
2616 mEventEditor->setSecrecy( filter->getSecrecy() ); 2619 mEventEditor->setSecrecy( filter->getSecrecy() );
2617 } 2620 }
2618 showEventEditor();
2619} 2621}
2620void CalendarView::todoAdded(Todo * t) 2622void CalendarView::todoAdded(Todo * t)
2621{ 2623{
@@ -2644,6 +2646,7 @@ void CalendarView::todoDeleted()
2644void CalendarView::newTodo() 2646void CalendarView::newTodo()
2645{ 2647{
2646 2648
2649 showTodoEditor();
2647 mTodoEditor->newTodo(QDateTime::currentDateTime().addDays(7),0,true); 2650 mTodoEditor->newTodo(QDateTime::currentDateTime().addDays(7),0,true);
2648 if ( mFilterView->filtersEnabled() ) { 2651 if ( mFilterView->filtersEnabled() ) {
2649 CalFilter *filter = mFilterView->selectedFilter(); 2652 CalFilter *filter = mFilterView->selectedFilter();
@@ -2653,7 +2656,6 @@ void CalendarView::newTodo()
2653 if ( filter ) 2656 if ( filter )
2654 mTodoEditor->setSecrecy( filter->getSecrecy() ); 2657 mTodoEditor->setSecrecy( filter->getSecrecy() );
2655 } 2658 }
2656 showTodoEditor();
2657} 2659}
2658 2660
2659void CalendarView::newSubTodo() 2661void CalendarView::newSubTodo()
@@ -2665,8 +2667,8 @@ void CalendarView::newSubTodo()
2665void CalendarView::newSubTodo(Todo *parentEvent) 2667void CalendarView::newSubTodo(Todo *parentEvent)
2666{ 2668{
2667 2669
2668 mTodoEditor->newTodo(QDateTime::currentDateTime().addDays(7),parentEvent,true);
2669 showTodoEditor(); 2670 showTodoEditor();
2671 mTodoEditor->newTodo(QDateTime::currentDateTime().addDays(7),parentEvent,true);
2670} 2672}
2671 2673
2672void CalendarView::newFloatingEvent() 2674void CalendarView::newFloatingEvent()
@@ -2687,8 +2689,8 @@ void CalendarView::editEvent( Event *event )
2687 showEvent( event ); 2689 showEvent( event );
2688 return; 2690 return;
2689 } 2691 }
2690 mEventEditor->editEvent( event , mFlagEditDescription);
2691 showEventEditor(); 2692 showEventEditor();
2693 mEventEditor->editEvent( event , mFlagEditDescription);
2692} 2694}
2693void CalendarView::editJournal( Journal *jour ) 2695void CalendarView::editJournal( Journal *jour )
2694{ 2696{
@@ -2705,8 +2707,8 @@ void CalendarView::editTodo( Todo *todo )
2705 showTodo( todo ); 2707 showTodo( todo );
2706 return; 2708 return;
2707 } 2709 }
2708 mTodoEditor->editTodo( todo ,mFlagEditDescription);
2709 showTodoEditor(); 2710 showTodoEditor();
2711 mTodoEditor->editTodo( todo ,mFlagEditDescription);
2710 2712
2711} 2713}
2712 2714
diff --git a/qtcompat/qinputdialog.cpp b/qtcompat/qinputdialog.cpp
index 770b281..64c581e 100644
--- a/qtcompat/qinputdialog.cpp
+++ b/qtcompat/qinputdialog.cpp
@@ -35,6 +35,8 @@
35** 35**
36**********************************************************************/ 36**********************************************************************/
37 37
38//Edited Lutz Rogowski 2004-12-13
39
38#include "qinputdialog.h" 40#include "qinputdialog.h"
39 41
40#include <qlayout.h> 42#include <qlayout.h>
@@ -453,6 +455,11 @@ QString QInputDialog::getItem( const QString &caption, const QString &label, con
453 455
454 bool ok_ = FALSE; 456 bool ok_ = FALSE;
455 QString result; 457 QString result;
458 int fixWid = 320;
459 if ( QApplication::desktop()->width() <= 240 ) {
460 fixWid = 230;
461 }
462 dlg->setFixedWidth( fixWid);
456 ok_ = dlg->exec() == QDialog::Accepted; 463 ok_ = dlg->exec() == QDialog::Accepted;
457 if ( ok ) 464 if ( ok )
458 *ok = ok_; 465 *ok = ok_;