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 );
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 =
......
......@@ -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 );
......
......@@ -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 );
......
......@@ -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 */
......
......@@ -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 );
......
......@@ -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")) );
......
......@@ -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 );
......
......@@ -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 );
......
......@@ -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,
......
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