]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/choice.cpp
refactoring in preparation for further changes: moved data in a private struct, let...
[wxWidgets.git] / src / motif / choice.cpp
index 87e7eb7880e926bf2a2f7430e8416644d0ed8b40..24857bdf41992705e98d6673276e36cadc5fc2b4 100644 (file)
@@ -441,8 +441,8 @@ void wxChoiceCallback (Widget w, XtPointer clientData, XtPointer WXUNUSED(ptr))
         {
             wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, item->GetId());
             event.SetEventObject(item);
-            event.m_commandInt = n;
-            event.m_commandString = item->GetStrings().Item(n)->GetData();
+            event.SetInt(n);
+            event.SetString( item->GetStrings().Item(n)->GetData() );
             if ( item->HasClientObjectData() )
                 event.SetClientObject( item->GetClientObject(n) );
             else if ( item->HasClientUntypedData() )
@@ -459,19 +459,22 @@ void wxChoice::ChangeFont(bool keepOriginalSize)
     // back again. TODO: a better way in Motif?
     if (m_font.Ok())
     {
+        Display* dpy = XtDisplay((Widget) m_mainWidget);
         int width, height, width1, height1;
         GetSize(& width, & height);
 
-        WXFontType fontType =
-            m_font.GetFontType(XtDisplay((Widget) m_mainWidget));
         WXString fontTag = wxFont::GetFontTag();
 
-        XtVaSetValues ((Widget) m_formWidget, fontTag, fontType, NULL);
-        XtVaSetValues ((Widget) m_buttonWidget, fontTag, fontType, NULL);
+        XtVaSetValues ((Widget) m_formWidget,
+                       fontTag, m_font.GetFontTypeC(dpy),
+                       NULL);
+        XtVaSetValues ((Widget) m_buttonWidget,
+                       fontTag, m_font.GetFontTypeC(dpy),
+                       NULL);
 
         for( size_t i = 0; i < m_noStrings; ++i )
             XtVaSetValues( (Widget)m_widgetArray[i],
-                           fontTag, fontType,
+                           fontTag, m_font.GetFontTypeC(dpy),
                            NULL );
 
         GetSize(& width1, & height1);