--Boundary-00=_AXDY/Rx32RPlT8b Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline The attached patch changes KInputDialog wo use a list box instead of a combo box when selecting from a list of items. This saves the mouse click to open the combo box. Any objections? -- Cornelius Schumacher --Boundary-00=_AXDY/Rx32RPlT8b Content-Type: text/x-diff; charset="us-ascii"; name="getitem.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="getitem.diff" Index: kinputdialog.cpp =================================================================== RCS file: /home/kde/kdelibs/kdeui/kinputdialog.cpp,v retrieving revision 1.4 diff -u -p -r1.4 kinputdialog.cpp --- kinputdialog.cpp 7 Jun 2003 17:26:12 -0000 1.4 +++ kinputdialog.cpp 11 Sep 2003 08:40:46 -0000 @@ -146,22 +146,29 @@ KInputDialog::KInputDialog( const QStrin d->m_label = new QLabel( label, frame ); layout->addWidget( d->m_label ); - d->m_comboBox = new KComboBox( editable, frame ); - d->m_comboBox->insertStringList( list ); - d->m_comboBox->setCurrentItem( current ); - layout->addWidget( d->m_comboBox ); - - layout->addStretch(); - if ( editable ) { + d->m_comboBox = new KComboBox( editable, frame ); + d->m_comboBox->insertStringList( list ); + d->m_comboBox->setCurrentItem( current ); + layout->addWidget( d->m_comboBox ); + connect( d->m_comboBox, SIGNAL( textChanged( const QString & ) ), SLOT( slotUpdateButtons( const QString & ) ) ); connect( this, SIGNAL( user1Clicked() ), d->m_comboBox, SLOT( clearEdit() ) ); + + d->m_comboBox->setFocus(); + } else { + d->m_listBox = new KListBox( frame ); + d->m_listBox->insertStringList( list ); + d->m_listBox->setSelected( current, true ); + d->m_listBox->ensureCurrentVisible(); + layout->addWidget( d->m_listBox ); } - d->m_comboBox->setFocus(); + layout->addStretch(); + setMinimumWidth( 320 ); } @@ -313,7 +320,10 @@ QString KInputDialog::getItem( const QSt QString result; if ( _ok ) - result = dlg->comboBox()->currentText(); + if ( editable ) + result = dlg->comboBox()->currentText(); + else + result = dlg->listBox()->currentText(); delete dlg; return result; --Boundary-00=_AXDY/Rx32RPlT8b--