[gnumeric] Compilation: avoid some GValueArray uses.



commit 35eb344b708879957f7ec530795f3fa259a60b67
Author: Morten Welinder <terra gnome org>
Date:   Tue Jan 1 20:19:35 2013 -0500

    Compilation: avoid some GValueArray uses.

 NEWS                              |    1 +
 src/widgets/ChangeLog             |    4 ++++
 src/widgets/gnumeric-expr-entry.c |   10 +++++-----
 3 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/NEWS b/NEWS
index 3bc6448..a78a8ab 100644
--- a/NEWS
+++ b/NEWS
@@ -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
diff --git a/src/widgets/ChangeLog b/src/widgets/ChangeLog
index acade8c..9e4e0df 100644
--- a/src/widgets/ChangeLog
+++ b/src/widgets/ChangeLog
@@ -1,3 +1,7 @@
+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
diff --git a/src/widgets/gnumeric-expr-entry.c b/src/widgets/gnumeric-expr-entry.c
index ad8bedc..2bf8bd0 100644
--- a/src/widgets/gnumeric-expr-entry.c
+++ b/src/widgets/gnumeric-expr-entry.c
@@ -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),



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]