[vlmc-devel] MainWindow: Display the status bar when media library pgoress bar gets updated
Hugo Beauzée-Luyssen
git at videolan.org
Tue Sep 20 00:59:42 CEST 2016
vlmc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Sep 19 21:30:00 2016 +0200| [7302ce2a391137473ae9310ca6a9f148ff15ba84] | committer: Hugo Beauzée-Luyssen
MainWindow: Display the status bar when media library pgoress bar gets updated
> https://code.videolan.org/videolan/vlmc/commit/7302ce2a391137473ae9310ca6a9f148ff15ba84
---
src/Gui/MainWindow.cpp | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp
index ba66d93..a5b141f 100644
--- a/src/Gui/MainWindow.cpp
+++ b/src/Gui/MainWindow.cpp
@@ -110,11 +110,22 @@ MainWindow::MainWindow( Backend::IBackend* backend, QWidget *parent )
connect( Core::instance()->library(), &Library::progressUpdated, this,
[this]( int percent ) {
if ( percent < 100 )
+ {
m_progressBar->setValue( percent );
+ m_ui.statusbar->show();
+ m_ui.actionStatusbar->setEnabled( false );
+ m_ui.actionStatusbar->setChecked( true );
+ }
else
{
m_progressBar->hide();
m_ui.statusbar->clearMessage();
+ m_ui.actionStatusbar->setEnabled( true );
+ if ( VLMC_GET_BOOL( "private/ShowStatusbar" ) == false )
+ {
+ m_ui.actionStatusbar->setChecked( false );
+ m_ui.statusbar->hide();
+ }
}
});
@@ -364,7 +375,7 @@ MainWindow::initVlmcPreferences()
m_ui.statusbar->setVisible( v );
m_ui.actionStatusbar->setChecked( v );
} );
- connect( m_ui.actionStatusbar, &QAction::toggled, statusbarSetting, &SettingValue::set );
+ connect( m_ui.actionStatusbar, &QAction::triggered, statusbarSetting, &SettingValue::set );
// Layout Lock
auto lockSetting = VLMC_CREATE_PRIVATE_PREFERENCE_BOOL( "private/LayoutLock", true );
More information about the Vlmc-devel
mailing list