]> git.sesse.net Git - vlc/commitdiff
wx/dialogs/*: Don't put labels in buttons if we have a wxID_FOO. So the buttons are...
authorChristophe Mutricy <xtophe@videolan.org>
Sat, 11 Feb 2006 20:17:20 +0000 (20:17 +0000)
committerChristophe Mutricy <xtophe@videolan.org>
Sat, 11 Feb 2006 20:17:20 +0000 (20:17 +0000)
modules/gui/wxwidgets/dialogs/bookmarks.cpp
modules/gui/wxwidgets/dialogs/interaction.cpp
modules/gui/wxwidgets/dialogs/iteminfo.cpp
modules/gui/wxwidgets/dialogs/messages.cpp
modules/gui/wxwidgets/dialogs/open.cpp
modules/gui/wxwidgets/dialogs/preferences.cpp
modules/gui/wxwidgets/dialogs/streamout.cpp
modules/gui/wxwidgets/dialogs/subtitles.cpp
modules/gui/wxwidgets/dialogs/vlm/vlm_panel.cpp

index 7469c469ee980225b47557d1774a5f0fc97bce31..aa2cabfe2a872d430e22839520d2f41f2c3b56fb 100644 (file)
@@ -52,9 +52,9 @@ DEFINE_LOCAL_EVENT_TYPE( wxEVT_BOOKMARKS );
 BEGIN_EVENT_TABLE(BookmarksDialog, wxFrame)
     /* Hide the window when the user closes the window */
     EVT_CLOSE(BookmarksDialog::OnClose )
-    EVT_BUTTON( ButtonAdd_Event, BookmarksDialog::OnAdd )
-    EVT_BUTTON( ButtonDel_Event, BookmarksDialog::OnDel )
-    EVT_BUTTON( ButtonClear_Event, BookmarksDialog::OnClear )
+    EVT_BUTTON( wxID_ADD, BookmarksDialog::OnAdd )
+    EVT_BUTTON( wxID_DELETE, BookmarksDialog::OnDel )
+    EVT_BUTTON( wxID_CLEAR, BookmarksDialog::OnClear )
     EVT_BUTTON( ButtonExtract_Event, BookmarksDialog::OnExtract )
     EVT_BUTTON( ButtonEdit_Event, BookmarksDialog::OnEdit )
 
@@ -102,10 +102,10 @@ BookmarkEditDialog::BookmarkEditDialog( intf_thread_t *_p_intf,
     sizer->Add( bytes_text, 0, wxEXPAND|wxRIGHT, 5);
 
     wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL );
-    wxButton *ok_button = new wxButton( this, wxID_OK, wxU(_("OK") ) );
+    wxButton *ok_button = new wxButton( this, wxID_OK );
     ok_button->SetDefault();
     button_sizer->Add( ok_button );
-    button_sizer->Add( new wxButton( this, wxID_CANCEL, wxU(_("Cancel") ) ) );
+    button_sizer->Add( new wxButton( this, wxID_CANCEL ) );
 
     panel_sizer->Add( sizer, 0, wxEXPAND | wxTOP|wxBOTTOM, 5 );
     panel_sizer->Add( button_sizer, 0, wxEXPAND | wxBOTTOM, 5 );
@@ -156,11 +156,11 @@ BookmarksDialog::BookmarksDialog( intf_thread_t *_p_intf, wxWindow *p_parent )
     wxPanel *panel = new wxPanel( main_panel, -1 );
     wxBoxSizer *panel_sizer = new wxBoxSizer( wxVERTICAL );
     wxButton *button_add =
-        new wxButton( panel, ButtonAdd_Event, wxU(_("Add")) );
+        new wxButton( panel, wxID_ADD );
     wxButton *button_del =
-        new wxButton( panel, ButtonDel_Event, wxU(_("Remove")) );
+        new wxButton( panel, wxID_DELETE );
     wxButton *button_clear =
