+inline void MainInterface::createStatusBar()
+{
+ /****************
+ * Status Bar *
+ ****************/
+ /* Widgets Creation*/
+ QStatusBar *statusBarr = statusBar();
+
+ TimeLabel *timeLabel = new TimeLabel( p_intf );
+ nameLabel = new QLabel( this );
+ nameLabel->setTextInteractionFlags( Qt::TextSelectableByMouse
+ | Qt::TextSelectableByKeyboard );
+ SpeedLabel *speedLabel = new SpeedLabel( p_intf, "1.00x", this );
+
+ /* Styling those labels */
+ timeLabel->setFrameStyle( QFrame::Sunken | QFrame::Panel );
+ speedLabel->setFrameStyle( QFrame::Sunken | QFrame::Panel );
+ nameLabel->setFrameStyle( QFrame::Sunken | QFrame::StyledPanel);
+
+ /* and adding those */
+ statusBarr->addWidget( nameLabel, 8 );
+ statusBarr->addPermanentWidget( speedLabel, 0 );
+ statusBarr->addPermanentWidget( timeLabel, 0 );
+
+ /* timeLabel behaviour:
+ - double clicking opens the goto time dialog
+ - right-clicking and clicking just toggle between remaining and
+ elapsed time.*/
+ CONNECT( timeLabel, timeLabelDoubleClicked(), THEDP, gotoTimeDialog() );
+
+ CONNECT( THEMIM->getIM(), encryptionChanged( bool ),
+ this, showCryptedLabel( bool ) );
+}
+
+inline void MainInterface::initSystray()
+{
+ bool b_systrayAvailable = QSystemTrayIcon::isSystemTrayAvailable();
+ bool b_systrayWanted = config_GetInt( p_intf, "qt-system-tray" );
+
+ if( config_GetInt( p_intf, "qt-start-minimized") > 0 )
+ {
+ if( b_systrayAvailable )
+ {
+ b_systrayWanted = true;
+ b_shouldHide = true;
+ }
+ else
+ msg_Err( p_intf, "cannot start minimized without system tray bar" );
+ }
+
+ if( b_systrayAvailable && b_systrayWanted )
+ createSystray();
+}
+