[vlc-commits] Qt: hide status bar
Jean-Baptiste Kempf
git at videolan.org
Sun Apr 3 14:16:28 CEST 2011
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Apr 3 14:15:12 2011 +0200| [3a470a07124c87195cb72fe013ba00366350ed32] | committer: Jean-Baptiste Kempf
Qt: hide status bar
And allow it to be visible.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3a470a07124c87195cb72fe013ba00366350ed32
---
modules/gui/qt4/main_interface.cpp | 7 +++++++
modules/gui/qt4/main_interface.hpp | 2 ++
modules/gui/qt4/menus.cpp | 5 +++++
3 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index fc3544d..72e05ca 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -136,6 +136,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
* Status Bar *
**************/
createStatusBar();
+ statusBar()->setVisible( getSettings()->value( "status-bar-visible", false ).toBool() );
/**************************
* UI and Widgets design
@@ -304,6 +305,7 @@ MainInterface::~MainInterface()
settings->setValue( "adv-controls",
getControlsVisibilityStatus() & CONTROLS_ADVANCED );
+ settings->setValue( "status-bar-visible", statusBar()->isVisible() );
/* Save the stackCentralW sizes */
settings->setValue( "bgSize", stackWidgetsSizes[bgWidget] );
@@ -867,6 +869,11 @@ int MainInterface::getControlsVisibilityStatus()
+ CONTROLS_ADVANCED * controls->b_advancedVisible );
}
+void MainInterface::setStatusBarVisibility( bool b_visible )
+{
+ statusBar()->setVisible( b_visible );
+}
+
#if 0
void MainInterface::visual()
{
diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp
index 11afb39..dd37e13 100644
--- a/modules/gui/qt4/main_interface.hpp
+++ b/modules/gui/qt4/main_interface.hpp
@@ -191,6 +191,8 @@ public slots:
void toggleInterfaceFullScreen();
void toggleFSC();
+ void setStatusBarVisibility(bool b_visible);
+
void popupMenu( const QPoint& );
void changeThumbbarButtons( int );
diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp
index 341166d..0e21b2a 100644
--- a/modules/gui/qt4/menus.cpp
+++ b/modules/gui/qt4/menus.cpp
@@ -53,6 +53,7 @@
#include <QActionGroup>
#include <QSignalMapper>
#include <QSystemTrayIcon>
+#include <QStatusBar>
/*
This file defines the main menus and the pop-up menu (right-click menu)
@@ -493,6 +494,10 @@ QMenu *QVLCMenu::ViewMenu( intf_thread_t *p_intf, QMenu *current, MainInterface
action->setChecked( mi->isPlDocked() );
CONNECT( action, triggered( bool ), mi, dockPlaylist( bool ) );
+ action = menu->addAction( qtr( "Status Bar" ) );
+ action->setCheckable( true );
+ action->setChecked( mi->statusBar()->isVisible() );
+ CONNECT( action, triggered( bool ), mi, setStatusBarVisibility( bool) );
#if 0 /* For Visualisations. Not yet working */
adv = menu->addAction( qtr( "Visualizations selector" ), mi,
SLOT( visual() ) );
More information about the vlc-commits
mailing list