Commit a9d5d43a authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: display a locker in the statusBar when encryption is set.

This needs the core event, of course, in order to work... (not yet done, and probably for later).
parent 62eec6f8
......@@ -129,6 +129,7 @@ void InputManager::delInput()
emit statusChanged( END_S );
emit teletextPossible( false );
emit encryptionChanged( false );
emit AtoBchanged( false, false );
emit voutChanged( false );
emit voutListChanged( NULL, 0 );
......
......@@ -187,10 +187,12 @@ signals:
void AtoBchanged( bool, bool );
/// Vout
void voutChanged( bool );
void voutListChanged( vout_thread_t **pp_vout, int i_vout );
/// Other
void synchroChanged();
void bookmarksChanged();
void cachingChanged( float );
void voutListChanged( vout_thread_t **pp_vout, int i_vout );
void encryptionChanged( bool );
};
class MainInputManager : public QObject
......
......@@ -82,6 +82,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
playlistVisible = false;
input_name = "";
fullscreenControls = NULL;
cryptedLabel = NULL;
/* Ask for privacy */
askForPrivacy();
......@@ -348,6 +349,20 @@ inline void MainInterface::createStatusBar()
- right-clicking and clicking just toggle between remaining and
elapsed time.*/
CONNECT( timeLabel, timeLabelDoubleClicked(), THEDP, gotoTimeDialog() );
CONNECT( THEMIM->getIM(), encryptionChanged( bool ) , this, showCryptedLabel( bool ) );
}
void MainInterface::showCryptedLabel( bool )
{
if( cryptedLabel == NULL )
{
cryptedLabel = new QLabel;
cryptedLabel->setPixmap( QPixmap( ":/eject" ) );
statusBar()->addWidget( cryptedLabel );
}
cryptedLabel->show();
}
inline void MainInterface::initSystray()
......
......@@ -141,6 +141,7 @@ private:
/* Status Bar */
QLabel *nameLabel;
QLabel *cryptedLabel;
virtual void customEvent( QEvent *);
virtual void keyPressEvent( QKeyEvent *);
......@@ -171,6 +172,8 @@ private slots:
void handleSystrayClick( QSystemTrayIcon::ActivationReason );
void updateSystrayTooltipName( QString );
void updateSystrayTooltipStatus( int );
void showCryptedLabel( bool );
signals:
void askReleaseVideo( );
void askVideoToResize( unsigned int, unsigned int );
......
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