-        new wxButton( panel, ButtonClear_Event, wxU(_("Clear")) );
+        new wxButton( panel, wxID_CLEAR );
     wxButton *button_edit =
         new wxButton( panel, ButtonEdit_Event, wxU(_("Edit")) );
     wxButton *button_extract =
index 77fb2722b674c5335357584364c1f887c8c89f70..7b340f0ebf6b99eaf43a7495f5650e5de2100b3d 100644 (file)
@@ -168,21 +168,16 @@ void InteractionDialog::Render()
     //-------------- Buttons ------------------
     if( p_dialog->i_flags & DIALOG_OK_CANCEL )
     {
-        wxButton *ok = new wxButton( buttons_panel,
-                                     wxID_OK, wxU( _("OK") ) );
-        wxButton *cancel = new wxButton( buttons_panel,
-                                         wxID_CANCEL, wxU( _("Cancel") ) );
+        wxButton *ok = new wxButton( buttons_panel, wxID_OK );
+        wxButton *cancel = new wxButton( buttons_panel, wxID_CANCEL );
         buttons_sizer->Add( ok, 0, wxEXPAND | wxRIGHT| wxLEFT | wxALIGN_CENTER, 5 );
         buttons_sizer->Add( cancel, 0, wxEXPAND | wxRIGHT| wxLEFT | wxALIGN_CENTER, 5 );
     }
     else if( p_dialog->i_flags & DIALOG_YES_NO_CANCEL )
     {
-        wxButton *yes = new wxButton( buttons_panel,
-                                      wxID_YES, wxU( _("Yes") ) );
-        wxButton *no = new wxButton( buttons_panel,
-                                     wxID_NO, wxU( _("No") ) );
-        wxButton *cancel = new wxButton( buttons_panel,
-                                         wxID_CANCEL, wxU( _("Cancel") ) );
+        wxButton *yes = new wxButton( buttons_panel, wxID_YES );
+        wxButton *no = new wxButton( buttons_panel, wxID_NO );
+        wxButton *cancel = new wxButton( buttons_panel, wxID_CANCEL );
         buttons_sizer->Add( yes, 0, wxEXPAND | wxRIGHT| wxLEFT |
                                     wxALIGN_CENTER, 5 );
         buttons_sizer->Add( no, 0, wxEXPAND | wxRIGHT| wxLEFT |
@@ -195,10 +190,8 @@ void InteractionDialog::Render()
         wxCheckBox *noshow = new wxCheckBox( buttons_panel,
                       NoShow_Event, wxU( _("Don't show further errors") ) );
         noshow->SetValue( b_noshow );
-        wxButton *clear = new wxButton( buttons_panel,
-                                        wxID_CLEAR, wxU( _("Clear") ) );
-        wxButton *close = new wxButton( buttons_panel, wxID_CLOSE,
-                                         wxU( _("Close") ) );
+        wxButton *clear = new wxButton( buttons_panel, wxID_CLEAR );
+        wxButton *close = new wxButton( buttons_panel, wxID_CLOSE );
         buttons_sizer->Add( noshow, 0, wxEXPAND | wxRIGHT|
                                        wxLEFT | wxALIGN_LEFT, 5 );
         buttons_sizer->Add( 0, 0, 1 );
index db4afa5e3bd7aebf84025f632bba3c5be83d2749..f767f903ce8eb671432566fd34d2a6155906791e 100644 (file)
@@ -75,10 +75,9 @@ ItemInfoDialog::ItemInfoDialog( intf_thread_t *_p_intf,
     wxStaticLine *static_line = new wxStaticLine( panel, wxID_OK );
 
     /* Create the buttons */
-    wxButton *ok_button = new wxButton( panel, wxID_OK, wxU(_("OK")) );
+    wxButton *ok_button = new wxButton( panel, wxID_OK );
     ok_button->SetDefault();
-    wxButton *cancel_button = new wxButton( panel, wxID_CANCEL,
-                                            wxU(_("Cancel")) );
+    wxButton *cancel_button = new wxButton( panel, wxID_CANCEL );
 
     /* Place everything in sizers */
     wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL );
index 3c895188291f5e8b7cbdf65a51c60abb6e271258..8ba80518913c9571487a89cbfcbca115dcb15d58 100644 (file)
@@ -37,7 +37,7 @@ enum
 
 BEGIN_EVENT_TABLE(Messages, wxFrame)
     /* Button events */
-    EVT_BUTTON(wxID_OK, Messages::OnButtonClose)
+    EVT_BUTTON(wxID_CLOSE, Messages::OnButtonClose)
     EVT_BUTTON(wxID_CLEAR, Messages::OnClear)
     EVT_BUTTON(wxID_SAVEAS, Messages::OnSaveLog)
 
@@ -74,18 +74,15 @@ Messages::Messages( intf_thread_t *_p_intf, wxWindow *p_parent ):
     dbg_attr = new wxTextAttr( *wxBLACK );
 
     /* Create the OK button */
-    wxButton *ok_button = new wxButton( messages_panel, wxID_OK,
-                                        wxU(_("Close")));
+    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,
-                                           wxU(_("Clear")));
+    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,
-                                              wxU(_("Save As...")));
+    wxButton *save_log_button = new wxButton( messages_panel, wxID_SAVEAS );
     save_log_button->SetDefault();
 
     /* Place everything in sizers */
