--Boundary-00=_7U4b/fzAII8Yl8T Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Currently, there is no way to get an empty input line of the combo box in t= he=20 KInputDialog::getItem, because it only uses KComboBox::setCurrentItem( ... = ). Currently, for all invalid indices the first entry of the QStringList is=20 selected by default. The attached patch changes this so that when the index parameter of=20 getItem(...) is negative, no item is selected, and the editable combo box h= as=20 no text. I'd need this in KOrganizer to ask the user for the name of a template to=20 save. By default there should be no selection, because then the user might= =20 overwrite an existing template. However, there should also the possibility = to=20 select an already existing template name to change it. Any objections? Reinhold =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQE/b4VATqjEwhXvPN0RAknRAKDUuIeKr/PpiX/dwbBrwB0INrSE9wCfVo+D qCGPsLdqDBq9DaEVlON2HS4=3D =3DrwTA =2D----END PGP SIGNATURE----- --Boundary-00=_7U4b/fzAII8Yl8T Content-Type: text/x-diff; charset="us-ascii"; name="2003-09-23_KInputDialog_EmptySelectionInComboBox.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="2003-09-23_KInputDialog_EmptySelectionInComboBox.patch" Index: kinputdialog.cpp =================================================================== RCS file: /home/kde/kdelibs/kdeui/kinputdialog.cpp,v retrieving revision 1.5 diff -u -p -3 -r1.5 kinputdialog.cpp --- kinputdialog.cpp 15 Sep 2003 14:13:10 -0000 1.5 +++ kinputdialog.cpp 22 Sep 2003 23:17:04 -0000 @@ -150,7 +150,10 @@ KInputDialog::KInputDialog( const QStrin { d->m_comboBox = new KComboBox( editable, frame ); d->m_comboBox->insertStringList( list ); - d->m_comboBox->setCurrentItem( current ); + if ( current>=0 ) + d->m_comboBox->setCurrentItem( current ); + else + d->m_comboBox->setCurrentText( "" ); layout->addWidget( d->m_comboBox ); connect( d->m_comboBox, SIGNAL( textChanged( const QString & ) ), --Boundary-00=_7U4b/fzAII8Yl8T--