summaryrefslogtreecommitdiffabout
path: root/kabc
Side-by-side diff
Diffstat (limited to 'kabc') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addresseedialog.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/kabc/addresseedialog.cpp b/kabc/addresseedialog.cpp
index 9197850..0cf75a0 100644
--- a/kabc/addresseedialog.cpp
+++ b/kabc/addresseedialog.cpp
@@ -54,24 +54,25 @@ QString AddresseeItem::key( int column, bool ) const
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 );
@@ -315,26 +316,29 @@ Addressee AddresseeDialog::getAddressee( QWidget *parent )
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();
@@ -345,19 +349,20 @@ Addressee::List AddresseeDialog::getAddressees( QWidget *parent )
}
}
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();
}