]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/choice.cpp
1. added native wxMessageDialog implementation for GTK+2
[wxWidgets.git] / src / motif / choice.cpp
index bfe6a69b47c527efb9faffb9f023daa53a0f9496..fa5340e37849be815f4538bacb1bb3c1e5d2b08e 100644 (file)
@@ -176,10 +176,8 @@ int wxChoice::DoAppend(const wxString& item)
 
     DoChangeBackgroundColour((WXWidget) w, m_backgroundColour);
 
-    if (m_font.Ok())
-        XtVaSetValues (w,
-        XmNfontList, (XmFontList) m_font.GetFontList(1.0, XtDisplay((Widget) m_formWidget)),
-        NULL);
+    if( m_font.Ok() )
+        wxDoChangeFont( w, m_font );
 
     m_widgetArray.Add(w);
 
@@ -222,7 +220,7 @@ void wxChoice::Delete(int n)
 void wxChoice::Clear()
 {
     m_stringList.Clear ();
-    int i;
+    size_t i;
     for (i = 0; i < m_noStrings; i++)
     {
         XtRemoveCallback((Widget) m_widgetArray[i],
@@ -286,7 +284,7 @@ void wxChoice::SetSelection(int n)
 #if 0
         Dimension selectionWidth, selectionHeight;
 #endif
-        wxXmString text( (char*)node->Data() );
+        wxXmString text( node->GetData() );
 // MBN: this seems silly, at best, and causes wxChoices to be clipped:
 //      will remove "soon"
 #if 0
@@ -369,7 +367,7 @@ void wxChoice::DoSetSize(int x, int y, int width, int height, int sizeFlags)
 
     if (width > -1)
     {
-        int i;
+        size_t i;
         for (i = 0; i < m_noStrings; i++)
             XtVaSetValues ((Widget) m_widgetArray[i],
                            XmNwidth, actualWidth,
@@ -379,7 +377,7 @@ void wxChoice::DoSetSize(int x, int y, int width, int height, int sizeFlags)
     }
     if (height > -1)
     {
-        int i;
+        size_t i;
         for (i = 0; i < m_noStrings; i++)
             XtVaSetValues ((Widget) m_widgetArray[i],
                            XmNheight, actualHeight,
@@ -457,7 +455,7 @@ void wxChoice::ChangeBackgroundColour()
     DoChangeBackgroundColour(m_formWidget, m_backgroundColour);
     DoChangeBackgroundColour(m_buttonWidget, m_backgroundColour);
     DoChangeBackgroundColour(m_menuWidget, m_backgroundColour);
-    int i;
+    size_t i;
     for (i = 0; i < m_noStrings; i++)
         DoChangeBackgroundColour(m_widgetArray[i], m_backgroundColour);
 }
@@ -467,7 +465,7 @@ void wxChoice::ChangeForegroundColour()
     DoChangeForegroundColour(m_formWidget, m_foregroundColour);
     DoChangeForegroundColour(m_buttonWidget, m_foregroundColour);
     DoChangeForegroundColour(m_menuWidget, m_foregroundColour);
-    int i;
+    size_t i;
     for (i = 0; i < m_noStrings; i++)
         DoChangeForegroundColour(m_widgetArray[i], m_foregroundColour);
 }