Commit ace0321f authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

libgimpwidgets/gimpstringcombobox.c (gimp_string_model_lookup) fixed wrong

2007-02-12  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpstringcombobox.c (gimp_string_model_lookup)
	* modules/gimpinputdevicestore.c (gimp_input_device_store_lookup):
	fixed wrong use of GValue.


svn path=/trunk/; revision=21901
parent 0a203e30
2007-02-12 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpstringcombobox.c (gimp_string_model_lookup)
* modules/gimpinputdevicestore.c (gimp_input_device_store_lookup):
fixed wrong use of GValue.
2007-02-12 Sven Neumann <sven@gimp.org>
* libgimpwidgets/Makefile.am
......@@ -250,8 +250,6 @@ gimp_string_model_lookup (GtkTreeModel *model,
* is a GtkComboBox, there shouldn't be many entries anyway...
*/
g_value_init (&value, G_TYPE_STRING);
for (iter_valid = gtk_tree_model_get_iter_first (model, iter);
iter_valid;
iter_valid = gtk_tree_model_iter_next (model, iter))
......@@ -263,13 +261,14 @@ gimp_string_model_lookup (GtkTreeModel *model,
str = g_value_get_string (&value);
if (str && strcmp (str, id) == 0)
break;
{
g_value_unset (&value);
break;
}
g_value_reset (&value);
g_value_unset (&value);
}
g_value_unset (&value);
return iter_valid;
}
......
......@@ -151,8 +151,6 @@ gimp_input_device_store_lookup (GimpInputDeviceStore *store,
GValue value = { 0, };
gboolean iter_valid;
g_value_init (&value, G_TYPE_STRING);
for (iter_valid = gtk_tree_model_get_iter_first (model, iter);
iter_valid;
iter_valid = gtk_tree_model_iter_next (model, iter))
......@@ -164,13 +162,14 @@ gimp_input_device_store_lookup (GimpInputDeviceStore *store,
str = g_value_get_string (&value);
if (strcmp (str, udi) == 0)
break;
{
g_value_unset (&value);
break;
}
g_value_reset (&value);
g_value_unset (&value);
}
g_value_unset (&value);
return iter_valid;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment