aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2010-03-27 03:43:03 +0800
committerWill Thompson <will.thompson@collabora.co.uk>2010-03-30 18:30:18 +0800
commite0535b86ebb7a0d5908597ecb82a7754c31a6076 (patch)
tree61f86a2d329cd2a0061bf77e75d62cdb0847f7a5
parentc821e81c68acc1daba78899c9c844f916ea2c99e (diff)
downloadgsoc2013-empathy-e0535b86ebb7a0d5908597ecb82a7754c31a6076.tar
gsoc2013-empathy-e0535b86ebb7a0d5908597ecb82a7754c31a6076.tar.gz
gsoc2013-empathy-e0535b86ebb7a0d5908597ecb82a7754c31a6076.tar.bz2
gsoc2013-empathy-e0535b86ebb7a0d5908597ecb82a7754c31a6076.tar.lz
gsoc2013-empathy-e0535b86ebb7a0d5908597ecb82a7754c31a6076.tar.xz
gsoc2013-empathy-e0535b86ebb7a0d5908597ecb82a7754c31a6076.tar.zst
gsoc2013-empathy-e0535b86ebb7a0d5908597ecb82a7754c31a6076.zip
Use a temporary variable for param specs
-rw-r--r--libempathy-gtk/empathy-cell-renderer-text.c45
1 files changed, 17 insertions, 28 deletions
diff --git a/libempathy-gtk/empathy-cell-renderer-text.c b/libempathy-gtk/empathy-cell-renderer-text.c
index e3dd27d30..29c6bde92 100644
--- a/libempathy-gtk/empathy-cell-renderer-text.c
+++ b/libempathy-gtk/empathy-cell-renderer-text.c
@@ -1,6 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright (C) 2004-2007 Imendio AB
+ * Copyright (C) 2010 Collabora Ltd
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -82,6 +83,7 @@ empathy_cell_renderer_text_class_init (EmpathyCellRendererTextClass *klass)
{
GObjectClass *object_class;
GtkCellRendererClass *cell_class;
+ GParamSpec *spec;
object_class = G_OBJECT_CLASS (klass);
cell_class = GTK_CELL_RENDERER_CLASS (klass);
@@ -94,34 +96,21 @@ empathy_cell_renderer_text_class_init (EmpathyCellRendererTextClass *klass)
cell_class->get_size = cell_renderer_text_get_size;
cell_class->render = cell_renderer_text_render;
- g_object_class_install_property (object_class,
- PROP_NAME,
- g_param_spec_string ("name",
- "Name",
- "Contact name",
- NULL,
- G_PARAM_READWRITE));
- g_object_class_install_property (object_class,
- PROP_STATUS,
- g_param_spec_string ("status",
- "Status",
- "Contact status string",
- NULL,
- G_PARAM_READWRITE));
- g_object_class_install_property (object_class,
- PROP_IS_GROUP,
- g_param_spec_boolean ("is_group",
- "Is group",
- "Whether this cell is a group",
- FALSE,
- G_PARAM_READWRITE));
- g_object_class_install_property (object_class,
- PROP_SHOW_STATUS,
- g_param_spec_boolean ("show-status",
- "Show status",
- "Whether to show the status line",
- TRUE,
- G_PARAM_READWRITE));
+ spec = g_param_spec_string ("name", "Name", "Contact name", NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_NAME, spec);
+
+ spec = g_param_spec_string ("status", "Status",
+ "Contact status string", NULL, G_PARAM_READWRITE);
+ 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);
+ g_object_class_install_property (object_class, PROP_IS_GROUP, spec);
+
+ spec = g_param_spec_boolean ("show-status", "Show status",
+ "Whether to show the status line", TRUE, G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_SHOW_STATUS, spec);
g_type_class_add_private (object_class, sizeof (EmpathyCellRendererTextPriv));
}