Commit 6cfabf4a authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - Main Windows: Rename the interface to $MEDIANAME - VLC media player.

parent 58049342
...@@ -105,7 +105,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -105,7 +105,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
visualSelectorEnabled= settings->value( "visual-selector", false ).toBool(); visualSelectorEnabled= settings->value( "visual-selector", false ).toBool();
/* UI */ /* UI */
setWindowTitle( qtr( "VLC media player" ) ); setVLCWindowsTitle();
handleMainUi( settings ); handleMainUi( settings );
QVLCMenu::createMenuBar( this, p_intf, playlistEmbeddedFlag, QVLCMenu::createMenuBar( this, p_intf, playlistEmbeddedFlag,
advControlsEnabled, visualSelectorEnabled ); advControlsEnabled, visualSelectorEnabled );
...@@ -181,6 +181,18 @@ MainInterface::~MainInterface() ...@@ -181,6 +181,18 @@ MainInterface::~MainInterface()
p_intf->pf_control_window = NULL; p_intf->pf_control_window = NULL;
} }
void MainInterface::setVLCWindowsTitle( QString aTitle )
{
if( aTitle.isEmpty() )
{
this->setWindowTitle( qtr( "VLC media player" ) );
}
else
{
this->setWindowTitle( aTitle + " - " + qtr( "VLC media player" ) );
}
}
void MainInterface::handleMainUi( QSettings *settings ) void MainInterface::handleMainUi( QSettings *settings )
{ {
QWidget *main = new QWidget( this ); QWidget *main = new QWidget( this );
...@@ -658,6 +670,7 @@ void MainInterface::setDisplay( float pos, int time, int length ) ...@@ -658,6 +670,7 @@ void MainInterface::setDisplay( float pos, int time, int length )
void MainInterface::setName( QString name ) void MainInterface::setName( QString name )
{ {
nameLabel->setText( " " + name+" " ); nameLabel->setText( " " + name+" " );
setVLCWindowsTitle( name );
} }
void MainInterface::setStatus( int status ) void MainInterface::setStatus( int status )
......
...@@ -56,6 +56,7 @@ public: ...@@ -56,6 +56,7 @@ public:
unsigned int *pi_height ); unsigned int *pi_height );
void releaseVideo( void *); void releaseVideo( void *);
int controlVideo( void *p_window, int i_query, va_list args ); int controlVideo( void *p_window, int i_query, va_list args );
void setVLCWindowsTitle( QString title = "" );
protected: protected:
void resizeEvent( QResizeEvent * ); void resizeEvent( QResizeEvent * );
void dropEvent( QDropEvent *); void dropEvent( QDropEvent *);
......
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