[empathy] CellRendererText: Use G_PARAM_STATIC_STRINGS



commit e7f70475f0533c310995a9dc3b2f5ee1eb58b618
Author: Will Thompson <will thompson collabora co uk>
Date:   Fri Mar 26 20:15:58 2010 +0000

    CellRendererText: Use G_PARAM_STATIC_STRINGS
    
    This patch also changes the name of the "is group" property to use a
    hyphen (which is the canonical form) rather than an underscore, because
    the combination of the underscore and G_PARAM_STATIC_STRINGS makes
    GObject blow up:
    
      GLib-GObject-CRITICAL **: g_param_spec_internal: assertion `!(flags &
      G_PARAM_STATIC_NAME) || is_canonical (name)' failed

 libempathy-gtk/empathy-cell-renderer-text.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/libempathy-gtk/empathy-cell-renderer-text.c b/libempathy-gtk/empathy-cell-renderer-text.c
index 200420f..6e7f027 100644
--- a/libempathy-gtk/empathy-cell-renderer-text.c
+++ b/libempathy-gtk/empathy-cell-renderer-text.c
@@ -99,29 +99,31 @@ empathy_cell_renderer_text_class_init (EmpathyCellRendererTextClass *klass)
 	cell_class->render = cell_renderer_text_render;
 
 	spec = g_param_spec_string ("name", "Name", "Contact name", NULL,
-		G_PARAM_READWRITE);
+		G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
 	g_object_class_install_property (object_class, PROP_NAME, spec);
 
 	spec = g_param_spec_uint ("presence-type", "TpConnectionPresenceType",
 		"The contact's presence type",
 		0, G_MAXUINT, /* Telepathy enum, can be extended */
 		TP_CONNECTION_PRESENCE_TYPE_UNKNOWN,
-		G_PARAM_READWRITE);
+		G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
 	g_object_class_install_property (object_class, PROP_PRESENCE_TYPE,
 		spec);
 
 	spec = g_param_spec_string ("status", "Status message",
-		"Contact's custom status message", NULL, G_PARAM_READWRITE);
+		"Contact's custom status message", NULL,
+		G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
 	g_object_class_install_property (object_class, PROP_STATUS, spec);
 
-	spec = g_param_spec_boolean ("is_group", "Is group",
-		"Whether this cell is a group", FALSE, G_PARAM_READWRITE);
+	spec = g_param_spec_boolean ("is-group", "Is group",
+		"Whether this cell is a group", FALSE,
+		G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
 	g_object_class_install_property (object_class, PROP_IS_GROUP, spec);
 
 	spec = g_param_spec_boolean ("compact", "Compact",
 		"TRUE to show the status alongside the contact name;"
 		"FALSE to show it on its own line",
-		FALSE, G_PARAM_READWRITE);
+		FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
 	g_object_class_install_property (object_class, PROP_COMPACT, spec);
 
 	g_type_class_add_private (object_class, sizeof (EmpathyCellRendererTextPriv));



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