[gnumeric] Add G_VALUE_INITto dead-kittens.h



commit 83248eead4d8952a22d08845b8f1674fd3b7a038
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Wed Nov 30 14:52:10 2011 -0700

    Add G_VALUE_INITto dead-kittens.h
    
    2011-11-30  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* dead-kittens.h: add G_VALUE_INIT
    
    2011-11-30  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* gnumeric-expr-entry.c (cb_icon_clicked): use G_VALUE_INIT;
    
    2011-11-30  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* plugin-gda.c: add dead-kittens.h
    	(gnm_value_new_from_gda): use G_VALUE_INIT;
    
    2011-11-30  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* dialog-doc-metadata.c: add dead-kittens.h
    	(dialog_doc_metadata_set_gsf_prop_val): use G_VALUE_INIT;

 ChangeLog                         |    4 ++++
 plugins/gda/ChangeLog             |    5 +++++
 plugins/gda/plugin-gda.c          |    3 ++-
 src/dead-kittens.h                |    5 +++++
 src/dialogs/ChangeLog             |    6 ++++++
 src/dialogs/dialog-doc-metadata.c |    5 +++--
 src/widgets/ChangeLog             |    4 ++++
 src/widgets/gnumeric-expr-entry.c |    3 +--
 8 files changed, 30 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 1e2df5f..1b9fa86 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2011-11-30  Andreas J. Guelzow <aguelzow pyrshep ca>
 
+	* dead-kittens.h: add G_VALUE_INIT
+
+2011-11-30  Andreas J. Guelzow <aguelzow pyrshep ca>
+
 	* src/wbc-gtk.c (wbc_gtk_create_status_area): allocate space for spaces
 	surrounding "="
 	* src/workbook-view.c (wb_view_darken_foreground_attributes_cb): new
diff --git a/plugins/gda/ChangeLog b/plugins/gda/ChangeLog
index 3f5cbe8..054acf8 100644
--- a/plugins/gda/ChangeLog
+++ b/plugins/gda/ChangeLog
@@ -1,3 +1,8 @@
+2011-11-30  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* plugin-gda.c: add dead-kittens.h
+	(gnm_value_new_from_gda): use G_VALUE_INIT;
+
 2011-11-27  Morten Welinder <terra gnome org>
 
 	* Release 1.11.1
diff --git a/plugins/gda/plugin-gda.c b/plugins/gda/plugin-gda.c
index c65683c..a5ca753 100644
--- a/plugins/gda/plugin-gda.c
+++ b/plugins/gda/plugin-gda.c
@@ -34,6 +34,7 @@
 #include "gnm-i18n.h"
 #include <goffice/goffice.h>
 #include <gnm-plugin.h>
+#include <dead-kittens.h>
 
 GNM_PLUGIN_MODULE_HEADER;
 
@@ -122,7 +123,7 @@ gnm_value_new_from_gda (GValue const *gval,
 	}
 
 	if (g_value_type_transformable (G_VALUE_TYPE (gval), G_TYPE_STRING)) {
-		GValue str = { 0 };
+		GValue str = G_VALUE_INIT;
 		g_value_init (&str, G_TYPE_STRING);
 		if (g_value_transform (gval, &str))
 			return value_new_string (g_value_get_string (&str));
diff --git a/src/dead-kittens.h b/src/dead-kittens.h
index a4f6454..e06d692 100644
--- a/src/dead-kittens.h
+++ b/src/dead-kittens.h
@@ -30,4 +30,9 @@
   g_object_set ((_e_), "editing-canceled", (gboolean)(_b_), NULL)
 #endif
 
+/* A macro new in glib 2.30 */
+#ifndef G_VALUE_INIT
+#define G_VALUE_INIT { 0, { { 0 } } }
+#endif
+
 #endif
diff --git a/src/dialogs/ChangeLog b/src/dialogs/ChangeLog
index 205d209..bfce9c8 100644
--- a/src/dialogs/ChangeLog
+++ b/src/dialogs/ChangeLog
@@ -1,4 +1,10 @@
+2011-11-30  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* dialog-doc-metadata.c: add dead-kittens.h
+	(dialog_doc_metadata_set_gsf_prop_val): use G_VALUE_INIT;
+
 2011-11-30  Jean Brefort  <jean brefort normalesup org>
+
 	* dialog-cell-format.c: GtkTable eradicated from this one.
 	* cell-format.ui: ditto.
 
diff --git a/src/dialogs/dialog-doc-metadata.c b/src/dialogs/dialog-doc-metadata.c
index bf6fd3d..1997c19 100644
--- a/src/dialogs/dialog-doc-metadata.c
+++ b/src/dialogs/dialog-doc-metadata.c
@@ -34,6 +34,7 @@
 #include <value.h>
 #include <commands.h>
 #include <number-match.h>
+#include <dead-kittens.h>
 
 #include <gsf/gsf-doc-meta-data.h>
 #include <gsf/gsf-meta-names.h>
@@ -814,7 +815,7 @@ dialog_doc_metadata_set_gsf_prop_val (DialogDocMetaData *state,
 				      GValue            *prop_value,
 				      const gchar       *str_val)
 {
-	GValue string_value = { 0 };
+	GValue string_value = G_VALUE_INIT;
 	g_value_init (&string_value, G_TYPE_STRING);
 
 	g_value_set_string (&string_value, g_strdup (str_val));
@@ -1596,7 +1597,7 @@ dialog_doc_metadata_get_prop_val (DialogDocMetaData *state,
 				  char const *prop_name,
 				  GValue     *prop_value)
 {
-	GValue str_value = { 0 };
+	GValue str_value = G_VALUE_INIT;
 	gboolean ret = FALSE;
 
 	g_return_val_if_fail (prop_value != NULL, NULL);
diff --git a/src/widgets/ChangeLog b/src/widgets/ChangeLog
index 1b41537..b292604 100644
--- a/src/widgets/ChangeLog
+++ b/src/widgets/ChangeLog
@@ -1,3 +1,7 @@
+2011-11-30  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* gnumeric-expr-entry.c (cb_icon_clicked): use G_VALUE_INIT;
+
 2011-11-28  Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* gnumeric-expr-entry.c (cb_icon_clicked): initialize GVALUE before
diff --git a/src/widgets/gnumeric-expr-entry.c b/src/widgets/gnumeric-expr-entry.c
index 1d22023..1675fa1 100644
--- a/src/widgets/gnumeric-expr-entry.c
+++ b/src/widgets/gnumeric-expr-entry.c
@@ -301,8 +301,7 @@ cb_icon_clicked (GtkButton *icon,
 				container_props = g_value_array_new (n);
 
 				for (ui = 0; ui < n; ui++) {
-					/* In glib 2.30 we could be using G_VALUE_INIT */
-					GValue value = { 0, { { 0 } } };
+					GValue value = G_VALUE_INIT;
 					g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (container_props_pspec[ui]));
 
 					gtk_container_child_get_property (GTK_CONTAINER (old_entry_parent), GTK_WIDGET (entry),



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