@ -24,6 +24,7 @@
# include "viewpages/BlankViewStep.h"
# include "viewpages/ExecutionViewStep.h"
# include "viewpages/ViewStep.h"
# include "widgets/TranslationFix.h"
# include <QApplication>
# include <QBoxLayout>
@ -82,6 +83,12 @@ ViewManager::ViewManager( QObject* parent )
connect ( JobQueue : : instance ( ) , & JobQueue : : finished , this , & ViewManager : : next ) ;
CALAMARES_RETRANSLATE_SLOT ( & ViewManager : : updateButtonLabels ) ;
# ifdef PRESERVE_FOR_TRANSLATION_PURPOSES
tr ( " &Yes " ) ;
tr ( " &No " ) ;
tr ( " &Close " ) ;
# endif
}
@ -176,15 +183,13 @@ ViewManager::onInstallationFailed( const QString& message, const QString& detail
{
msgBox - > setStandardButtons ( QMessageBox : : Yes | QMessageBox : : No ) ;
msgBox - > setDefaultButton ( QMessageBox : : No ) ;
msgBox - > button ( QMessageBox : : Yes ) - > setText ( tr ( " &Yes " ) ) ;
msgBox - > button ( QMessageBox : : No ) - > setText ( tr ( " &No " ) ) ;
}
else
{
msgBox - > setStandardButtons ( QMessageBox : : Close ) ;
msgBox - > setDefaultButton ( QMessageBox : : Close ) ;
msgBox - > button ( QMessageBox : : Close ) - > setText ( tr ( " &Close " ) ) ;
}
Calamares : : fixButtonLabels ( msgBox ) ;
msgBox - > show ( ) ;
cDebug ( ) < < " Calamares will quit when the dialog closes. " ;
@ -516,8 +521,7 @@ ViewManager::confirmCancelInstallation()
" The installer will quit and all changes will be lost. " ) ;
QMessageBox mb ( QMessageBox : : Question , title , question , QMessageBox : : Yes | QMessageBox : : No , m_widget ) ;
mb . setDefaultButton ( QMessageBox : : No ) ;
mb . button ( QMessageBox : : Yes ) - > setText ( tr ( " &Yes " ) ) ;
mb . button ( QMessageBox : : No ) - > setText ( tr ( " &No " ) ) ;
Calamares : : fixButtonLabels ( & mb ) ;
int response = mb . exec ( ) ;
return response = = QMessageBox : : Yes ;
}