From dbe1aecff23276bda7eeac2fe30c17710271cbbe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment=20Stenac?= <zorglub@videolan.org>
Date: Sat, 11 Mar 2006 13:41:49 +0000
Subject: [PATCH] Change some button orders Hide the "OK" button in the
 preferences (keep "Save")

---
 modules/gui/wxwidgets/dialogs/messages.cpp    | 18 ++++++++++--------
 modules/gui/wxwidgets/dialogs/preferences.cpp |  9 +++++++--
 2 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/modules/gui/wxwidgets/dialogs/messages.cpp b/modules/gui/wxwidgets/dialogs/messages.cpp
index 8ba80518913c..fe7614f2a1d2 100644
--- a/modules/gui/wxwidgets/dialogs/messages.cpp
+++ b/modules/gui/wxwidgets/dialogs/messages.cpp
@@ -73,23 +73,25 @@ Messages::Messages( intf_thread_t *_p_intf, wxWindow *p_parent ):
     warn_attr = new wxTextAttr( *wxBLUE );
     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 */
     wxButton *save_log_button = new wxButton( messages_panel, wxID_SAVEAS );
     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 */
     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( 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->Layout();
     wxBoxSizer *main_sizer = new wxBoxSizer( wxVERTICAL );
diff --git a/modules/gui/wxwidgets/dialogs/preferences.cpp b/modules/gui/wxwidgets/dialogs/preferences.cpp
index cce40e3603bf..875da01a4313 100644
--- a/modules/gui/wxwidgets/dialogs/preferences.cpp
+++ b/modules/gui/wxwidgets/dialogs/preferences.cpp
@@ -200,11 +200,14 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf, wxWindow *p_parent)
     /* Separation */
     wxStaticLine *static_line = new wxStaticLine( panel, wxID_OK );
 
+#if 0
     /* Create the buttons */
     wxButton *ok_button = new wxButton( panel, wxID_OK );
     ok_button->SetDefault();
-    wxButton *cancel_button = new wxButton( panel, wxID_CANCEL );
+#endif
     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,
                                            wxU(_("Reset All")) );
 
@@ -222,9 +225,11 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf, wxWindow *p_parent)
 
     /* Place everything in sizers */
     wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL );
+#if 0
     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( cancel_button, 0, wxALL, 5 );
     button_sizer->Add( reset_button, 0, wxALL, 5 );
     button_sizer->Add( dummy_panel, 1, wxALL, 5 );
     button_sizer->Add( advanced_checkbox, 0, wxALL | wxALIGN_RIGHT |
-- 
GitLab