X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/937013e0fd914d4c42f9f5ec98da665986b93dfa..eea4d01c65f9b29baa1193db762b4c6b8144af24:/src/gtk1/choice.cpp diff --git a/src/gtk1/choice.cpp b/src/gtk1/choice.cpp index 836a62ec62..1a17d2d027 100644 --- a/src/gtk1/choice.cpp +++ b/src/gtk1/choice.cpp @@ -86,11 +86,9 @@ static void gtk_choice_clicked_callback( GtkWidget *WXUNUSED(widget), wxChoice * // wxChoice //----------------------------------------------------------------------------- -IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControlWithItems) - wxChoice::wxChoice() { - m_strings = (wxSortedArrayString *)NULL; + m_strings = NULL; } bool wxChoice::Create( wxWindow *parent, wxWindowID id, @@ -228,7 +226,7 @@ void wxChoice::DoDeleteOneItem(unsigned int n) { wxCHECK_RET( m_widget != NULL, wxT("invalid choice") ); - wxCHECK_RET( IsValid(n), _T("invalid index in wxChoice::Delete") ); + wxCHECK_RET( IsValid(n), wxT("invalid index in wxChoice::Delete") ); // if the item to delete is before the selection, and the selection is valid if (((int)n < m_selection_hack) && (m_selection_hack != wxNOT_FOUND)) @@ -264,7 +262,7 @@ void wxChoice::DoDeleteOneItem(unsigned int n) void ** const data = &itemsData[0]; if ( HasClientObjectData() ) - Append(items, wx_reinterpret_cast(wxClientData **, data)); + Append(items, reinterpret_cast(data)); else Append(items, data); } @@ -282,7 +280,7 @@ int wxChoice::FindString( const wxString &string, bool bCase ) const while (child) { GtkBin *bin = GTK_BIN( child->data ); - GtkLabel *label = (GtkLabel *) NULL; + GtkLabel *label = NULL; if (bin->child) label = GTK_LABEL(bin->child); if (!label) @@ -322,7 +320,7 @@ void wxChoice::SetString(unsigned int n, const wxString& str ) GtkBin *bin = GTK_BIN( child->data ); if (count == n) { - GtkLabel *label = (GtkLabel *) NULL; + GtkLabel *label = NULL; if (bin->child) label = GTK_LABEL(bin->child); if (!label) @@ -351,7 +349,7 @@ wxString wxChoice::GetString(unsigned int n) const GtkBin *bin = GTK_BIN( child->data ); if (count == n) { - GtkLabel *label = (GtkLabel *) NULL; + GtkLabel *label = NULL; if (bin->child) label = GTK_LABEL(bin->child); if (!label) @@ -424,7 +422,7 @@ void wxChoice::DoApplyWidgetStyle(GtkRcStyle *style) gtk_widget_modify_style( GTK_WIDGET( child->data ), style ); GtkBin *bin = GTK_BIN( child->data ); - GtkWidget *label = (GtkWidget *) NULL; + GtkWidget *label = NULL; if (bin->child) label = bin->child; if (!label) @@ -453,11 +451,11 @@ int wxChoice::GtkAddHelper(GtkWidget *menu, unsigned int pos, const wxString& it if ( index ) { m_clientList.Insert( m_clientList.Item(index - 1), - (wxObject*) NULL ); + NULL ); } else { - m_clientList.Insert( (wxObject*) NULL ); + m_clientList.Insert( NULL ); } } else @@ -469,13 +467,13 @@ int wxChoice::GtkAddHelper(GtkWidget *menu, unsigned int pos, const wxString& it if (pos == m_clientList.GetCount()) { gtk_menu_append( GTK_MENU(menu), menu_item ); - m_clientList.Append( (wxObject*) NULL ); + m_clientList.Append( NULL ); index = m_clientList.GetCount() - 1; } else { gtk_menu_insert( GTK_MENU(menu), menu_item, pos ); - m_clientList.Insert( pos, (wxObject*) NULL ); + m_clientList.Insert( pos, NULL ); index = pos; } }