index a77765b9bb1de3216782e37c2a4b2a69af38be64..3ea3c7134fea6c5493ce4f07ed38a5774c0f4c3a 100644 (file)
@@ -317,10 +317,10 @@ AutoBuiltPanel::AutoBuiltPanel( wxWindow *parent, OpenDialog *dialog,
 
         /* Create buttons */
         wxButton *ok_button =
-            new wxButton( p_advanced_dialog, wxID_OK, wxU(_("OK")) );
+            new wxButton( p_advanced_dialog, wxID_OK );
         ok_button->SetDefault();
         wxButton *cancel_button =
-            new wxButton( p_advanced_dialog, wxID_CANCEL, wxU(_("Cancel")) );
+            new wxButton( p_advanced_dialog, wxID_CANCEL );
         wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL );
         button_sizer->Add( ok_button, 0, wxALL, 5 );
         button_sizer->Add( cancel_button, 0, wxALL, 5 );
@@ -487,10 +487,9 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent,
     wxStaticLine *static_line = new wxStaticLine( panel, wxID_OK );
 
     /* Create the buttons */
-    wxButton *ok_button = new wxButton( panel, wxID_OK, wxU(_("OK")) );
+    wxButton *ok_button = new wxButton( panel, wxID_OK );
     ok_button->SetDefault();
-    wxButton *cancel_button = new wxButton( panel, wxID_CANCEL,
-                                            wxU(_("Cancel")) );
+    wxButton *cancel_button = new wxButton( panel, wxID_CANCEL );
 
     /* Create notebook */
     notebook = new wxNotebook( panel, Notebook_Event );
index 653f02a37d4731183053499b04502e61fc3f8596..105fde47147d1ecac81278b3aa5cc4963917069b 100644 (file)
@@ -201,11 +201,10 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf, wxWindow *p_parent)
     wxStaticLine *static_line = new wxStaticLine( panel, wxID_OK );
 
     /* Create the buttons */
-    wxButton *ok_button = new wxButton( panel, wxID_OK, wxU(_("OK")) );
+    wxButton *ok_button = new wxButton( panel, wxID_OK );
     ok_button->SetDefault();
-    wxButton *cancel_button = new wxButton( panel, wxID_CANCEL,
-                                            wxU(_("Cancel")) );
-    wxButton *save_button = new wxButton( panel, wxID_SAVE, wxU(_("Save")) );
+    wxButton *cancel_button = new wxButton( panel, wxID_CANCEL );
+    wxButton *save_button = new wxButton( panel, wxID_SAVE );
     wxButton *reset_button = new wxButton( panel, ResetAll_Event,
                                            wxU(_("Reset All")) );
 
