Commit 666a3ebf authored by Christophe Mutricy's avatar Christophe Mutricy

wx/dialogs/*: Don't put labels in buttons if we have a wxID_FOO. So the...

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