summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-12-13 12:35:00 (UTC)
committer zautrix <zautrix>2004-12-13 12:35:00 (UTC)
commit7ac6c21e832b7d16bd0888d0b66252b6e152005a (patch) (side-by-side diff)
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
@@ -8,12 +8,22 @@ Old behaviour was, that the "new event" dialog popped up.
Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu).
That means, you can restore the latest
event/todo/journal you have deleted.
A journal is deleted, if you clear all the text of the journal.
+Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14.
+
+KA/Pi starting in 480x640 resolution:
+Hide the filter action in toolbar
+and added icons for undo/delete/redo in toolbar.
+
+Change in OM/Pi ViewMail dialog:
+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).
+
+Fixed a crash when deleting mail-accounts in OM/Pi.
********** VERSION 1.9.14 ************
Fixed some problems with the dialog sizes when switching
portrait/landscape mode on 640x480 PDA display.
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index b7edccd..f6bdda4 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -784,12 +784,13 @@ void KABCore::updateMainWindow()
mMainWindow->update();
}
void KABCore::resizeEvent(QResizeEvent* e )
{
if ( !mMiniSplitter )
return;
+ //qDebug("KABCore::resizeEvent(QResizeEvent* e ) ");
if ( QApplication::desktop()->width() >= 480 ) {
if (QApplication::desktop()->width() == 640 ) { // e.g. 640x480
if ( mMiniSplitter->orientation() == Qt::Vertical ) {
mMiniSplitter->setOrientation( Qt::Horizontal);
mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
if ( QApplication::desktop()->width() <= 640 ) {
@@ -2189,17 +2190,19 @@ void KABCore::addActionsManually()
mActionAboutKAddressbook->plug( helpMenu );
if (KGlobal::getDesktopSize() > KGlobal::Small ) {
mActionSave->plug( tb );
mViewManager->getFilterAction()->plug ( tb);
- if (KGlobal::getDesktopSize() == KGlobal::Desktop ) {
- mActionUndo->plug( tb );
- mActionDelete->plug( tb );
- mActionRedo->plug( tb );
+ //LR hide filteraction on started in 480x640
+ if (QApplication::desktop()->width() == 480 ) {
+ mViewManager->getFilterAction()->setComboWidth( 0 );
}
+ mActionUndo->plug( tb );
+ mActionDelete->plug( tb );
+ mActionRedo->plug( tb );
} else {
mActionSave->plug( tb );
tb->enableMoving(false);
}
//mActionQuit->plug ( tb );
// tb->insertWidget(-1, 0, mIncSearchWidget, 6);
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp
index 0d91c12..33bef5a 100644
--- a/kaddressbook/viewmanager.cpp
+++ b/kaddressbook/viewmanager.cpp
@@ -57,12 +57,13 @@ $Id$
#include <kdebug.h>
#include <kactionclasses.h>
#include <qlayout.h>
+#include <qapplication.h>
#include <qwidgetstack.h>
#include <kabc/addressbook.h>
#include "filtereditdialog.h"
#include "addviewdialog.h"
#include "kabcore.h"
@@ -103,13 +104,16 @@ void ViewManager::restoreSettings()
mActionSelectView->setItems( mViewNameList );
// Filter
mFilterList = Filter::restore( mCore->config(), "Filter" );
mActionSelectFilter->setItems( filterNames() );
mActionSelectFilter->setCurrentItem( KABPrefs::instance()->mCurrentFilter );
- mActionSelectFilter->setComboWidth( 150 );
+ int cw = 150;
+ if (QApplication::desktop()->width() == 480 )
+ cw = 0;
+ mActionSelectFilter->setComboWidth( cw );
// Tell the views to reread their config, since they may have
// been modified by global settings
QString _oldgroup = mCore->config()->group();
QDictIterator<KAddressBookView> it( mViewDict );
for ( it.toFirst(); it.current(); ++it ) {
@@ -594,13 +598,16 @@ void ViewManager::configureFilters()
mFilterList = dlg.filters();
uint pos = mActionSelectFilter->currentItem();
mActionSelectFilter->setItems( filterNames() );
mActionSelectFilter->setCurrentItem( pos );
setActiveFilter( pos );
- mActionSelectFilter->setComboWidth( 150 );
+ int cw = 150;
+ if (QApplication::desktop()->width() == 480 )
+ cw = 0;
+ mActionSelectFilter->setComboWidth( cw );
}
QStringList ViewManager::filterNames() const
{
QStringList names( i18n( "No Filter" ) );
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
@@ -47,14 +47,14 @@ void Settings::addAccount( Account *account )
{
accounts.append( account );
}
void Settings::delAccount( Account *account )
{
- accounts.remove( account );
account->remove();
+ accounts.remove( account );
}
void Settings::updateAccounts()
{
accounts.clear();
QDir dir( locateLocal("data", "kopiemail" ) );
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index ec192ea..915b3e8 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -296,16 +296,41 @@ void OpieMail::replyMail()
{
mail->Wrapper()->answeredMail(mail);
}
delete settings;
}
+void OpieMail::closeViewMail(ViewMail * vm)
+{
+ vm->hide();
+}
+void OpieMail::deleteAndDisplayNextMail(ViewMail * vm)
+{
+ QListViewItem*item = mailView->currentItem();
+ if (!item ) {
+ closeViewMail(vm);
+ return;
+ }
+ RecMailP mail = ((MailListViewItem*)item)->data();
+ mail->Wrapper()->deleteMail( mail );
+ item = item->itemBelow();
+ if (!item ) {
+ closeViewMail(vm);
+ return;
+ }
+ mailView->setCurrentItem(item);
+ mail = ((MailListViewItem*)item)->data();
+ RecBodyP body = folderView->fetchBody(mail);
+ vm->setBody( body );
+ vm->setMail( mail );
+}
void OpieMail::displayNextMail(ViewMail * vm)
{
QListViewItem*item = mailView->currentItem();
if (!item) return;
+ ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() );
item = item->itemBelow();
if (!item) {
vm->setCaption(i18n("End of List" ));
return;
}
mailView->setCurrentItem(item);
@@ -326,12 +351,14 @@ void OpieMail::displayMail()
#ifndef DESKTOP_VERSION
readMail.showMaximized();
#else
readMail.resize( 640, 480);
#endif
connect( &readMail,SIGNAL( showNextMail(ViewMail *) ), this, SLOT( displayNextMail(ViewMail *) ) );
+ connect( &readMail,SIGNAL( deleteAndDisplayNextMail(ViewMail *) ), this, SLOT(deleteAndDisplayNextMail(ViewMail *) ) );
+
readMail.exec();
if ( readMail.deleted )
{
folderView->refreshCurrent();
}
diff --git a/kmicromail/opiemail.h b/kmicromail/opiemail.h
index 30968a7..a81a34c 100644
--- a/kmicromail/opiemail.h
+++ b/kmicromail/opiemail.h
@@ -23,12 +23,13 @@ public slots:
virtual void slotwriteMail2(const QString&nameemail);
virtual void slotComposeMail();
virtual void slotExtAppHandler();
virtual void appMessage(const QCString &msg, const QByteArray &data);
virtual void message(const QCString &msg, const QByteArray &data);
protected slots:
+ virtual void deleteAndDisplayNextMail(ViewMail * vm);
virtual void displayNextMail(ViewMail * vm);
virtual void slotSendQueued();
virtual void slotSearchMails();
virtual void slotEditSettings();
virtual void slotEditAccounts();
virtual void displayMail();
@@ -44,12 +45,13 @@ protected slots:
virtual void slotMoveCopyMail();
virtual void slotMoveCopyAllMail();
virtual void reEditMail();
void clearSelection();
private:
+ void closeViewMail(ViewMail * vm);
QString mPendingEmail;
QString mPendingName;
QByteArray mPendingData;
QCString mPendingMessage;
Settings *settings;
diff --git a/kmicromail/viewmail.cpp b/kmicromail/viewmail.cpp
index 60c764c..6d88cad 100644
--- a/kmicromail/viewmail.cpp
+++ b/kmicromail/viewmail.cpp
@@ -503,14 +503,15 @@ void ViewMail::slotForward()
}
void ViewMail::slotDeleteMail( )
{
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 )
{
- m_recMail->Wrapper()->deleteMail( m_recMail );
- hide();
+ emit deleteAndDisplayNextMail( this);
+ //m_recMail->Wrapper()->deleteMail( m_recMail );
+ //hide();
deleted = true;
}
}
MailImageDlg::MailImageDlg(const QString&fname,QWidget *parent, const char *name, bool modal, WFlags f)
: QDialog(parent,name,modal)
diff --git a/kmicromail/viewmail.h b/kmicromail/viewmail.h
index c2c2ce3..d85b8b2 100644
--- a/kmicromail/viewmail.h
+++ b/kmicromail/viewmail.h
@@ -41,12 +41,13 @@ public:
void exec();
void setMail(const RecMailP&mail );
void setBody(const RecBodyP&body);
bool deleted;
signals:
void showNextMail(ViewMail*);
+ void deleteAndDisplayNextMail(ViewMail *);
protected:
QString deHtml(const QString &string);
AttachItem* searchParent(const QValueList<int>&path);
AttachItem* lastChild(AttachItem*parent);
protected slots:
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 15c5dd9..a46cd87 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2470,27 +2470,29 @@ void CalendarView::showDatePicker( )
void CalendarView::showEventEditor()
{
#ifdef DESKTOP_VERSION
mEventEditor->show();
#else
- if ( mEventEditor->width() != QApplication::desktop()->width() ) {
- qDebug("CalendarView: recreate mEventEditor ");
+ if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) {
+ topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
+ qDebug("CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() );
delete mEventEditor;
mEventEditor = mDialogManager->getEventEditor();
}
mEventEditor->showMaximized();
#endif
}
void CalendarView::showTodoEditor()
{
#ifdef DESKTOP_VERSION
mTodoEditor->show();
#else
- if ( mTodoEditor->width() != QApplication::desktop()->width() ) {
- qDebug("CalendarView: recreate mTodoEditor ");
+ if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) {
+ topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
+ qDebug("CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() );
delete mTodoEditor;
mTodoEditor = mDialogManager->getTodoEditor();
}
mTodoEditor->showMaximized();
#endif
}
@@ -2539,25 +2541,25 @@ void CalendarView::cloneIncidence(Incidence * orgInc )
{
Incidence * newInc = orgInc->clone();
newInc->recreate();
if ( newInc->type() == "Todo" ) {
Todo* t = (Todo*) newInc;
- mTodoEditor->editTodo( t );
showTodoEditor();
+ mTodoEditor->editTodo( t );
if ( mTodoEditor->exec() ) {
mCalendar->addTodo( t );
updateView();
} else {
delete t;
}
}
else {
Event* e = (Event*) newInc;
- mEventEditor->editEvent( e );
showEventEditor();
+ mEventEditor->editEvent( e );
if ( mEventEditor->exec() ) {
mCalendar->addEvent( e );
updateView();
} else {
delete e;
}
@@ -2603,22 +2605,22 @@ void CalendarView::newEvent(QDate dt)
QDateTime(dt, QTime(0,0,0)), true);
}
void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay)
{
+ showEventEditor();
mEventEditor->newEvent(fromHint,toHint,allDay);
if ( mFilterView->filtersEnabled() ) {
CalFilter *filter = mFilterView->selectedFilter();
if (filter && filter->showCategories()) {
mEventEditor->setCategories(filter->categoryList().join(",") );
}
if ( filter )
mEventEditor->setSecrecy( filter->getSecrecy() );
}
- showEventEditor();
}
void CalendarView::todoAdded(Todo * t)
{
changeTodoDisplay ( t ,KOGlobals::EVENTADDED);
updateTodoViews();
@@ -2641,35 +2643,35 @@ void CalendarView::todoDeleted()
void CalendarView::newTodo()
{
+ showTodoEditor();
mTodoEditor->newTodo(QDateTime::currentDateTime().addDays(7),0,true);
if ( mFilterView->filtersEnabled() ) {
CalFilter *filter = mFilterView->selectedFilter();
if (filter && filter->showCategories()) {
mTodoEditor->setCategories(filter->categoryList().join(",") );
}
if ( filter )
mTodoEditor->setSecrecy( filter->getSecrecy() );
}
- showTodoEditor();
}
void CalendarView::newSubTodo()
{
Todo *todo = selectedTodo();
if ( todo ) newSubTodo( todo );
}
void CalendarView::newSubTodo(Todo *parentEvent)
{
- mTodoEditor->newTodo(QDateTime::currentDateTime().addDays(7),parentEvent,true);
showTodoEditor();
+ mTodoEditor->newTodo(QDateTime::currentDateTime().addDays(7),parentEvent,true);
}
void CalendarView::newFloatingEvent()
{
DateList tmpList = mNavigator->selectedDates();
QDate date = tmpList.first();
@@ -2684,14 +2686,14 @@ void CalendarView::editEvent( Event *event )
if ( !event ) return;
if ( event->isReadOnly() ) {
showEvent( event );
return;
}
- mEventEditor->editEvent( event , mFlagEditDescription);
showEventEditor();
+ mEventEditor->editEvent( event , mFlagEditDescription);
}
void CalendarView::editJournal( Journal *jour )
{
if ( !jour ) return;
mDialogManager->hideSearchDialog();
mViewManager->showJournalView();
@@ -2702,14 +2704,14 @@ void CalendarView::editTodo( Todo *todo )
if ( !todo ) return;
if ( todo->isReadOnly() ) {
showTodo( todo );
return;
}
- mTodoEditor->editTodo( todo ,mFlagEditDescription);
showTodoEditor();
+ mTodoEditor->editTodo( todo ,mFlagEditDescription);
}
KOEventViewerDialog* CalendarView::getEventViewerDialog()
{
if ( !mEventViewerDialog ) {
diff --git a/qtcompat/qinputdialog.cpp b/qtcompat/qinputdialog.cpp
index 770b281..64c581e 100644
--- a/qtcompat/qinputdialog.cpp
+++ b/qtcompat/qinputdialog.cpp
@@ -32,12 +32,14 @@
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
+//Edited Lutz Rogowski 2004-12-13
+
#include "qinputdialog.h"
#include <qlayout.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
@@ -450,12 +452,17 @@ QString QInputDialog::getItem( const QString &caption, const QString &label, con
dlg->comboBox()->insertStringList( list );
dlg->comboBox()->setCurrentItem( current );
}
bool ok_ = FALSE;
QString result;
+ int fixWid = 320;
+ if ( QApplication::desktop()->width() <= 240 ) {
+ fixWid = 230;
+ }
+ dlg->setFixedWidth( fixWid);
ok_ = dlg->exec() == QDialog::Accepted;
if ( ok )
*ok = ok_;
if ( editable )
result = dlg->editableComboBox()->currentText();
else