- KURLRequester *kfile = new KURLRequester( p_item->psz_value ?
- p_item->psz_value : "",
- hb );
- connect(kfile, SIGNAL(textChanged ( const QString & )),
- ci, SLOT(setValue( const QString &)));
- QToolTip::add(kfile, p_item->psz_longtext);
- vlc_mutex_unlock( p_item->p_lock );
-
- }
- break;
-
- case CONFIG_ITEM_INTEGER:
- /* add input box with default value */
- {
- QHBox *hb = new QHBox(category_table);
- hb->setSpacing(spacingHint());
- new QLabel(p_item->psz_text, hb);
- QSpinBox *item_adj = new QSpinBox(-1, 99999, 1, hb);
- QConfigItem *ci = new QConfigItem(this, p_item->psz_name,
- p_item->i_type,
- p_item->i_value);
- item_adj->setValue( p_item->i_value );
- connect(item_adj, SIGNAL(valueChanged( int)),
- ci, SLOT(setValue(int)));
- QToolTip::add(item_adj, p_item->psz_longtext);
- }
- break;
-
- case CONFIG_ITEM_FLOAT:
- {
- QHBox *hb = new QHBox(category_table);
- hb->setSpacing(spacingHint());
- new QLabel(p_item->psz_text, hb);
- KDoubleNumInput *kdi= new KDoubleNumInput(p_item->f_value, hb);
- kdi->setRange(-1, 99999, 0.01, false);
- QConfigItem *ci = new QConfigItem(this, p_item->psz_name,
- p_item->i_type,
- p_item->f_value);
- connect(kdi, SIGNAL(valueChanged(double)),
- ci, SLOT(setValue(double)));
- QToolTip::add(kdi, p_item->psz_longtext);
-
- }
- break;
-
-
- case CONFIG_ITEM_BOOL:
+ KURLRequester *kfile = new KURLRequester( p_item->psz_value ?
+ p_item->psz_value : "",
+ hb );
+ if ( p_item->i_type == CONFIG_ITEM_DIRECTORY )
+ {
+ kfile->fileDialog()->setMode(KFile::Directory|KFile::ExistingOnly|KFile::LocalOnly);
+ }
+ connect(kfile, SIGNAL(textChanged ( const QString & )),
+ ci, SLOT(setValue( const QString &)));
+ QToolTip::add(kfile, p_item->psz_longtext);
+ vlc_mutex_unlock( p_item->p_lock );
+ }
+ break;