]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/combobox_native.cpp
Compilation fix for STL build after the last commit.
[wxWidgets.git] / src / motif / combobox_native.cpp
index 1cadd49e94406592525454cb6551d64bf9679189..9fbb5241a209021156ba7b5260d695cf70c5d016 100644 (file)
@@ -203,7 +203,7 @@ int wxComboBox::DoInsertItems(const wxArrayStringsAdapter & items,
         wxXmString str( items[i].c_str() );
         XmComboBoxAddItem((Widget) m_mainWidget, str(),
                           GetMotifPosition(pos), False);
-        m_noStrings ++;
+
         InsertNewItemClientData(pos, clientData, i, type);
     }
 
@@ -221,7 +221,7 @@ void wxComboBox::DoDeleteOneItem(unsigned int n)
 #endif
 
     wxControlWithItems::DoDeleteOneItem(n);
-    m_noStrings--;
+    m_stringArray.RemoveAt(size_t(n));
 
     AdjustDropDownListSize();
 }
@@ -231,13 +231,14 @@ void wxComboBox::Clear()
 #ifdef LESSTIF_VERSION
     XmListDeleteAllItems (GetXmList(this));
 #else
-    while(m_noStrings > 0)
+    size_t n = m_stringArray.GetCount();
+    while(n > 0)
     {
-        XmComboBoxDeletePos((Widget) m_mainWidget, m_noStrings--);
+        XmComboBoxDeletePos((Widget) m_mainWidget, n--);
     }
 #endif
 
-    m_noStrings = 0;
+    m_stringArray.Clear();
     AdjustDropDownListSize();
 
     wxTextEntry::Clear();
@@ -306,7 +307,7 @@ void  wxComboBoxCallback (Widget WXUNUSED(w), XtPointer clientData,
                 event.SetClientData( item->GetClientData(idx) );
             event.SetExtraLong(true);
             event.SetEventObject(item);
-            item->GetEventHandler()->ProcessEvent(event);
+            item->HandleWindowEvent(event);
             break;
         }
     case XmCR_VALUE_CHANGED:
@@ -316,7 +317,7 @@ void  wxComboBoxCallback (Widget WXUNUSED(w), XtPointer clientData,
             event.SetString( item->GetValue() );
             event.SetExtraLong(true);
             event.SetEventObject(item);
-            item->GetEventHandler()->ProcessEvent(event);
+            item->HandleWindowEvent(event);
             break;
         }
     default:
@@ -326,7 +327,7 @@ void  wxComboBoxCallback (Widget WXUNUSED(w), XtPointer clientData,
 
 void wxComboBox::ChangeFont(bool keepOriginalSize)
 {
-    if( m_font.Ok() && m_mainWidget != NULL )
+    if( m_font.IsOk() && m_mainWidget != NULL )
     {
         wxDoChangeFont( GetXmText(this), m_font );
         wxDoChangeFont( GetXmList(this), m_font );