X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/43a18898651f71010606d8682fdf88cfc1c02193..227e5e99cd140e628d431dc006d30447ed6ad81a:/src/gtk/bmpbuttn.cpp diff --git a/src/gtk/bmpbuttn.cpp b/src/gtk/bmpbuttn.cpp index bf155fb4fc..c6d4499cef 100644 --- a/src/gtk/bmpbuttn.cpp +++ b/src/gtk/bmpbuttn.cpp @@ -13,6 +13,9 @@ #include "wx/bmpbuttn.h" +#include "gdk/gdk.h" +#include "gtk/gtk.h" + //----------------------------------------------------------------------------- // classes //----------------------------------------------------------------------------- @@ -102,6 +105,7 @@ bool wxBitmapButton::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bi long style, const wxValidator& validator, const wxString &name ) { m_needParent = TRUE; + m_acceptsFocus = TRUE; wxSize newSize = size; @@ -159,22 +163,22 @@ bool wxBitmapButton::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bi void wxBitmapButton::SetDefault() { -/* GTK_WIDGET_SET_FLAGS( m_widget, GTK_CAN_DEFAULT ); gtk_widget_grab_default( m_widget ); -*/ + + SetSize( m_x, m_y, m_width, m_height ); } void wxBitmapButton::SetLabel( const wxString &label ) { - wxCHECK_RET( m_widget != NULL, "invalid button" ); + wxCHECK_RET( m_widget != NULL, _T("invalid button") ); wxControl::SetLabel( label ); } wxString wxBitmapButton::GetLabel() const { - wxCHECK_MSG( m_widget != NULL, "", "invalid button" ); + wxCHECK_MSG( m_widget != NULL, _T(""), _T("invalid button") ); return wxControl::GetLabel(); } @@ -185,7 +189,7 @@ void wxBitmapButton::ApplyWidgetStyle() void wxBitmapButton::SetBitmap() { - wxCHECK_RET( m_widget != NULL, "invalid button" ); + wxCHECK_RET( m_widget != NULL, _T("invalid button") ); wxBitmap the_one; @@ -220,7 +224,7 @@ void wxBitmapButton::SetBitmap() void wxBitmapButton::SetBitmapDisabled( const wxBitmap& bitmap ) { - wxCHECK_RET( m_widget != NULL, "invalid button" ); + wxCHECK_RET( m_widget != NULL, _T("invalid button") ); if ( ! m_disabled.Ok() ) return; m_disabled = bitmap; @@ -230,7 +234,7 @@ void wxBitmapButton::SetBitmapDisabled( const wxBitmap& bitmap ) void wxBitmapButton::SetBitmapFocus( const wxBitmap& bitmap ) { - wxCHECK_RET( m_widget != NULL, "invalid button" ); + wxCHECK_RET( m_widget != NULL, _T("invalid button") ); if ( ! m_focus.Ok() ) return; m_focus = bitmap; @@ -240,7 +244,7 @@ void wxBitmapButton::SetBitmapFocus( const wxBitmap& bitmap ) void wxBitmapButton::SetBitmapLabel( const wxBitmap& bitmap ) { - wxCHECK_RET( m_widget != NULL, "invalid button" ); + wxCHECK_RET( m_widget != NULL, _T("invalid button") ); if (!m_bitmap.Ok()) return; m_bitmap = bitmap; @@ -250,7 +254,7 @@ void wxBitmapButton::SetBitmapLabel( const wxBitmap& bitmap ) void wxBitmapButton::SetBitmapSelected( const wxBitmap& bitmap ) { - wxCHECK_RET( m_widget != NULL, "invalid button" ); + wxCHECK_RET( m_widget != NULL, _T("invalid button") ); if ( ! m_selected.Ok() ) return; m_selected = bitmap;