From 39fb2edc25f2703744932f25d956bf7af604fc5f Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Tue, 9 Feb 2016 00:49:04 +0100 Subject: Linux/MacOSX: add progress bar for mouse collected entropy in GUI of volume creation wizard. Add mutex protection in event handler for shared counter variable --- src/Main/Forms/Forms.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/Main/Forms/Forms.cpp') diff --git a/src/Main/Forms/Forms.cpp b/src/Main/Forms/Forms.cpp index da2a30ba..5fa70e5f 100644 --- a/src/Main/Forms/Forms.cpp +++ b/src/Main/Forms/Forms.cpp @@ -1436,7 +1436,7 @@ KeyfileGeneratorDialogBase::KeyfileGeneratorDialogBase( wxWindow* parent, wxWind bSizer162->Add( fgSizer8, 1, wxEXPAND, 5 ); - bSizer144->Add( bSizer162, 1, wxALL|wxEXPAND, 5 ); + bSizer144->Add( bSizer162, 0, wxALL|wxEXPAND, 5 ); wxBoxSizer* bSizer146; bSizer146 = new wxBoxSizer( wxHORIZONTAL ); @@ -2885,7 +2885,6 @@ VolumeCreationProgressWizardPageBase::VolumeCreationProgressWizardPageBase( wxWi bSizer126->Add( RandomPoolSampleStaticText, 0, wxEXPAND|wxTOP|wxRIGHT|wxALIGN_BOTTOM, 7 ); DisplayKeysCheckBox = new wxCheckBox( this, wxID_ANY, _("Show"), wxDefaultPosition, wxDefaultSize, 0 ); - DisplayKeysCheckBox->SetValue(true); bSizer126->Add( DisplayKeysCheckBox, 0, wxEXPAND|wxRIGHT, 5 ); @@ -2919,6 +2918,16 @@ VolumeCreationProgressWizardPageBase::VolumeCreationProgressWizardPageBase( wxWi bSizer105->Add( sbSizer31, 0, wxALL|wxEXPAND, 5 ); + wxStaticBoxSizer* sbSizer45; + sbSizer45 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Randomness Collected From Mouse Movements") ), wxVERTICAL ); + + CollectedEntropy = new wxGauge( this, wxID_ANY, 2560, wxDefaultPosition, wxDefaultSize, wxGA_HORIZONTAL|wxGA_SMOOTH ); + CollectedEntropy->SetValue( 0 ); + sbSizer45->Add( CollectedEntropy, 0, wxALL|wxEXPAND, 5 ); + + + bSizer105->Add( sbSizer45, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 ); + wxStaticBoxSizer* sbSizer32; sbSizer32 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); @@ -3015,12 +3024,9 @@ VolumeCreationProgressWizardPageBase::VolumeCreationProgressWizardPageBase( wxWi bSizer105->Add( sbSizer32, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - bSizer105->Add( 0, 0, 0, wxTOP|wxBOTTOM, 5 ); - InfoStaticText = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); InfoStaticText->Wrap( -1 ); - bSizer105->Add( InfoStaticText, 0, wxALL, 5 ); + bSizer105->Add( InfoStaticText, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); bSizer104->Add( bSizer105, 1, wxEXPAND, 5 ); -- cgit v1.2.3