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 ) ...@@ -45,12 +45,16 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf) : QVLCFrame( _p_intf )
QPushButton *closeButton = new QPushButton( qtr( "&Close" ) ); QPushButton *closeButton = new QPushButton( qtr( "&Close" ) );
QPushButton *clearButton = new QPushButton( qtr( "&Clear" ) ); QPushButton *clearButton = new QPushButton( qtr( "&Clear" ) );
QPushButton *saveLogButton = new QPushButton( qtr( "&Save as..." ) ); QPushButton *saveLogButton = new QPushButton( qtr( "&Save as..." ) );
closeButton->setDefault( true );
verbosityBox = new QSpinBox(); verbosityBox = new QSpinBox();
verbosityBox->setRange( 0, 2 ); verbosityBox->setRange( 0, 2 );
verbosityBox->setValue( config_GetInt( p_intf, "verbose" ) ); verbosityBox->setValue( config_GetInt( p_intf, "verbose" ) );
verbosityBox->setWrapping( true ); verbosityBox->setWrapping( true );
verbosityBox->setMaximumWidth( 50 ); verbosityBox->setMaximumWidth( 50 );
QLabel *verbosityLabel = new QLabel(qtr( "Verbosity Level" ) ); QLabel *verbosityLabel = new QLabel(qtr( "Verbosity Level" ) );
messages = new QTextEdit(); messages = new QTextEdit();
messages->setReadOnly( true ); messages->setReadOnly( true );
messages->setGeometry( 0, 0, 440, 600 ); messages->setGeometry( 0, 0, 440, 600 );
...@@ -142,7 +146,7 @@ void MessagesDialog::updateLog() ...@@ -142,7 +146,7 @@ void MessagesDialog::updateLog()
void MessagesDialog::close() void MessagesDialog::close()
{ {
this->toggleVisible(); this->hide();
} }
void MessagesDialog::clear() void MessagesDialog::clear()
......
...@@ -114,17 +114,19 @@ protected: ...@@ -114,17 +114,19 @@ protected:
{ {
hide(); hide();
} }
void keyPressEvent( QKeyEvent *keyEvent ) virtual void keyPressEvent( QKeyEvent *keyEvent )
{ {
if( keyEvent->key() == Qt::Key_Escape ) if( keyEvent->key() == Qt::Key_Escape )
{ {
msg_Dbg( p_intf, "Escp Key pressed" );
cancel(); cancel();
} }
else if( keyEvent->key() == Qt::Key_Enter ) else if( keyEvent->key() == Qt::Key_Return )
{ {
msg_Dbg( p_intf, "Enter Key pressed" ); msg_Dbg( p_intf, "Enter Key pressed" );
close(); close();
} }
} }
}; };
...@@ -152,13 +154,14 @@ protected: ...@@ -152,13 +154,14 @@ protected:
{ {
hide(); hide();
} }
void keyPressEvent( QKeyEvent *keyEvent ) virtual void keyPressEvent( QKeyEvent *keyEvent )
{ {
if( keyEvent->key() == Qt::Key_Escape ) if( keyEvent->key() == Qt::Key_Escape )
{ {
msg_Dbg( p_intf, "Escp Key pressed" );
cancel(); cancel();
} }
else if( keyEvent->key() == Qt::Key_Enter ) else if( keyEvent->key() == Qt::Key_Return )
{ {
msg_Dbg( p_intf, "Enter Key pressed" ); msg_Dbg( p_intf, "Enter Key pressed" );
close(); 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