]> git.0d.be Git - empathy.git/commitdiff
Use a temporary variable for param specs
authorWill Thompson <will.thompson@collabora.co.uk>
Fri, 26 Mar 2010 19:43:03 +0000 (19:43 +0000)
committerWill Thompson <will.thompson@collabora.co.uk>
Tue, 30 Mar 2010 10:30:18 +0000 (11:30 +0100)
libempathy-gtk/empathy-cell-renderer-text.c

index e3dd27d30cc861a1aececc434253792036e5b0a4..29c6bde92e716b578b89fb56eeac4bdb05744f63 100644 (file)
@@ -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));
 }