diff --git a/kmbroadcaststatus.cpp b/kmbroadcaststatus.cpp index 884c97097..cfc348a76 100644 --- a/kmbroadcaststatus.cpp +++ b/kmbroadcaststatus.cpp @@ -246,8 +246,8 @@ KMLittleProgressDlg::KMLittleProgressDlg( KMMainWidget* mainWidget, QWidget* par connect ( ProgressManager::instance(), SIGNAL( progressItemCompleted( ProgressItem * ) ), this, SLOT( slotProgressItemCompleted( ProgressItem * ) ) ); - connect ( mainWidget, SIGNAL( progressDialogToggled()), - this, SLOT( slotProgressDialogToggled() ) ); + connect ( mainWidget, SIGNAL( progressDialogVisible( bool )), + this, SLOT( slotProgressDialogVisible( bool ) ) ); } void KMLittleProgressDlg::slotProgressItemAdded( ProgressItem *item ) @@ -331,14 +331,12 @@ void KMLittleProgressDlg::setMode() { break; case Progress: - if (stack->isVisible()) { - stack->show(); - stack->raiseWidget( m_pProgressBar ); - if ( m_bShowButton ) { - m_pButton->show(); - } - m_sslLabel->setState( m_sslLabel->lastState() ); + stack->show(); + stack->raiseWidget( m_pProgressBar ); + if ( m_bShowButton ) { + m_pButton->show(); } + m_sslLabel->setState( m_sslLabel->lastState() ); break; } } @@ -372,13 +370,15 @@ bool KMLittleProgressDlg::eventFilter( QObject *, QEvent *ev ) return false; } -void KMLittleProgressDlg::slotProgressDialogToggled() +void KMLittleProgressDlg::slotProgressDialogVisible( bool b ) { - // Hide the progress bar when the detailed one is showing - if ( mode == Label ) { - mode = Progress; - } else if ( mode == Progress ) { - mode = Label; - } - setMode(); + // Hide the progress bar when the detailed one is showing + if ( b ) { + mode = Label; + m_pButton->setPixmap( SmallIcon( "down" ) ); + } else { + mode = Progress; + m_pButton->setPixmap( SmallIcon( "up" ) ); + } + setMode(); } diff --git a/kmbroadcaststatus.h b/kmbroadcaststatus.h index c48166467..23975266b 100644 --- a/kmbroadcaststatus.h +++ b/kmbroadcaststatus.h @@ -126,7 +126,7 @@ public slots: virtual void slotProgressItemProgress( ProgressItem *i, unsigned int value ); protected slots: - void slotProgressDialogToggled(); + void slotProgressDialogVisible( bool ); protected: KMMainWidget* m_mainWidget; diff --git a/kmmainwidget.cpp b/kmmainwidget.cpp index 02105e929..5b2435201 100644 --- a/kmmainwidget.cpp +++ b/kmmainwidget.cpp @@ -3373,6 +3373,7 @@ void KMMainWidget::slotShowProgressDialog() { if( mProgressDialog ) { mProgressDialog->show(); + emit progressDialogVisible( true ); } } @@ -3384,6 +3385,6 @@ void KMMainWidget::slotToggleProgressDialog() mProgressDialog->hide(); else if ( mProgressDialog->isHidden() ) mProgressDialog->show(); + emit progressDialogVisible( mProgressDialog->isShown() ); } - emit progressDialogToggled(); } diff --git a/kmmainwidget.h b/kmmainwidget.h index e373a2438..6671404c5 100644 --- a/kmmainwidget.h +++ b/kmmainwidget.h @@ -187,7 +187,7 @@ signals: void messagesTransfered( bool ); void captionChangeRequest( const QString & caption ); void modifiedToolBarConfig( void ); - void progressDialogToggled( void ); + void progressDialogVisible( bool ); protected: void setupActions();