Commit 35eb344b authored by Morten Welinder's avatar Morten Welinder

Compilation: avoid some GValueArray uses.

parent a4c6e2b1
......@@ -15,6 +15,7 @@ Morten:
* Remove disabled corba plugin.
* Fix off-by-ones in sheet resize. [#690929]
* Start working on warnings from newer gcc.
* Avoid using some deprecated symbols.
--------------------------------------------------------------------------
Gnumeric 1.12.0
......
2013-01-01 Morten Welinder <terra@gnome.org>
* gnumeric-expr-entry.c (cb_icon_clicked): Avoid deprecated GValueArray.
2012-12-18 Morten Welinder <terra@gnome.org>
* Release 1.12.0
......
......@@ -261,7 +261,7 @@ cb_icon_clicked (GtkButton *icon,
GtkWidget *old_entry_parent;
GtkWidget *old_toplevel_child;
GParamSpec **container_props_pspec;
GValueArray *container_props;
GArray *container_props;
g_assert (GTK_IS_WINDOW (toplevel));
......@@ -301,7 +301,7 @@ cb_icon_clicked (GtkButton *icon,
if (container_props_pspec[0] != NULL) {
guint ui;
container_props = g_value_array_new (n);
container_props = g_array_sized_new (FALSE, TRUE, sizeof (GValue), n);
for (ui = 0; ui < n; ui++) {
GValue value = G_VALUE_INIT;
......@@ -310,13 +310,13 @@ cb_icon_clicked (GtkButton *icon,
gtk_container_child_get_property (GTK_CONTAINER (old_entry_parent), GTK_WIDGET (entry),
g_param_spec_get_name (container_props_pspec[ui]),
&value);
g_value_array_append (container_props, &value);
g_array_append_val (container_props, value);
}
}
g_object_set_data_full (G_OBJECT (entry), "container_props",
container_props,
(GDestroyNotify) g_value_array_free);
(GDestroyNotify) g_array_unref);
g_object_set_data_full (G_OBJECT (entry), "container_props_pspec",
container_props_pspec,
(GDestroyNotify) g_free);
......@@ -354,7 +354,7 @@ cb_icon_clicked (GtkButton *icon,
for (i = 0; container_props_pspec[i] != NULL; i++) {
gtk_container_child_set_property (GTK_CONTAINER (old_entry_parent), GTK_WIDGET (entry),
g_param_spec_get_name (container_props_pspec[i]),
g_value_array_get_nth (container_props, i));
&g_array_index (container_props, GValue, i));
}
gtk_window_resize (GTK_WINDOW (toplevel),
......
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