Confilct solved
[qtmeetings] / src / BusinessLogic / UIManager.cpp
index 96251a1..be2f660 100644 (file)
@@ -63,15 +63,6 @@ void UIManager::showMainView()
        iWindowManager->showView( iWeeklyView );
 }
 
-void UIManager::showProgressBar( QString aText )
-{
-       if ( iProgressBar != 0 )
-       {
-               iProgressBar->update( aText );
-               iWindowManager->showDialog( iProgressBar );
-       }
-}
-
 // ===============================================
 //             INITIALIZE THE UIMANAGER
 void UIManager::createWeeklyView()
@@ -103,8 +94,7 @@ void UIManager::createRoomStatusIndicator()
 
 void UIManager::createPasswordDialog()
 {
-       iPasswordDialog = new PasswordDialog( iEngine->iConfiguration->adminPassword(), tr("UIManager::createPasswordDialog"), tr("UIManager::createPasswordDialog") );
-       
+       iPasswordDialog = new PasswordDialog( iEngine->iConfiguration->adminPassword(), "", tr("Enter password") );
        connect( iPasswordDialog, SIGNAL( passwordEntered( PasswordDialog::PasswordStatus ) ), this, SLOT( passwordEntered( PasswordDialog::PasswordStatus ) ) );
 }
 
@@ -173,7 +163,8 @@ void UIManager::showMeetingProgressBar( Meeting *aMeeting )
 {
        if ( iProgressBar != 0 )
        {
-               iProgressBar->update( tr("Fetching meeting info...") );
+               iProgressBar->update( tr( "Fetching meeting info..." ), tr( "Please wait" ) );
+               iProgressBar->toggleCancellable( true );
                iWindowManager->showDialog( static_cast<QDialog *>( iProgressBar ), false, false );
                iEngine->stopIdleTimeCounter();
        }
@@ -222,13 +213,12 @@ void UIManager::progressBarCancelled()
 void UIManager::changeModeOrdered( DeviceManager::OperationMode aMode )
 {
        qDebug() << "[UIManager::changeModeOrdered] <Invoked>";
-       
-       QString message = tr( "You are about to change operation mode to %1." )
-                               .arg( iEngine->iDevice->operationModeToString( aMode ) );
 
        if ( iPasswordDialog != 0 )
        {
-               // TODO : Set the new text for password dialog
+               QString text = tr( "You are about to change operation mode to %1." )
+                                               .arg( iEngine->iDevice->operationModeToString( aMode ) );
+               iPasswordDialog->update( text );
                iWindowManager->showDialog( static_cast<QDialog *>( iPasswordDialog ) );
        }
 }
@@ -260,6 +250,8 @@ void UIManager::passwordEntered( PasswordDialog::PasswordStatus aStatus )
                        // Show the progress bar..
                        if ( iProgressBar != 0 )
                        {
+                               iProgressBar->update( tr( "" ), tr( "Changing operation mode" ) );
+                               iProgressBar->toggleCancellable( false );
                                iWindowManager->showDialog( static_cast<QDialog *>( iProgressBar ), false );
                        }
                        // ... and initiate the mode changing