]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/textentry.cpp
implement new wxBG_STYLE_XXX semantics for wxMSW too
[wxWidgets.git] / src / gtk / textentry.cpp
index 99d0f129435aaf986dec8f978960c85a1d72207d..20abc5559b2b741c34d020673d316c20608a8b14 100644 (file)
@@ -103,11 +103,12 @@ void wxTextEntry::WriteText(const wxString& value)
     gtk_editable_set_position(edit, len);
 }
 
-wxString wxTextEntry::GetValue() const
+wxString wxTextEntry::DoGetValue() const
 {
     const wxGtkString value(gtk_editable_get_chars(GetEditable(), 0, -1));
 
-    return wxGTK_CONV_BACK_FONT(value, GetEditableWindow()->GetFont());
+    return wxGTK_CONV_BACK_FONT(value,
+            const_cast<wxTextEntry *>(this)->GetEditableWindow()->GetFont());
 }
 
 void wxTextEntry::Remove(long from, long to)
@@ -318,7 +319,7 @@ void wxTextEntry::SendMaxLenEvent()
     // generating a dummy wxEVT_COMMAND_TEXT_UPDATED event
     //IgnoreNextTextUpdate();
 
-    wxWindow * const win = const_cast<wxWindow *>(GetEditableWindow());
+    wxWindow * const win = GetEditableWindow();
     wxCommandEvent event(wxEVT_COMMAND_TEXT_MAXLEN, win->GetId());
     event.SetEventObject(win);
     event.SetString(GetValue());