--- kmaddrbookdlg.cpp.org Sun Apr 30 20:43:39 2000 +++ kmaddrbookdlg.cpp Sun Apr 30 20:52:20 2000 @@ -38,6 +38,8 @@ mGrid.setColStretch(0,10); mGrid.setColStretch(1,10); mGrid.activate(); + + mListBox.setSelectionMode(QListBox::Multi); connect(&mBtnOk, SIGNAL(clicked()), SLOT(slotOk())); connect(&mListBox, SIGNAL(selected(int)), SLOT(slotOk())); @@ -47,6 +49,7 @@ { mListBox.insertItem(addr); } + resize(300, 450); } @@ -59,11 +62,19 @@ //----------------------------------------------------------------------------- void KMAddrBookSelDlg::slotOk() { - int idx = mListBox.currentItem(); - - if (idx>=0) mAddress = mListBox.text(idx); - else mAddress = QString::null; - + mAddress = QString::null; + unsigned int idx; + unsigned int count = 0; + for (idx = 0; idx < mListBox.count(); idx++) + { + if( mListBox.isSelected(idx) ) { + if( count > 0 ) { + mAddress += ", "; + } + mAddress += mListBox.text(idx); + count++; + } + } accept(); }