summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt2
-rw-r--r--kabc/addresseedialog.cpp7
-rw-r--r--kaddressbook/kabcore.cpp14
3 files changed, 17 insertions, 6 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 21664de..b6472d7 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,57 +1,59 @@
Info about the changes in new versions of KDE-Pim/Pi
********** VERSION 2.1.10 ************
KO/Pi:
Importing Birthdays will now create another file resource "Birthdays" and import the birthday data from KA/Pi into that file.
+When a multidayevent is selected in monthview all occurences of this event in the monthview are now hightlighted.
KA/Pi:
Fixed two problems in csv export.
+Fixed problems when calling the contact selection dialog from KO/Pi or OM/Pi.
********** VERSION 2.1.9 ************
KO/Pi:
Fixed some problems of the new search options in the search dialog.
Fixed some problems in the new resource config options.
Changed the recurrence edit of events and todos such that the recurrence edit page now is notified about a change of the start date on the first page.
Fixed a problem creating new events in the agenda view if at the day/time is already an agenda item shown:
Now you can click on the bottom/top of an allday agenda item or on the left/right side of an agenda item to get the "new todo/new event" popup.
Fixed a problem in recurrence range in syncing with DTM.
KA/Pi:
Made it posiible to show in the contact overview the details of all data available for that contact( e.g. office, spouse, children, nickname ...)
PwM/Pi:
Added "sec" to the timeout config settings to make it clear the timeout values are seconds.
********** VERSION 2.1.8 ************
KO/Pi:
Added info about the completion state of a todo in the ListView/Searchdialog.
If in TodoView is selected "do not show compledted todos" then completed todos are not shown in the ListView as well.
Fixed some updating problems when changing the filter.
KA/Pi:
In the addressee selection dialog now the formatted name is shown, if not empty.
Added a column "category" to the addressee selection dialog to make it possible to sort addressees after category.
Now in the addressee selection dialog a selected contact is remove with a single click from the selected list.
Fixed in the file selector on the Zaurus the problem that symbolic links to files/dirs were ignored.
Fixed the sorting for size in the file selector on the Z.
Changed the color selection dialog on the Zaurus to a more user friendly version.
********** VERSION 2.1.7 ************
KO/Pi:
Fixed several problems in the new Resource handling.
Added more options to the search dialog.
Fixed a problem in the Month view.
Added more options to the dialog when setting a todo to stopped.
Fixed two small problems in KO/Pi Alarm applet.
********** VERSION 2.1.6 ************
This release is for testing only.
diff --git a/kabc/addresseedialog.cpp b/kabc/addresseedialog.cpp
index 9197850..0cf75a0 100644
--- a/kabc/addresseedialog.cpp
+++ b/kabc/addresseedialog.cpp
@@ -18,96 +18,97 @@
Boston, MA 02111-1307, USA.
*/
#include <qlayout.h>
#include <qpushbutton.h>
#include <qgroupbox.h>
#include <qapplication.h>
#include <qregexp.h>
#include <qvbox.h>
#include <qlabel.h>
#include <klocale.h>
#include <kdebug.h>
#include <kglobalsettings.h>
#include "stdaddressbook.h"
#include "addresseedialog.h"
#include "KDGanttMinimizeSplitter.h"
//#include "addresseedialog.moc"
using namespace KABC;
AddresseeItem::AddresseeItem( QListView *parent, const Addressee &addressee ) :
QListViewItem( parent ),
mAddressee( addressee )
{
setText( Name,addressee.realName());
setText( Email, addressee.preferredEmail() );
setText( Category, addressee.categories().join(";") );
}
QString AddresseeItem::key( int column, bool ) const
{
if (column == Email) {
QString value = text(Email);
int val = value.findRev("@");
return value.mid( val) + value.left( val );
}
return text(column).lower();
}
AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) :
KDialogBase( KDialogBase::Plain, i18n("Select Addressee"),
Ok|Cancel, No, parent ), mMultiple( multiple )
{
qDebug("NEW AddresseeDialog ");
+
QWidget *topWidget = plainPage();
QBoxLayout *topLayout = new QHBoxLayout( topWidget );
KDGanttMinimizeSplitter* mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, topWidget);
mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
topLayout->addWidget(mMiniSplitter );
QWidget *listWidget = new QWidget( mMiniSplitter );
QVBoxLayout *listLayout = new QVBoxLayout (listWidget) ;
//topLayout->addLayout( listLayout );
mAddresseeList = new KListView( listWidget );
mAddresseeList->addColumn( i18n("Name") );
mAddresseeList->addColumn( i18n("Email") );
mAddresseeList->addColumn( i18n("Category") );
mAddresseeList->setAllColumnsShowFocus( true );
mAddresseeList->setFullWidth( true );
listLayout->addWidget( mAddresseeList );
connect( mAddresseeList, SIGNAL( doubleClicked( QListViewItem * ) ),
SLOT( slotOk() ) );
//QHBox* searchBox = new QHBox ( listWidget );
mAddresseeEdit = new QLineEdit( listWidget );
connect( mAddresseeEdit, SIGNAL( returnPressed() ),
SLOT( loadAddressBook() ) );
mAddresseeEdit->setFocus();
QPushButton *searchButton = new QPushButton( i18n("Search!"), listWidget );
connect ( searchButton, SIGNAL( clicked() ), SLOT( loadAddressBook() ) );
QHBoxLayout *searchLayout = new QHBoxLayout (listLayout) ;
searchLayout->addWidget( mAddresseeEdit );
searchLayout->addWidget( searchButton );
//listLayout->addWidget( searchBox );
if ( mMultiple ) {
//QBoxLayout *selectedLayout = new QVBoxLayout;
//topLayout->addLayout( selectedLayout );
//topLayout->setSpacing( spacingHint() );
QVBox *selectedGroup = new QVBox( mMiniSplitter );
new QLabel ( i18n("Selected:"), selectedGroup );
//selectedLayout->addWidget( selectedGroup );
mSelectedList = new KListView( selectedGroup );
@@ -279,85 +280,89 @@ Addressee::List AddresseeDialog::addressees()
}
}
else
{
aItem = (AddresseeItem *)( mAddresseeList->selectedItem() );
if (aItem) al.append( aItem->addressee() );
}
return al;
}
Addressee AddresseeDialog::getAddressee( QWidget *parent )
{
AddresseeDialog *dlg = new AddresseeDialog( parent );
Addressee addressee;
#ifdef DESKTOP_VERSION
static int geoX = 0;
static int geoY = 0;
static int geoW = 0;
static int geoH = 0;
if ( !geoX && ! geoY && !geoW &&!geoH ) {
geoX = dlg->geometry().x();
geoY = dlg->geometry().y();
geoW = dlg->width();
geoH = dlg->height();
} else {
dlg->show();
dlg->setGeometry(geoX , geoY,geoW , geoH );
}
#endif
int result = dlg->exec();
#ifdef DESKTOP_VERSION
geoX = dlg->geometry().x();
geoY = dlg->geometry().y();
geoW = dlg->width();
geoH = dlg->height();
#endif
if ( result == QDialog::Accepted ) {
addressee = dlg->addressee();
}
delete dlg;
return addressee;
}
Addressee::List AddresseeDialog::getAddressees( QWidget *parent )
{
- AddresseeDialog *dlg = new AddresseeDialog( parent, true );
Addressee::List addressees;
+ static bool running = false;
+ if ( running ) return addressees;
+ running = true;
+ AddresseeDialog *dlg = new AddresseeDialog( parent, true );
static int geoX = 0;
static int geoY = 0;
static int geoW = 0;
static int geoH = 0;
if ( QApplication::desktop()->width() <= 640 )
dlg->showMaximized();
else {
if ( !geoX && ! geoY && !geoW &&!geoH ) {
geoX = dlg->geometry().x();
geoY = dlg->geometry().y();
geoW = dlg->width();
geoH = dlg->height();
} else {
dlg->show();
dlg->setGeometry(geoX , geoY,geoW , geoH );
}
}
int result = dlg->exec();
geoX = dlg->geometry().x();
geoY = dlg->geometry().y();
geoW = dlg->width();
geoH = dlg->height();
if ( result == QDialog::Accepted ) {
addressees = dlg->addressees();
}
delete dlg;
+ running = false;
return addressees;
}
void AddresseeDialog::addressBookChanged()
{
loadAddressBook();
}
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index b107e2d..3715786 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -2499,149 +2499,153 @@ void KABCore::clipboardDataChanged()
}
void KABCore::updateActionMenu()
{
UndoStack *undo = UndoStack::instance();
RedoStack *redo = RedoStack::instance();
if ( undo->isEmpty() )
mActionUndo->setText( i18n( "Undo" ) );
else
mActionUndo->setText( i18n( "Undo %1" ).arg( undo->top()->name() ) );
mActionUndo->setEnabled( !undo->isEmpty() );
if ( !redo->top() )
mActionRedo->setText( i18n( "Redo" ) );
else
mActionRedo->setText( i18n( "Redo %1" ).arg( redo->top()->name() ) );
mActionRedo->setEnabled( !redo->isEmpty() );
}
void KABCore::configureKeyBindings()
{
#ifndef KAB_EMBEDDED
KKeyDialog::configure( actionCollection(), true );
#else //KAB_EMBEDDED
qDebug("KABCore::configureKeyBindings() not implemented");
#endif //KAB_EMBEDDED
}
#ifdef KAB_EMBEDDED
void KABCore::configureResources()
{
KRES::KCMKResources dlg( this, "" , 0 );
if ( !dlg.exec() )
return;
KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") );
}
#endif //KAB_EMBEDDED
/* this method will be called through the QCop interface from Ko/Pi to select addresses
* for the attendees list of an event.
*/
void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid)
{
-
+ qDebug("KABCore::requestForNameEmailUidList ");
bool ok = false;
mEmailSourceChannel = sourceChannel;
mEmailSourceUID = uid;
- callContactdialog();
+ QTimer::singleShot( 10,this, SLOT ( callContactdialog() ) );
+ //callContactdialog();
#if 0
int wid = uid.toInt( &ok );
qDebug("UID %s ", uid.latin1());
if ( ok ) {
if ( wid != QApplication::desktop()->width() ) {
qDebug("KA/Pi: Request from different desktop geometry. Resizing ...");
message( i18n("Resizing, please wait...") );
mMainWindow->showMinimized();
/*
{
QCopEnvelope e("QPE/Application/kapi", "callContactdialog()");
}
*/
QTimer::singleShot( 1,this, SLOT ( resizeAndCallContactdialog() ) );
return;
}
} else {
qDebug("KABCore::requestForNameEmailUidList:: Got invalid uid ");
}
callContactdialog();
//QCopEnvelope e("QPE/Application/kapi", "callContactdialog()");
#endif
}
void KABCore::resizeAndCallContactdialog()
{
updateMainWindow();
- QTimer::singleShot( 100,this, SLOT ( callContactdialog() ) );
+ QTimer::singleShot( 10,this, SLOT ( callContactdialog() ) );
}
void KABCore::callContactdialog()
{
- QStringList nameList;
+ static bool running = false;
+ if (running) return;
+ running = true;
+ QStringList nameList;
QStringList emailList;
QStringList uidList;
qDebug(" KABCore::callContactdialog:DESKTOP WIDTH %d ", QApplication::desktop()->width() );
KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this);
uint i=0;
for (i=0; i < list.count(); i++)
{
nameList.append(list[i].realName());
emailList.append(list[i].preferredEmail());
uidList.append(list[i].uid());
}
QString uid = mEmailSourceUID;
//qDebug("%s %s ", sourceChannel.latin1(), uid.latin1());
bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(mEmailSourceChannel, uid, nameList, emailList, uidList);
-
+ running = false;
}
/* this method will be called through the QCop interface from Ko/Pi to select birthdays
* to put them into the calendar.
*/
void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString& uid)
{
// qDebug("KABCore::requestForBirthdayList");
QStringList birthdayList;
QStringList anniversaryList;
QStringList realNameList;
QStringList preferredEmailList;
QStringList assembledNameList;
QStringList uidList;
KABC::AddressBook::Iterator it;
int count = 0;
for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
++count;
}
QProgressBar bar(count,0 );
int w = 300;
if ( QApplication::desktop()->width() < 320 )
w = 220;
int h = bar.sizeHint().height() ;
int dw = QApplication::desktop()->width();
int dh = QApplication::desktop()->height();
bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
bar.show();
bar.setCaption (i18n("Collecting birthdays - close to abort!") );
qApp->processEvents();
QDate bday;
QString anni;
QString formattedbday;
for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it )
{
if ( ! bar.isVisible() )
return;
bar.setProgress( count++ );
qApp->processEvents();
bday = (*it).birthday().date();
anni = (*it).custom("KADDRESSBOOK", "X-Anniversary" );
if ( bday.isValid() || !anni.isEmpty())
{
if (bday.isValid())