BUTTON_SET_ACT_I( stopButton, "", stop.png, qtr( "Stop" ), stop() );
controlLayout->setColumnStretch( 7 , 2 );
-
+
/*
* Other first Line buttons
* Might need to be inside a frame to avoid a few resizing pb
controlLayout->addWidget( extSettingsButton, 3, 12 );
controlLayout->setColumnStretch( 14, 5 );
-
+
/* Volume */
VolumeClickHandler *h = new VolumeClickHandler( p_intf, this );
l->addWidget( selected , Qt::AlignCenter );
l->addWidget( warning, Qt::AlignCenter );
- QDialogButtonBox *buttonBox = new QDialogButtonBox;
+ buttonBox = new QDialogButtonBox;
QPushButton *ok = new QPushButton( qtr("OK") );
QPushButton *cancel = new QPushButton( qtr("Cancel") );
buttonBox->addButton( ok, QDialogButtonBox::AcceptRole );
buttonBox->addButton( cancel, QDialogButtonBox::RejectRole );
l->addWidget( buttonBox );
+ buttonBox->hide();
CONNECT( buttonBox, accepted(), this, accept() );
CONNECT( buttonBox, rejected(), this, reject() );
{
conflicts = false;
module_config_t *p_current = NULL;
+ /* Search for conflicts */
foreach( p_current, values )
{
if( p_current->value.i == i_vlckey && strcmp( p_current->psz_text,
break;
}
}
+
if( conflicts )
{
warning->setText(
qtr("Warning: the key is already assigned to \"") +
- QString( p_current->psz_text ) + "\"" );
+ qfu( p_current->psz_text ) + "\"" );
+ buttonBox->hide();
}
- else warning->setText( "" );
+ else accept();
}
void KeyInputDialog::keyPressEvent( QKeyEvent *e )
class QTreeWidgetItem;
class QGroupBox;
class QGridLayout;
+class QDialogButtonBox;
class ConfigControl : public QObject
{
QLabel *warning;
const char * keyToChange;
QList<module_config_t*> values;
+ QDialogButtonBox *buttonBox;
};
class KeyShortcutEdit: public QLineEdit