-rw-r--r-- | bin/kdepim/WhatsNew.txt | 10 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 11 | ||||
-rw-r--r-- | kaddressbook/viewmanager.cpp | 11 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/settings.cpp | 2 | ||||
-rw-r--r-- | kmicromail/opiemail.cpp | 27 | ||||
-rw-r--r-- | kmicromail/opiemail.h | 2 | ||||
-rw-r--r-- | kmicromail/viewmail.cpp | 5 | ||||
-rw-r--r-- | kmicromail/viewmail.h | 1 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 24 | ||||
-rw-r--r-- | qtcompat/qinputdialog.cpp | 7 |
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 | |||
@@ -6,16 +6,26 @@ Usebilty enhancements in KO/Pi: | |||
6 | When clicking on the date in a month view cell, the day view is shown. | 6 | When clicking on the date in a month view cell, the day view is shown. |
7 | Old behaviour was, that the "new event" dialog popped up. | 7 | Old behaviour was, that the "new event" dialog popped up. |
8 | 8 | ||
9 | Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). | 9 | Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). |
10 | That means, you can restore the latest | 10 | That means, you can restore the latest |
11 | event/todo/journal you have deleted. | 11 | event/todo/journal you have deleted. |
12 | A journal is deleted, if you clear all the text of the journal. | 12 | A journal is deleted, if you clear all the text of the journal. |
13 | 13 | ||
14 | Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. | ||
15 | |||
16 | KA/Pi starting in 480x640 resolution: | ||
17 | Hide the filter action in toolbar | ||
18 | and added icons for undo/delete/redo in toolbar. | ||
19 | |||
20 | Change in OM/Pi ViewMail dialog: | ||
21 | When 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 | |||
23 | Fixed a crash when deleting mail-accounts in OM/Pi. | ||
14 | 24 | ||
15 | 25 | ||
16 | ********** VERSION 1.9.14 ************ | 26 | ********** VERSION 1.9.14 ************ |
17 | 27 | ||
18 | Fixed some problems with the dialog sizes when switching | 28 | Fixed some problems with the dialog sizes when switching |
19 | portrait/landscape mode on 640x480 PDA display. | 29 | portrait/landscape mode on 640x480 PDA display. |
20 | 30 | ||
21 | Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. | 31 | Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. |
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index b7edccd..f6bdda4 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -782,16 +782,17 @@ void KABCore::updateMainWindow() | |||
782 | 782 | ||
783 | mMainWindow->showMaximized(); | 783 | mMainWindow->showMaximized(); |
784 | mMainWindow->update(); | 784 | mMainWindow->update(); |
785 | } | 785 | } |
786 | void KABCore::resizeEvent(QResizeEvent* e ) | 786 | 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 ) { |
793 | mMiniSplitter->setOrientation( Qt::Horizontal); | 794 | mMiniSplitter->setOrientation( Qt::Horizontal); |
794 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); | 795 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); |
795 | if ( QApplication::desktop()->width() <= 640 ) { | 796 | if ( QApplication::desktop()->width() <= 640 ) { |
796 | //mMainWindow->setMaximumSize( QApplication::desktop()->size() ); | 797 | //mMainWindow->setMaximumSize( QApplication::desktop()->size() ); |
797 | mViewManager->getFilterAction()->setComboWidth( 150 ); | 798 | mViewManager->getFilterAction()->setComboWidth( 150 ); |
@@ -2187,21 +2188,23 @@ void KABCore::addActionsManually() | |||
2187 | mActionFaq->plug( helpMenu ); | 2188 | mActionFaq->plug( helpMenu ); |
2188 | mActionLicence->plug( helpMenu ); | 2189 | mActionLicence->plug( helpMenu ); |
2189 | mActionAboutKAddressbook->plug( helpMenu ); | 2190 | mActionAboutKAddressbook->plug( helpMenu ); |
2190 | 2191 | ||
2191 | if (KGlobal::getDesktopSize() > KGlobal::Small ) { | 2192 | if (KGlobal::getDesktopSize() > KGlobal::Small ) { |
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); |
2203 | } | 2206 | } |
2204 | //mActionQuit->plug ( tb ); | 2207 | //mActionQuit->plug ( tb ); |
2205 | // tb->insertWidget(-1, 0, mIncSearchWidget, 6); | 2208 | // tb->insertWidget(-1, 0, mIncSearchWidget, 6); |
2206 | 2209 | ||
2207 | //US link the searchwidget first to this. | 2210 | //US link the searchwidget first to this. |
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp index 0d91c12..33bef5a 100644 --- a/kaddressbook/viewmanager.cpp +++ b/kaddressbook/viewmanager.cpp | |||
@@ -55,16 +55,17 @@ $Id$ | |||
55 | 55 | ||
56 | #endif //KAB_EMBEDDED | 56 | #endif //KAB_EMBEDDED |
57 | 57 | ||
58 | 58 | ||
59 | #include <kdebug.h> | 59 | #include <kdebug.h> |
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> |
66 | #include "filtereditdialog.h" | 67 | #include "filtereditdialog.h" |
67 | #include "addviewdialog.h" | 68 | #include "addviewdialog.h" |
68 | #include "kabcore.h" | 69 | #include "kabcore.h" |
69 | #include "kabprefs.h" | 70 | #include "kabprefs.h" |
70 | #include "viewmanager.h" | 71 | #include "viewmanager.h" |
@@ -101,17 +102,20 @@ void ViewManager::restoreSettings() | |||
101 | QString activeViewName = KABPrefs::instance()->mCurrentView; | 102 | QString activeViewName = KABPrefs::instance()->mCurrentView; |
102 | 103 | ||
103 | mActionSelectView->setItems( mViewNameList ); | 104 | mActionSelectView->setItems( mViewNameList ); |
104 | 105 | ||
105 | // Filter | 106 | // Filter |
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(); |
113 | 117 | ||
114 | QDictIterator<KAddressBookView> it( mViewDict ); | 118 | QDictIterator<KAddressBookView> it( mViewDict ); |
115 | for ( it.toFirst(); it.current(); ++it ) { | 119 | for ( it.toFirst(); it.current(); ++it ) { |
116 | KConfigGroupSaver saver( mCore->config(), it.currentKey() ); | 120 | KConfigGroupSaver saver( mCore->config(), it.currentKey() ); |
117 | it.current()->readConfig( mCore->config() ); | 121 | it.current()->readConfig( mCore->config() ); |
@@ -592,17 +596,20 @@ void ViewManager::configureFilters() | |||
592 | 596 | ||
593 | if ( dlg.exec() ) | 597 | if ( dlg.exec() ) |
594 | mFilterList = dlg.filters(); | 598 | mFilterList = dlg.filters(); |
595 | 599 | ||
596 | uint pos = mActionSelectFilter->currentItem(); | 600 | uint pos = mActionSelectFilter->currentItem(); |
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 | ||
603 | QStringList ViewManager::filterNames() const | 610 | QStringList ViewManager::filterNames() const |
604 | { | 611 | { |
605 | QStringList names( i18n( "No Filter" ) ); | 612 | QStringList names( i18n( "No Filter" ) ); |
606 | 613 | ||
607 | Filter::List::ConstIterator it; | 614 | Filter::List::ConstIterator it; |
608 | for ( it = mFilterList.begin(); it != mFilterList.end(); ++it ) | 615 | for ( it = mFilterList.begin(); it != mFilterList.end(); ++it ) |
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 | |||
@@ -45,18 +45,18 @@ QList<Account> Settings::getAccounts() | |||
45 | 45 | ||
46 | void Settings::addAccount( Account *account ) | 46 | void Settings::addAccount( Account *account ) |
47 | { | 47 | { |
48 | accounts.append( account ); | 48 | accounts.append( account ); |
49 | } | 49 | } |
50 | 50 | ||
51 | void Settings::delAccount( Account *account ) | 51 | void Settings::delAccount( Account *account ) |
52 | { | 52 | { |
53 | accounts.remove( account ); | ||
54 | account->remove(); | 53 | account->remove(); |
54 | accounts.remove( account ); | ||
55 | } | 55 | } |
56 | 56 | ||
57 | void Settings::updateAccounts() | 57 | void Settings::updateAccounts() |
58 | { | 58 | { |
59 | accounts.clear(); | 59 | accounts.clear(); |
60 | QDir dir( locateLocal("data", "kopiemail" ) ); | 60 | QDir dir( locateLocal("data", "kopiemail" ) ); |
61 | QStringList::Iterator it; | 61 | QStringList::Iterator it; |
62 | 62 | ||
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp index ec192ea..915b3e8 100644 --- a/kmicromail/opiemail.cpp +++ b/kmicromail/opiemail.cpp | |||
@@ -294,20 +294,45 @@ void OpieMail::replyMail() | |||
294 | composer.setCharset( body->getCharset() ); | 294 | composer.setCharset( body->getCharset() ); |
295 | if ( QDialog::Accepted == KApplication::execDialog( &composer ) ) | 295 | if ( QDialog::Accepted == KApplication::execDialog( &composer ) ) |
296 | { | 296 | { |
297 | mail->Wrapper()->answeredMail(mail); | 297 | mail->Wrapper()->answeredMail(mail); |
298 | } | 298 | } |
299 | delete settings; | 299 | delete settings; |
300 | 300 | ||
301 | } | 301 | } |
302 | void OpieMail::closeViewMail(ViewMail * vm) | ||
303 | { | ||
304 | vm->hide(); | ||
305 | } | ||
306 | void 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 | } | ||
302 | void OpieMail::displayNextMail(ViewMail * vm) | 326 | void 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" )); |
309 | return; | 334 | return; |
310 | } | 335 | } |
311 | mailView->setCurrentItem(item); | 336 | mailView->setCurrentItem(item); |
312 | RecMailP mail = ((MailListViewItem*)item)->data(); | 337 | RecMailP mail = ((MailListViewItem*)item)->data(); |
313 | RecBodyP body = folderView->fetchBody(mail); | 338 | RecBodyP body = folderView->fetchBody(mail); |
@@ -324,16 +349,18 @@ void OpieMail::displayMail() | |||
324 | readMail.setBody( body ); | 349 | readMail.setBody( body ); |
325 | readMail.setMail( mail ); | 350 | readMail.setMail( mail ); |
326 | #ifndef DESKTOP_VERSION | 351 | #ifndef DESKTOP_VERSION |
327 | readMail.showMaximized(); | 352 | readMail.showMaximized(); |
328 | #else | 353 | #else |
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 ) |
335 | { | 362 | { |
336 | folderView->refreshCurrent(); | 363 | folderView->refreshCurrent(); |
337 | } | 364 | } |
338 | else | 365 | else |
339 | { | 366 | { |
diff --git a/kmicromail/opiemail.h b/kmicromail/opiemail.h index 30968a7..a81a34c 100644 --- a/kmicromail/opiemail.h +++ b/kmicromail/opiemail.h | |||
@@ -21,16 +21,17 @@ public: | |||
21 | public slots: | 21 | public slots: |
22 | virtual void slotwriteMail(const QString&name,const QString&email); | 22 | virtual void slotwriteMail(const QString&name,const QString&email); |
23 | virtual void slotwriteMail2(const QString&nameemail); | 23 | virtual void slotwriteMail2(const QString&nameemail); |
24 | virtual void slotComposeMail(); | 24 | virtual void slotComposeMail(); |
25 | virtual void slotExtAppHandler(); | 25 | virtual void slotExtAppHandler(); |
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); |
28 | protected slots: | 28 | protected 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(); |
32 | virtual void slotEditSettings(); | 33 | virtual void slotEditSettings(); |
33 | virtual void slotEditAccounts(); | 34 | virtual void slotEditAccounts(); |
34 | virtual void displayMail(); | 35 | virtual void displayMail(); |
35 | virtual void replyMail(); | 36 | virtual void replyMail(); |
36 | virtual void slotDeleteMail(); | 37 | virtual void slotDeleteMail(); |
@@ -42,16 +43,17 @@ protected slots: | |||
42 | virtual void refreshMailView(const QValueList<RecMailP>&); | 43 | virtual void refreshMailView(const QValueList<RecMailP>&); |
43 | virtual void mailLeftClicked( QListViewItem * ); | 44 | virtual void mailLeftClicked( QListViewItem * ); |
44 | virtual void slotMoveCopyMail(); | 45 | virtual void slotMoveCopyMail(); |
45 | virtual void slotMoveCopyAllMail(); | 46 | virtual void slotMoveCopyAllMail(); |
46 | virtual void reEditMail(); | 47 | virtual void reEditMail(); |
47 | void clearSelection(); | 48 | void clearSelection(); |
48 | 49 | ||
49 | private: | 50 | private: |
51 | void closeViewMail(ViewMail * vm); | ||
50 | QString mPendingEmail; | 52 | QString mPendingEmail; |
51 | QString mPendingName; | 53 | QString mPendingName; |
52 | QByteArray mPendingData; | 54 | QByteArray mPendingData; |
53 | QCString mPendingMessage; | 55 | QCString mPendingMessage; |
54 | Settings *settings; | 56 | Settings *settings; |
55 | 57 | ||
56 | }; | 58 | }; |
57 | 59 | ||
diff --git a/kmicromail/viewmail.cpp b/kmicromail/viewmail.cpp index 60c764c..6d88cad 100644 --- a/kmicromail/viewmail.cpp +++ b/kmicromail/viewmail.cpp | |||
@@ -501,18 +501,19 @@ void ViewMail::slotForward() | |||
501 | { | 501 | { |
502 | } | 502 | } |
503 | } | 503 | } |
504 | 504 | ||
505 | void ViewMail::slotDeleteMail( ) | 505 | 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 | } |
514 | 515 | ||
515 | MailImageDlg::MailImageDlg(const QString&fname,QWidget *parent, const char *name, bool modal, WFlags f) | 516 | MailImageDlg::MailImageDlg(const QString&fname,QWidget *parent, const char *name, bool modal, WFlags f) |
516 | : QDialog(parent,name,modal) | 517 | : QDialog(parent,name,modal) |
517 | { | 518 | { |
518 | QVBoxLayout*dlglayout = new QVBoxLayout(this); | 519 | QVBoxLayout*dlglayout = new QVBoxLayout(this); |
diff --git a/kmicromail/viewmail.h b/kmicromail/viewmail.h index c2c2ce3..d85b8b2 100644 --- a/kmicromail/viewmail.h +++ b/kmicromail/viewmail.h | |||
@@ -39,16 +39,17 @@ public: | |||
39 | 39 | ||
40 | void hide(); | 40 | void hide(); |
41 | void exec(); | 41 | void exec(); |
42 | void setMail(const RecMailP&mail ); | 42 | void setMail(const RecMailP&mail ); |
43 | void setBody(const RecBodyP&body); | 43 | void setBody(const RecBodyP&body); |
44 | bool deleted; | 44 | bool deleted; |
45 | signals: | 45 | signals: |
46 | void showNextMail(ViewMail*); | 46 | void showNextMail(ViewMail*); |
47 | void deleteAndDisplayNextMail(ViewMail *); | ||
47 | protected: | 48 | protected: |
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); |
50 | AttachItem* lastChild(AttachItem*parent); | 51 | AttachItem* lastChild(AttachItem*parent); |
51 | 52 | ||
52 | protected slots: | 53 | protected slots: |
53 | void slotNextMail() { emit showNextMail(this); }; | 54 | void slotNextMail() { emit showNextMail(this); }; |
54 | void slotReply(); | 55 | void slotReply(); |
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 15c5dd9..a46cd87 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -2468,31 +2468,33 @@ void CalendarView::showDatePicker( ) | |||
2468 | mDatePicker->setDate( mNavigator->selectedDates().first() ); | 2468 | mDatePicker->setDate( mNavigator->selectedDates().first() ); |
2469 | } | 2469 | } |
2470 | 2470 | ||
2471 | void CalendarView::showEventEditor() | 2471 | void CalendarView::showEventEditor() |
2472 | { | 2472 | { |
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 | } |
2481 | mEventEditor->showMaximized(); | 2482 | mEventEditor->showMaximized(); |
2482 | #endif | 2483 | #endif |
2483 | } | 2484 | } |
2484 | void CalendarView::showTodoEditor() | 2485 | void CalendarView::showTodoEditor() |
2485 | { | 2486 | { |
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 | } |
2494 | mTodoEditor->showMaximized(); | 2496 | mTodoEditor->showMaximized(); |
2495 | #endif | 2497 | #endif |
2496 | } | 2498 | } |
2497 | 2499 | ||
2498 | void CalendarView::cloneIncidence() | 2500 | void CalendarView::cloneIncidence() |
@@ -2537,29 +2539,29 @@ void CalendarView::cancelIncidence(Incidence * inc ) | |||
2537 | } | 2539 | } |
2538 | void CalendarView::cloneIncidence(Incidence * orgInc ) | 2540 | void CalendarView::cloneIncidence(Incidence * orgInc ) |
2539 | { | 2541 | { |
2540 | Incidence * newInc = orgInc->clone(); | 2542 | Incidence * newInc = orgInc->clone(); |
2541 | newInc->recreate(); | 2543 | newInc->recreate(); |
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(); |
2550 | } else { | 2552 | } else { |
2551 | delete t; | 2553 | delete t; |
2552 | } | 2554 | } |
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(); |
2561 | } else { | 2563 | } else { |
2562 | delete e; | 2564 | delete e; |
2563 | } | 2565 | } |
2564 | } | 2566 | } |
2565 | } | 2567 | } |
@@ -2601,26 +2603,26 @@ void CalendarView::newEvent(QDate dt) | |||
2601 | { | 2603 | { |
2602 | newEvent(QDateTime(dt, QTime(0,0,0)), | 2604 | newEvent(QDateTime(dt, QTime(0,0,0)), |
2603 | QDateTime(dt, QTime(0,0,0)), true); | 2605 | QDateTime(dt, QTime(0,0,0)), true); |
2604 | } | 2606 | } |
2605 | 2607 | ||
2606 | void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay) | 2608 | void 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(); |
2612 | if (filter && filter->showCategories()) { | 2615 | if (filter && filter->showCategories()) { |
2613 | mEventEditor->setCategories(filter->categoryList().join(",") ); | 2616 | mEventEditor->setCategories(filter->categoryList().join(",") ); |
2614 | } | 2617 | } |
2615 | if ( filter ) | 2618 | if ( filter ) |
2616 | mEventEditor->setSecrecy( filter->getSecrecy() ); | 2619 | mEventEditor->setSecrecy( filter->getSecrecy() ); |
2617 | } | 2620 | } |
2618 | showEventEditor(); | ||
2619 | } | 2621 | } |
2620 | void CalendarView::todoAdded(Todo * t) | 2622 | void CalendarView::todoAdded(Todo * t) |
2621 | { | 2623 | { |
2622 | 2624 | ||
2623 | changeTodoDisplay ( t ,KOGlobals::EVENTADDED); | 2625 | changeTodoDisplay ( t ,KOGlobals::EVENTADDED); |
2624 | updateTodoViews(); | 2626 | updateTodoViews(); |
2625 | } | 2627 | } |
2626 | void CalendarView::todoChanged(Todo * t) | 2628 | void CalendarView::todoChanged(Todo * t) |
@@ -2639,39 +2641,39 @@ void CalendarView::todoDeleted() | |||
2639 | updateTodoViews(); | 2641 | updateTodoViews(); |
2640 | } | 2642 | } |
2641 | 2643 | ||
2642 | 2644 | ||
2643 | 2645 | ||
2644 | void CalendarView::newTodo() | 2646 | void 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(); |
2650 | if (filter && filter->showCategories()) { | 2653 | if (filter && filter->showCategories()) { |
2651 | mTodoEditor->setCategories(filter->categoryList().join(",") ); | 2654 | mTodoEditor->setCategories(filter->categoryList().join(",") ); |
2652 | } | 2655 | } |
2653 | if ( filter ) | 2656 | if ( filter ) |
2654 | mTodoEditor->setSecrecy( filter->getSecrecy() ); | 2657 | mTodoEditor->setSecrecy( filter->getSecrecy() ); |
2655 | } | 2658 | } |
2656 | showTodoEditor(); | ||
2657 | } | 2659 | } |
2658 | 2660 | ||
2659 | void CalendarView::newSubTodo() | 2661 | void CalendarView::newSubTodo() |
2660 | { | 2662 | { |
2661 | Todo *todo = selectedTodo(); | 2663 | Todo *todo = selectedTodo(); |
2662 | if ( todo ) newSubTodo( todo ); | 2664 | if ( todo ) newSubTodo( todo ); |
2663 | } | 2665 | } |
2664 | 2666 | ||
2665 | void CalendarView::newSubTodo(Todo *parentEvent) | 2667 | void 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 | ||
2672 | void CalendarView::newFloatingEvent() | 2674 | void CalendarView::newFloatingEvent() |
2673 | { | 2675 | { |
2674 | DateList tmpList = mNavigator->selectedDates(); | 2676 | DateList tmpList = mNavigator->selectedDates(); |
2675 | QDate date = tmpList.first(); | 2677 | QDate date = tmpList.first(); |
2676 | 2678 | ||
2677 | newEvent( QDateTime( date, QTime( 12, 0, 0 ) ), | 2679 | newEvent( QDateTime( date, QTime( 12, 0, 0 ) ), |
@@ -2682,36 +2684,36 @@ void CalendarView::newFloatingEvent() | |||
2682 | void CalendarView::editEvent( Event *event ) | 2684 | void CalendarView::editEvent( Event *event ) |
2683 | { | 2685 | { |
2684 | 2686 | ||
2685 | if ( !event ) return; | 2687 | if ( !event ) return; |
2686 | if ( event->isReadOnly() ) { | 2688 | if ( event->isReadOnly() ) { |
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 | } |
2693 | void CalendarView::editJournal( Journal *jour ) | 2695 | void CalendarView::editJournal( Journal *jour ) |
2694 | { | 2696 | { |
2695 | if ( !jour ) return; | 2697 | if ( !jour ) return; |
2696 | mDialogManager->hideSearchDialog(); | 2698 | mDialogManager->hideSearchDialog(); |
2697 | mViewManager->showJournalView(); | 2699 | mViewManager->showJournalView(); |
2698 | mNavigator->slotDaySelect( jour->dtStart().date() ); | 2700 | mNavigator->slotDaySelect( jour->dtStart().date() ); |
2699 | } | 2701 | } |
2700 | void CalendarView::editTodo( Todo *todo ) | 2702 | void CalendarView::editTodo( Todo *todo ) |
2701 | { | 2703 | { |
2702 | if ( !todo ) return; | 2704 | if ( !todo ) return; |
2703 | 2705 | ||
2704 | if ( todo->isReadOnly() ) { | 2706 | if ( todo->isReadOnly() ) { |
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 | ||
2713 | KOEventViewerDialog* CalendarView::getEventViewerDialog() | 2715 | KOEventViewerDialog* CalendarView::getEventViewerDialog() |
2714 | { | 2716 | { |
2715 | if ( !mEventViewerDialog ) { | 2717 | if ( !mEventViewerDialog ) { |
2716 | mEventViewerDialog = new KOEventViewerDialog(this); | 2718 | mEventViewerDialog = new KOEventViewerDialog(this); |
2717 | connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) ); | 2719 | connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) ); |
diff --git a/qtcompat/qinputdialog.cpp b/qtcompat/qinputdialog.cpp index 770b281..64c581e 100644 --- a/qtcompat/qinputdialog.cpp +++ b/qtcompat/qinputdialog.cpp | |||
@@ -30,16 +30,18 @@ | |||
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
32 | ** | 32 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 33 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 34 | ** not clear to you. |
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> |
41 | #include <qlabel.h> | 43 | #include <qlabel.h> |
42 | #include <qlineedit.h> | 44 | #include <qlineedit.h> |
43 | #include <qpushbutton.h> | 45 | #include <qpushbutton.h> |
44 | #include <qspinbox.h> | 46 | #include <qspinbox.h> |
45 | #include <qcombobox.h> | 47 | #include <qcombobox.h> |
@@ -448,16 +450,21 @@ QString QInputDialog::getItem( const QString &caption, const QString &label, con | |||
448 | dlg->editableComboBox()->setCurrentItem( current ); | 450 | dlg->editableComboBox()->setCurrentItem( current ); |
449 | } else { | 451 | } else { |
450 | dlg->comboBox()->insertStringList( list ); | 452 | dlg->comboBox()->insertStringList( list ); |
451 | dlg->comboBox()->setCurrentItem( current ); | 453 | dlg->comboBox()->setCurrentItem( current ); |
452 | } | 454 | } |
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_; |
459 | if ( editable ) | 466 | if ( editable ) |
460 | result = dlg->editableComboBox()->currentText(); | 467 | result = dlg->editableComboBox()->currentText(); |
461 | else | 468 | else |
462 | result = dlg->comboBox()->currentText(); | 469 | result = dlg->comboBox()->currentText(); |
463 | 470 | ||