Commit 89111645 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

no need to create a new list store; gimp_int_combo_box_init() already did

2005-06-23  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpintcombobox.c (gimp_int_combo_box_new_valist)
	(gimp_int_combo_box_new_array): no need to create a new list store;
	gimp_int_combo_box_init() already did that for us.
parent a0329dd1
2005-06-23 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpintcombobox.c (gimp_int_combo_box_new_valist)
(gimp_int_combo_box_new_array): no need to create a new list store;
gimp_int_combo_box_init() already did that for us.
2005-06-23 Sven Neumann <sven@gimp.org>
* plug-ins/common/grid.c: draw the intersection on top of the grid.
......
......@@ -273,12 +273,9 @@ gimp_int_combo_box_new_valist (const gchar *first_label,
const gchar *label;
gint value;
store = gimp_int_store_new ();
combo_box = g_object_new (GIMP_TYPE_INT_COMBO_BOX, NULL);
combo_box = g_object_new (GIMP_TYPE_INT_COMBO_BOX,
"model", store,
NULL);
g_object_unref (store);
store = GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (combo_box)));
for (label = first_label, value = first_value;
label;
......@@ -316,15 +313,12 @@ gimp_int_combo_box_new_array (gint n_values,
GtkListStore *store;
gint i;
g_return_val_if_fail (n_values > 0, NULL);
g_return_val_if_fail (labels != NULL, NULL);
g_return_val_if_fail (n_values >= 0, NULL);
g_return_val_if_fail (labels != NULL || n_values == 0, NULL);
store = gimp_int_store_new ();
combo_box = g_object_new (GIMP_TYPE_INT_COMBO_BOX, NULL);
combo_box = g_object_new (GIMP_TYPE_INT_COMBO_BOX,
"model", store,
NULL);
g_object_unref (store);
store = GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (combo_box)));
for (i = 0; i < n_values; i++)
{
......
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