Commit 3ad0ad05 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - Small modifications to messages dialog.

parent 19775ff8
......@@ -45,12 +45,16 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf) : QVLCFrame( _p_intf )
QPushButton *closeButton = new QPushButton( qtr( "&Close" ) );
QPushButton *clearButton = new QPushButton( qtr( "&Clear" ) );
QPushButton *saveLogButton = new QPushButton( qtr( "&Save as..." ) );
closeButton->setDefault( true );
verbosityBox = new QSpinBox();
verbosityBox->setRange( 0, 2 );
verbosityBox->setValue( config_GetInt( p_intf, "verbose" ) );
verbosityBox->setWrapping( true );
verbosityBox->setMaximumWidth( 50 );
QLabel *verbosityLabel = new QLabel(qtr( "Verbosity Level" ) );
messages = new QTextEdit();
messages->setReadOnly( true );
messages->setGeometry( 0, 0, 440, 600 );
......@@ -142,7 +146,7 @@ void MessagesDialog::updateLog()
void MessagesDialog::close()
{
this->toggleVisible();
this->hide();
}
void MessagesDialog::clear()
......
......@@ -114,17 +114,19 @@ protected:
{
hide();
}
void keyPressEvent( QKeyEvent *keyEvent )
virtual void keyPressEvent( QKeyEvent *keyEvent )
{
if( keyEvent->key() == Qt::Key_Escape )
{
msg_Dbg( p_intf, "Escp Key pressed" );
cancel();
}
else if( keyEvent->key() == Qt::Key_Enter )
else if( keyEvent->key() == Qt::Key_Return )
{
msg_Dbg( p_intf, "Enter Key pressed" );
close();
}
}
};
......@@ -152,13 +154,14 @@ protected:
{
hide();
}
void keyPressEvent( QKeyEvent *keyEvent )
virtual void keyPressEvent( QKeyEvent *keyEvent )
{
if( keyEvent->key() == Qt::Key_Escape )
{
msg_Dbg( p_intf, "Escp Key pressed" );
cancel();
}
else if( keyEvent->key() == Qt::Key_Enter )
else if( keyEvent->key() == Qt::Key_Return )
{
msg_Dbg( p_intf, "Enter Key pressed" );
close();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment