X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ee6dd41a508c2bf598c178696a43bb665e0d4c01..2028c33ab5a39a12bd410ac953731a56ad6377ba:/src/gtk1/control.cpp diff --git a/src/gtk1/control.cpp b/src/gtk1/control.cpp index 8917ed25db..4216708175 100644 --- a/src/gtk1/control.cpp +++ b/src/gtk1/control.cpp @@ -12,10 +12,14 @@ #if wxUSE_CONTROLS -#include "wx/log.h" #include "wx/control.h" + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/settings.h" +#endif + #include "wx/fontutil.h" -#include "wx/settings.h" #include "wx/gtk1/private.h" // ============================================================================ @@ -30,7 +34,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxControl, wxWindow) wxControl::wxControl() { - m_needParent = TRUE; + m_needParent = true; } bool wxControl::Create( wxWindow *parent, @@ -79,7 +83,7 @@ void wxControl::PostCreation(const wxSize& size) gtk_widget_ensure_style(m_widget); ApplyWidgetStyle(); - SetInitialBestSize(size); + SetInitialSize(size); } // ---------------------------------------------------------------------------- @@ -116,7 +120,7 @@ void wxControl::GTKSetLabelForFrame(GtkFrame *w, const wxString& label) const wxString labelGTK = GTKRemoveMnemonics(label); - gtk_frame_set_label(w, labelGTK.empty() ? (char *)NULL + gtk_frame_set_label(w, labelGTK.empty() ? (const char *)NULL : wxGTK_CONV(labelGTK)); } @@ -130,7 +134,7 @@ wxString wxControl::GTKRemoveMnemonics(const wxString& label) { wxChar ch = label[i]; - if ( ch == _T('&') ) + if ( ch == wxT('&') ) { if ( i == len - 1 ) { @@ -140,7 +144,7 @@ wxString wxControl::GTKRemoveMnemonics(const wxString& label) } ch = label[++i]; // skip '&' itself - if ( ch == _T('&') ) + if ( ch == wxT('&') ) { // special case: "&&" is not a mnemonic at all but just an // escaped "&" @@ -260,4 +264,3 @@ wxControl::GetDefaultAttributesFromGTKWidget(wxGtkWidgetNewFromAdj_t widget_new, } #endif // wxUSE_CONTROLS -