Commit dbe1aecf authored by Clément Stenac's avatar Clément Stenac

Change some button orders

Hide the "OK" button in the preferences (keep "Save")
parent 00d18e84
...@@ -73,23 +73,25 @@ Messages::Messages( intf_thread_t *_p_intf, wxWindow *p_parent ): ...@@ -73,23 +73,25 @@ Messages::Messages( intf_thread_t *_p_intf, wxWindow *p_parent ):
warn_attr = new wxTextAttr( *wxBLUE ); warn_attr = new wxTextAttr( *wxBLUE );
dbg_attr = new wxTextAttr( *wxBLACK ); dbg_attr = new wxTextAttr( *wxBLACK );
/* Create the OK button */
wxButton *ok_button = new wxButton( messages_panel, wxID_CLOSE);
ok_button->SetDefault();
/* Create the Clear button */
wxButton *clear_button = new wxButton( messages_panel, wxID_CLEAR );
clear_button->SetDefault();
/* Create the Save Log button */ /* Create the Save Log button */
wxButton *save_log_button = new wxButton( messages_panel, wxID_SAVEAS ); wxButton *save_log_button = new wxButton( messages_panel, wxID_SAVEAS );
save_log_button->SetDefault(); save_log_button->SetDefault();
/* Create the Clear button */
wxButton *clear_button = new wxButton( messages_panel, wxID_CLEAR );
clear_button->SetDefault();
/* Create the OK button */
wxButton *ok_button = new wxButton( messages_panel, wxID_CLOSE);
ok_button->SetDefault();
/* Place everything in sizers */ /* Place everything in sizers */
wxBoxSizer *buttons_sizer = new wxBoxSizer( wxHORIZONTAL ); wxBoxSizer *buttons_sizer = new wxBoxSizer( wxHORIZONTAL );
buttons_sizer->Add( ok_button, 0, wxEXPAND |wxALIGN_LEFT| wxALL, 5 );
buttons_sizer->Add( clear_button, 0, wxEXPAND |wxALIGN_LEFT| wxALL, 5 );
buttons_sizer->Add( save_log_button, 0, wxEXPAND |wxALIGN_LEFT| wxALL, 5 ); buttons_sizer->Add( save_log_button, 0, wxEXPAND |wxALIGN_LEFT| wxALL, 5 );
buttons_sizer->Add( clear_button, 0, wxEXPAND |wxALIGN_RIGHT| wxALL, 5 );
buttons_sizer->Add( ok_button, 0, wxEXPAND |wxALIGN_RIGHT| wxALL, 5 );
buttons_sizer->Add( new wxPanel( this, -1 ), 1, wxALL, 5 ); buttons_sizer->Add( new wxPanel( this, -1 ), 1, wxALL, 5 );
buttons_sizer->Layout(); buttons_sizer->Layout();
wxBoxSizer *main_sizer = new wxBoxSizer( wxVERTICAL ); wxBoxSizer *main_sizer = new wxBoxSizer( wxVERTICAL );
......
...@@ -200,11 +200,14 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf, wxWindow *p_parent) ...@@ -200,11 +200,14 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf, wxWindow *p_parent)
/* Separation */ /* Separation */
wxStaticLine *static_line = new wxStaticLine( panel, wxID_OK ); wxStaticLine *static_line = new wxStaticLine( panel, wxID_OK );
#if 0
/* Create the buttons */ /* Create the buttons */
wxButton *ok_button = new wxButton( panel, wxID_OK ); wxButton *ok_button = new wxButton( panel, wxID_OK );
ok_button->SetDefault(); ok_button->SetDefault();
wxButton *cancel_button = new wxButton( panel, wxID_CANCEL ); #endif
wxButton *save_button = new wxButton( panel, wxID_SAVE ); wxButton *save_button = new wxButton( panel, wxID_SAVE );
save_button->SetDefault();
wxButton *cancel_button = new wxButton( panel, wxID_CANCEL );
wxButton *reset_button = new wxButton( panel, ResetAll_Event, wxButton *reset_button = new wxButton( panel, ResetAll_Event,
wxU(_("Reset All")) ); wxU(_("Reset All")) );
...@@ -222,9 +225,11 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf, wxWindow *p_parent) ...@@ -222,9 +225,11 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf, wxWindow *p_parent)
/* Place everything in sizers */ /* Place everything in sizers */
wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL ); wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL );
#if 0
button_sizer->Add( ok_button, 0, wxALL, 5 ); button_sizer->Add( ok_button, 0, wxALL, 5 );
button_sizer->Add( cancel_button, 0, wxALL, 5 ); #endif
button_sizer->Add( save_button, 0, wxALL, 5 ); button_sizer->Add( save_button, 0, wxALL, 5 );
button_sizer->Add( cancel_button, 0, wxALL, 5 );
button_sizer->Add( reset_button, 0, wxALL, 5 ); button_sizer->Add( reset_button, 0, wxALL, 5 );
button_sizer->Add( dummy_panel, 1, wxALL, 5 ); button_sizer->Add( dummy_panel, 1, wxALL, 5 );
button_sizer->Add( advanced_checkbox, 0, wxALL | wxALIGN_RIGHT | button_sizer->Add( advanced_checkbox, 0, wxALL | wxALIGN_RIGHT |
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment