Commit 2cbbe8dc authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Revert "Qt: deinline createStatusBar() and explicit statusBar creation." and...

Revert "Qt: deinline createStatusBar() and explicit statusBar creation." and Fix StatusBar - close #2523

This reverts commit f509b90d.
parent c318005b
...@@ -124,12 +124,22 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -124,12 +124,22 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
/* Do we want anoying popups or not */ /* Do we want anoying popups or not */
notificationEnabled = (bool)config_GetInt( p_intf, "qt-notification" ); notificationEnabled = (bool)config_GetInt( p_intf, "qt-notification" );
/**************
* Status Bar *
**************/
createStatusBar();
/************************** /**************************
* UI and Widgets design * UI and Widgets design
**************************/ **************************/
setVLCWindowsTitle(); setVLCWindowsTitle();
handleMainUi( settings ); handleMainUi( settings );
/************
* Menu Bar *
************/
QVLCMenu::createMenuBar( this, p_intf, visualSelectorEnabled );
#if 0 #if 0
/* Create a Dock to get the playlist */ /* Create a Dock to get the playlist */
dockPL = new QDockWidget( qtr( "Playlist" ), this ); dockPL = new QDockWidget( qtr( "Playlist" ), this );
...@@ -142,14 +152,6 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -142,14 +152,6 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
dockPL->hide(); dockPL->hide();
#endif #endif
/**************************
* Menu Bar and Status Bar
**************************/
QVLCMenu::createMenuBar( this, p_intf, visualSelectorEnabled );
/* StatusBar Creation */
setStatusBar( createStatusBar() );
/******************** /********************
* Input Manager * * Input Manager *
********************/ ********************/
...@@ -311,14 +313,14 @@ MainInterface::~MainInterface() ...@@ -311,14 +313,14 @@ MainInterface::~MainInterface()
* Main UI handling * * Main UI handling *
*****************************/ *****************************/
QStatusBar * MainInterface::createStatusBar() inline void MainInterface::createStatusBar()
{ {
QStatusBar *statusBar = new QStatusBar;
/**************** /****************
* Status Bar * * Status Bar *
****************/ ****************/
/* Widgets Creation*/ /* Widgets Creation*/
QStatusBar *statusBarr = statusBar();
TimeLabel *timeLabel = new TimeLabel( p_intf ); TimeLabel *timeLabel = new TimeLabel( p_intf );
nameLabel = new QLabel( this ); nameLabel = new QLabel( this );
nameLabel->setTextInteractionFlags( Qt::TextSelectableByMouse nameLabel->setTextInteractionFlags( Qt::TextSelectableByMouse
...@@ -331,16 +333,15 @@ QStatusBar * MainInterface::createStatusBar() ...@@ -331,16 +333,15 @@ QStatusBar * MainInterface::createStatusBar()
nameLabel->setFrameStyle( QFrame::Sunken | QFrame::StyledPanel); nameLabel->setFrameStyle( QFrame::Sunken | QFrame::StyledPanel);
/* and adding those */ /* and adding those */
statusBar->addWidget( nameLabel, 8 ); statusBarr->addWidget( nameLabel, 8 );
statusBar->addPermanentWidget( speedLabel, 0 ); statusBarr->addPermanentWidget( speedLabel, 0 );
statusBar->addPermanentWidget( timeLabel, 0 ); statusBarr->addPermanentWidget( timeLabel, 0 );
/* timeLabel behaviour: /* timeLabel behaviour:
- double clicking opens the goto time dialog - double clicking opens the goto time dialog
- right-clicking and clicking just toggle between remaining and - right-clicking and clicking just toggle between remaining and
elapsed time.*/ elapsed time.*/
CONNECT( timeLabel, timeLabelDoubleClicked(), THEDP, gotoTimeDialog() ); CONNECT( timeLabel, timeLabelDoubleClicked(), THEDP, gotoTimeDialog() );
return statusBar;
} }
inline void MainInterface::initSystray() inline void MainInterface::initSystray()
......
...@@ -49,7 +49,6 @@ class FullscreenControllerWidget; ...@@ -49,7 +49,6 @@ class FullscreenControllerWidget;
class SpeedControlWidget; class SpeedControlWidget;
class QMenu; class QMenu;
class QSize; class QSize;
class QStatusBar;
enum { enum {
CONTROLS_HIDDEN = 0x0, CONTROLS_HIDDEN = 0x0,
...@@ -118,7 +117,7 @@ private: ...@@ -118,7 +117,7 @@ private:
void createSystray(); void createSystray();
void initSystray(); void initSystray();
QStatusBar * createStatusBar(); void createStatusBar();
/* Video */ /* Video */
VideoWidget *videoWidget; VideoWidget *videoWidget;
......
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