Don't allow to go next if the timezone view hasn't loaded.

main
Teo Mrnjavac 11 years ago
parent f9aa532d77
commit 81eafced2f

@ -31,6 +31,7 @@ LocaleViewStep::LocaleViewStep( QObject* parent )
: Calamares::ViewStep( parent ) : Calamares::ViewStep( parent )
, m_widget( new QWidget() ) , m_widget( new QWidget() )
, m_actualWidget( new LocalePage() ) , m_actualWidget( new LocalePage() )
, m_nextEnabled( false )
{ {
QBoxLayout* mainLayout = new QHBoxLayout; QBoxLayout* mainLayout = new QHBoxLayout;
m_widget->setLayout( mainLayout ); m_widget->setLayout( mainLayout );
@ -47,12 +48,14 @@ LocaleViewStep::LocaleViewStep( QObject* parent )
m_widget->layout()->removeWidget( waitingLabel ); m_widget->layout()->removeWidget( waitingLabel );
waitingLabel->deleteLater(); waitingLabel->deleteLater();
m_widget->layout()->addWidget( m_actualWidget ); m_widget->layout()->addWidget( m_actualWidget );
m_nextEnabled = true;
emit nextStatusChanged( m_nextEnabled );
}); });
QFuture< void > initFuture = QtConcurrent::run( LocaleGlobal::init ); QFuture< void > initFuture = QtConcurrent::run( LocaleGlobal::init );
m_initWatcher.setFuture( initFuture ); m_initWatcher.setFuture( initFuture );
emit nextStatusChanged( true ); emit nextStatusChanged( m_nextEnabled );
} }
@ -93,7 +96,7 @@ LocaleViewStep::back()
bool bool
LocaleViewStep::isNextEnabled() const LocaleViewStep::isNextEnabled() const
{ {
return true; return m_nextEnabled;
} }

@ -56,6 +56,7 @@ private:
QFutureWatcher< void > m_initWatcher; QFutureWatcher< void > m_initWatcher;
LocalePage* m_actualWidget; LocalePage* m_actualWidget;
bool m_nextEnabled;
}; };
#endif // LOCALEVIEWSTEP_H #endif // LOCALEVIEWSTEP_H

Loading…
Cancel
Save