X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/953704c1c76cfb9cfb7b91f0e81f98c30d27eb56..b9b3ccd9ea9bf892369a6fa2c8e28e0ceca18527:/src/gtk1/choice.cpp diff --git a/src/gtk1/choice.cpp b/src/gtk1/choice.cpp index f8801312bd..c78d0a2e8f 100644 --- a/src/gtk1/choice.cpp +++ b/src/gtk1/choice.cpp @@ -38,7 +38,8 @@ extern bool g_blockEventsOnDrag; static void gtk_choice_clicked_callback( GtkWidget *WXUNUSED(widget), wxChoice *choice ) { - if (g_isIdle) wxapp_install_idle_handler(); + if (g_isIdle) + wxapp_install_idle_handler(); if (!choice->m_hasVMT) return; @@ -71,11 +72,12 @@ bool wxChoice::Create( wxWindow *parent, wxWindowID id, m_acceptsFocus = TRUE; #endif - PreCreation( parent, id, pos, size, style, name ); - -#if wxUSE_VALIDATORS - SetValidator( validator ); -#endif + if (!PreCreation( parent, pos, size ) || + !CreateBase( parent, id, pos, size, style, validator, name )) + { + wxFAIL_MSG( _T("wxChoice creation failed") ); + return FALSE; + } m_widget = gtk_option_menu_new(); @@ -285,8 +287,6 @@ int wxChoice::GetSelection() count++; } - wxFAIL_MSG( _T("wxChoice: no selection") ); - return -1; }