Commit 272e38a0 authored by Christophe Mutricy's avatar Christophe Mutricy

wxwidgets/* : Forwardport [15370]. button localisation

parent b5243c87
......@@ -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 );
wxButton *ok_button = new wxButton( this, wxID_OK, wxU(_("&OK") ) );
ok_button->SetDefault();
button_sizer->Add( ok_button );
button_sizer->Add( new wxButton( this, wxID_CANCEL ) );
button_sizer->Add( new wxButton( this, wxID_CANCEL, wxU(_("&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, wxID_ADD );
new wxButton( panel, wxID_ADD, wxU(_("Add")) );
wxButton *button_del =
new wxButton( panel, wxID_DELETE );
new wxButton( panel, wxID_DELETE, wxU(_("&Delete")) );
wxButton *button_clear =
new wxButton( panel, wxID_CLEAR );
new wxButton( panel, wxID_CLEAR, wxU(_("&Clear")) );
wxButton *button_edit =
new wxButton( panel, ButtonEdit_Event, wxU(_("Edit")) );
wxButton *button_extract =
......
......@@ -168,16 +168,21 @@ void InteractionDialog::Render()
//-------------- Buttons ------------------
if( p_dialog->i_flags & DIALOG_OK_CANCEL )
{
wxButton *ok = new wxButton( buttons_panel, wxID_OK );
wxButton *cancel = new wxButton( buttons_panel, wxID_CANCEL );
wxButton *ok = new wxButton( buttons_panel,
wxID_OK, wxU( _("&OK") ) );
wxButton *cancel = new wxButton( buttons_panel,
wxID_CANCEL, wxU( _("&Cancel") ) );
buttons_sizer->AddButton( ok );
buttons_sizer->AddButton( cancel );
}
else if( p_dialog->i_flags & DIALOG_YES_NO_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 );
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") ) );
buttons_sizer->AddButton( yes );
buttons_sizer->AddButton( no );
buttons_sizer->AddButton( cancel );
......@@ -187,8 +192,10 @@ 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 );
wxButton *close = new wxButton( buttons_panel, wxID_CLOSE );
wxButton *clear = new wxButton( buttons_panel,
wxID_CLEAR, wxU( _("&Clear") ) );
wxButton *close = new wxButton( buttons_panel, wxID_CLOSE,
wxU( _("&Close") ) );
close->SetDefault();
buttons_sizer->Add( noshow, 0, wxEXPAND | wxRIGHT|
wxLEFT | wxALIGN_LEFT, 5 );
......
......@@ -75,9 +75,10 @@ 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 );
wxButton *ok_button = new wxButton( panel, wxID_OK, wxU(_("&OK")) );
ok_button->SetDefault();
wxButton *cancel_button = new wxButton( panel, wxID_CANCEL );
wxButton *cancel_button = new wxButton( panel, wxID_CANCEL,
wxU(_("&Cancel")) );
/* Place everything in sizers */
wxStdDialogButtonSizer *button_sizer = new wxStdDialogButtonSizer;
......
......@@ -28,12 +28,6 @@
*****************************************************************************/
/* IDs for the controls and the menu commands */
enum
{
Close_Event,
Clear_Event,
Save_Log_Event
};
BEGIN_EVENT_TABLE(Messages, wxFrame)
/* Button events */
......@@ -73,25 +67,25 @@ Messages::Messages( intf_thread_t *_p_intf, wxWindow *p_parent ):
warn_attr = new wxTextAttr( *wxBLUE );
dbg_attr = new wxTextAttr( *wxBLACK );
/* Create the Close button */
wxButton *close_button = new wxButton( messages_panel, wxID_CLOSE,
wxU(_("&Close")));
close_button->SetDefault();
/* Create the Clear button */
wxButton *clear_button = new wxButton( messages_panel, wxID_CLEAR,
wxU(_("Clear")));
/* 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();
wxButton *save_log_button = new wxButton( messages_panel, wxID_SAVEAS,
wxU(_("Save &As...")));
/* 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( 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( close_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 );
......
......@@ -317,10 +317,10 @@ AutoBuiltPanel::AutoBuiltPanel( wxWindow *parent, OpenDialog *dialog,
/* Create buttons */
wxButton *ok_button =
new wxButton( p_advanced_dialog, wxID_OK );
new wxButton( p_advanced_dialog, wxID_OK, wxU(_("&OK")) );
ok_button->SetDefault();
wxButton *cancel_button =
new wxButton( p_advanced_dialog, wxID_CANCEL );
new wxButton( p_advanced_dialog, wxID_CANCEL, wxU(_("&Cancel")) );
wxStdDialogButtonSizer *button_sizer = new wxStdDialogButtonSizer;
button_sizer->AddButton( ok_button );
button_sizer->AddButton( cancel_button );
......@@ -487,9 +487,10 @@ 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 );
wxButton *ok_button = new wxButton( panel, wxID_OK, wxU(_("&OK")) );
ok_button->SetDefault();
wxButton *cancel_button = new wxButton( panel, wxID_CANCEL );
wxButton *cancel_button = new wxButton( panel, wxID_CANCEL,
wxU(_("&Cancel")) );
/* Create notebook */
notebook = new wxNotebook( panel, Notebook_Event );
......
......@@ -202,12 +202,13 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf, wxWindow *p_parent)
#if 0
/* Create the buttons */
wxButton *ok_button = new wxButton( panel, wxID_OK );
wxButton *ok_button = new wxButton( panel, wxID_OK, wxU(_("OK")) );
ok_button->SetDefault();
#endif
wxButton *save_button = new wxButton( panel, wxID_SAVE );
wxButton *save_button = new wxButton( panel, wxID_SAVE, wxU(_("&Save")) );
save_button->SetDefault();
wxButton *cancel_button = new wxButton( panel, wxID_CANCEL );
wxButton *cancel_button = new wxButton( panel, wxID_CANCEL,
wxU(_("&Cancel")) );
wxButton *reset_button = new wxButton( panel, ResetAll_Event,
wxU(_("Reset All")) );
......
......@@ -192,9 +192,10 @@ 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 );
wxButton *ok_button = new wxButton( panel, wxID_OK, wxU(_("&OK")) );
ok_button->SetDefault();
wxButton *cancel_button = new wxButton( panel, wxID_CANCEL );
wxButton *cancel_button = new wxButton( panel, wxID_CANCEL,
wxU(_("&Cancel")) );
/* Place everything in sizers */
wxStdDialogButtonSizer *button_sizer = new wxStdDialogButtonSizer;
......
......@@ -239,9 +239,10 @@ 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 );
wxButton *ok_button = new wxButton( panel, wxID_OK, wxU(_("&OK")) );
ok_button->SetDefault();
wxButton *cancel_button = new wxButton( panel, wxID_CANCEL );
wxButton *cancel_button = new wxButton( panel, wxID_CANCEL,
wxU(_("&Cancel")) );
/* Place everything in sizers */
wxStdDialogButtonSizer *button_sizer = new wxStdDialogButtonSizer;
......
......@@ -33,16 +33,14 @@ enum
{
Notebook_Event,
Timer_Event,
Close_Event,
Load_Event,
Save_Event,
};
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()
......@@ -75,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, wxU(_("&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, wxU(_("&Save") ) ) );
panel_sizer->Add( button_sizer, 0 , wxEXPAND | wxALL, 5 );
panel_sizer->Layout();
......@@ -409,8 +407,8 @@ 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,
wxU( _( "&Clear" ) ) ),
0 , wxEXPAND | wxALL , 5 );
}
lower_sizer->Add( new wxButton( this, Create_Event,
......
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