use G_VALUE_INIT

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75163 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2013-11-10 18:13:27 +00:00
parent fa36f48a36
commit 162f04d775
5 changed files with 43 additions and 37 deletions

View File

@@ -208,7 +208,7 @@ int wxChoice::FindString( const wxString &item, bool bCase ) const
int count = 0;
do
{
GValue value = { 0, };
GValue value = G_VALUE_INIT;
gtk_tree_model_get_value( model, &iter, m_stringCellIndex, &value );
wxString str = wxGTK_CONV_BACK( g_value_get_string( &value ) );
g_value_unset( &value );
@@ -239,7 +239,7 @@ void wxChoice::SetString(unsigned int n, const wxString &text)
GtkTreeIter iter;
if (gtk_tree_model_iter_nth_child (model, &iter, NULL, n))
{
GValue value = { 0, };
GValue value = G_VALUE_INIT;
g_value_init( &value, G_TYPE_STRING );
g_value_set_string( &value, wxGTK_CONV( text ) );
gtk_list_store_set_value( GTK_LIST_STORE(model), &iter, m_stringCellIndex, &value );
@@ -260,7 +260,7 @@ wxString wxChoice::GetString(unsigned int n) const
GtkTreeIter iter;
if (gtk_tree_model_iter_nth_child (model, &iter, NULL, n))
{
GValue value = { 0, };
GValue value = G_VALUE_INIT;
gtk_tree_model_get_value( model, &iter, m_stringCellIndex, &value );
wxString tmp = wxGTK_CONV_BACK( g_value_get_string( &value ) );
g_value_unset( &value );