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() ...@@ -129,6 +129,7 @@ void InputManager::delInput()
emit statusChanged( END_S ); emit statusChanged( END_S );
emit teletextPossible( false ); emit teletextPossible( false );
emit encryptionChanged( false );
emit AtoBchanged( false, false ); emit AtoBchanged( false, false );
emit voutChanged( false ); emit voutChanged( false );
emit voutListChanged( NULL, 0 ); emit voutListChanged( NULL, 0 );
......
...@@ -187,10 +187,12 @@ signals: ...@@ -187,10 +187,12 @@ signals:
void AtoBchanged( bool, bool ); void AtoBchanged( bool, bool );
/// Vout /// Vout
void voutChanged( bool ); void voutChanged( bool );
void voutListChanged( vout_thread_t **pp_vout, int i_vout );
/// Other
void synchroChanged(); void synchroChanged();
void bookmarksChanged(); void bookmarksChanged();
void cachingChanged( float ); void cachingChanged( float );
void voutListChanged( vout_thread_t **pp_vout, int i_vout ); void encryptionChanged( bool );
}; };
class MainInputManager : public QObject class MainInputManager : public QObject
......
...@@ -82,6 +82,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -82,6 +82,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
playlistVisible = false; playlistVisible = false;
input_name = ""; input_name = "";
fullscreenControls = NULL; fullscreenControls = NULL;
cryptedLabel = NULL;
/* Ask for privacy */ /* Ask for privacy */
askForPrivacy(); askForPrivacy();
...@@ -348,6 +349,20 @@ inline void MainInterface::createStatusBar() ...@@ -348,6 +349,20 @@ inline void MainInterface::createStatusBar()
- 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() );
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() inline void MainInterface::initSystray()
......
...@@ -141,6 +141,7 @@ private: ...@@ -141,6 +141,7 @@ private:
/* Status Bar */ /* Status Bar */
QLabel *nameLabel; QLabel *nameLabel;
QLabel *cryptedLabel;
virtual void customEvent( QEvent *); virtual void customEvent( QEvent *);
virtual void keyPressEvent( QKeyEvent *); virtual void keyPressEvent( QKeyEvent *);
...@@ -171,6 +172,8 @@ private slots: ...@@ -171,6 +172,8 @@ private slots:
void handleSystrayClick( QSystemTrayIcon::ActivationReason ); void handleSystrayClick( QSystemTrayIcon::ActivationReason );
void updateSystrayTooltipName( QString ); void updateSystrayTooltipName( QString );
void updateSystrayTooltipStatus( int ); void updateSystrayTooltipStatus( int );
void showCryptedLabel( bool );
signals: signals:
void askReleaseVideo( ); void askReleaseVideo( );
void askVideoToResize( unsigned int, unsigned int ); 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