X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9838df2cefc5b368bb11f98c784ecc78f45ecaf7..1d37e644007e676b82e75426daa1d5118bb76780:/src/motif/choice.cpp diff --git a/src/motif/choice.cpp b/src/motif/choice.cpp index b67015a958..cc98f181c3 100644 --- a/src/motif/choice.cpp +++ b/src/motif/choice.cpp @@ -66,7 +66,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id, m_backgroundColour = parent->GetBackgroundColour(); m_foregroundColour = parent->GetForegroundColour(); - m_windowFont = parent->GetFont(); + m_font = parent->GetFont(); Widget parentWidget = (Widget) parent->GetClientWidget(); @@ -119,10 +119,11 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id, // that I have found the code responsible for this behaviour. #if XmVersion >= 1002 #if XmVersion < 2000 - Widget optionLabel = XmOptionLabelGadget ((Widget) m_buttonWidget); // JACS, 24/1/99: this seems to cause a malloc crash later on, e.g. // in controls sample. - // XtUnmanageChild (optionLabel); + // + // Widget optionLabel = XmOptionLabelGadget ((Widget) m_buttonWidget); + // XtUnmanageChild (optionLabel); #endif #endif @@ -174,9 +175,9 @@ void wxChoice::Append(const wxString& item) DoChangeBackgroundColour((WXWidget) w, m_backgroundColour); - if (m_windowFont.Ok()) + if (m_font.Ok()) XtVaSetValues (w, - XmNfontList, (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay((Widget) m_formWidget)), + XmNfontList, (XmFontList) m_font.GetFontList(1.0, XtDisplay((Widget) m_formWidget)), NULL); WXWidget *new_widgetList = new WXWidget[m_noStrings + 1]; @@ -349,7 +350,7 @@ void wxChoice::SetFocus() XmProcessTraversal(XtParent((Widget)m_mainWidget), XmTRAVERSE_CURRENT); } -void wxChoice::SetSize(int x, int y, int width, int height, int sizeFlags) +void wxChoice::DoSetSize(int x, int y, int width, int height, int sizeFlags) { XtVaSetValues((Widget) m_formWidget, XmNresizePolicy, XmRESIZE_ANY, NULL); bool managed = XtIsManaged((Widget) m_formWidget); @@ -380,7 +381,7 @@ void wxChoice::SetSize(int x, int y, int width, int height, int sizeFlags) XtManageChild ((Widget) m_formWidget); XtVaSetValues((Widget) m_formWidget, XmNresizePolicy, XmRESIZE_NONE, NULL); - wxControl::SetSize (x, y, width, height, sizeFlags); + wxControl::DoSetSize (x, y, width, height, sizeFlags); } wxString wxChoice::GetStringSelection () const @@ -436,12 +437,12 @@ void wxChoice::ChangeFont(bool keepOriginalSize) // Note that this causes the widget to be resized back // to its original size! We therefore have to set the size // back again. TODO: a better way in Motif? - if (m_windowFont.Ok()) + if (m_font.Ok()) { int width, height, width1, height1; GetSize(& width, & height); - XmFontList fontList = (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay((Widget) m_mainWidget)); + XmFontList fontList = (XmFontList) m_font.GetFontList(1.0, XtDisplay((Widget) m_mainWidget)); XtVaSetValues ((Widget) m_mainWidget, XmNfontList, fontList, NULL); XtVaSetValues ((Widget) m_buttonWidget, XmNfontList, fontList, NULL);