index 8ad40c359951cccbea380fbf05aa32b2247c9130..5a8c83a4aa08dab58441d24b65248d320130a4de 100644 (file)
@@ -192,10 +192,9 @@ SoutDialog::SoutDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ):
     misc_panel = MiscPanel( panel );
 
     /* Create the buttons */
-    wxButton *ok_button = new wxButton( panel, wxID_OK, wxU(_("OK")) );
+    wxButton *ok_button = new wxButton( panel, wxID_OK );
     ok_button->SetDefault();
-    wxButton *cancel_button = new wxButton( panel, wxID_CANCEL,
-                                            wxU(_("Cancel")) );
+    wxButton *cancel_button = new wxButton( panel, wxID_CANCEL );
 
     /* Place everything in sizers */
     wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL );
index 258c64ef50cd6d01b0ac9dde9fa4722f92b6ec2d..6e5b684adb518f0cff3d3c9a565f6ab83551cd68 100644 (file)
@@ -239,10 +239,9 @@ SubsFileDialog::SubsFileDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ):
     wxStaticLine *static_line = new wxStaticLine( panel, wxID_OK );
 
     /* Create the buttons */
-    wxButton *ok_button = new wxButton( panel, wxID_OK, wxU(_("OK")) );
+    wxButton *ok_button = new wxButton( panel, wxID_OK );
     ok_button->SetDefault();
-    wxButton *cancel_button = new wxButton( panel, wxID_CANCEL,
-                                            wxU(_("Cancel")) );
+    wxButton *cancel_button = new wxButton( panel, wxID_CANCEL );
 
     /* Place everything in sizers */
     wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL );
index bf73fe2908c478462838327fb21bfd8d5b4ea24a..4beed090752b883f1631b4a1f9457ed4d0054079 100644 (file)
@@ -38,9 +38,9 @@ enum
 
 BEGIN_EVENT_TABLE( VLMPanel, wxPanel)
    EVT_TIMER( Timer_Event, VLMPanel::OnTimer )
-   EVT_BUTTON( Close_Event, VLMPanel::OnClose )
+   EVT_BUTTON( wxID_CLOSE, VLMPanel::OnClose )
    EVT_BUTTON( Load_Event, VLMPanel::OnLoad )
-   EVT_BUTTON( Save_Event, VLMPanel::OnSave )
+   EVT_BUTTON( wxID_SAVE, VLMPanel::OnSave )
 END_EVENT_TABLE()
 
 
@@ -73,10 +73,10 @@ VLMPanel::VLMPanel( intf_thread_t *_p_intf, wxWindow *_p_parent ) :
 #endif
 
     wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL );
-    button_sizer->Add( new wxButton( this, Close_Event, wxU(_("Close") ) ) );
+    button_sizer->Add( new wxButton( this, wxID_CLOSE ));
     button_sizer->Add( 0, 0, 1 );
     button_sizer->Add( new wxButton( this, Load_Event, wxU(_("Load") ) ), 0, wxRIGHT, 10 );
-    button_sizer->Add( new wxButton( this, Save_Event, wxU(_("Save") ) ) );
+    button_sizer->Add( new wxButton( this, wxID_SAVE ));
     panel_sizer->Add( button_sizer, 0 , wxEXPAND | wxALL, 5 );
 
     panel_sizer->Layout();
@@ -407,8 +407,7 @@ VLMAddStreamPanel::VLMAddStreamPanel( intf_thread_t *_p_intf,
 
     if( !b_edit )
     {
-        lower_sizer->Add( new wxButton( this, Clear_Event,
-                          wxU( _( "Clear" )  ) ),
+        lower_sizer->Add( new wxButton( this, wxID_CLEAR ),
                          0 , wxEXPAND | wxALL , 5 );
     }
     lower_sizer->Add( new wxButton( this, Create_Event,