[epiphany] EphyTopicsEntry: Use g_object_class_install_properties.



commit 75e952f128617da9c8974f28dd88950a2650a365
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Sat Dec 12 14:33:46 2015 +0100

    EphyTopicsEntry: Use g_object_class_install_properties.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=759401

 src/bookmarks/ephy-topics-entry.c |   37 ++++++++++++++++++-------------------
 1 files changed, 18 insertions(+), 19 deletions(-)
---
diff --git a/src/bookmarks/ephy-topics-entry.c b/src/bookmarks/ephy-topics-entry.c
index c2d68ec..3722976 100644
--- a/src/bookmarks/ephy-topics-entry.c
+++ b/src/bookmarks/ephy-topics-entry.c
@@ -45,9 +45,12 @@ enum
 {
        PROP_0,
        PROP_BOOKMARKS,
-       PROP_BOOKMARK
+       PROP_BOOKMARK,
+       LAST_PROP
 };
 
+static GParamSpec *obj_properties[LAST_PROP];
+
 enum
 {
        COLUMN_NODE,
@@ -606,22 +609,18 @@ ephy_topics_entry_class_init (EphyTopicsEntryClass *klass)
        object_class->constructor = ephy_topics_entry_constructor;
        object_class->finalize = ephy_topics_entry_finalize;
 
-       g_object_class_install_property (object_class,
-                                        PROP_BOOKMARKS,
-                                        g_param_spec_object ("bookmarks",
-                                                             "Bookmarks set",
-                                                             "Bookmarks set",
-                                                             EPHY_TYPE_BOOKMARKS,
-                                                             G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY |
-                                                             G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | 
-                                                             G_PARAM_STATIC_BLURB));
-
-       g_object_class_install_property (object_class,
-                                        PROP_BOOKMARK,
-                                        g_param_spec_pointer ("bookmark",
-                                                              "Bookmark",
-                                                              "Bookmark",
-                                                              G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY |
-                                                              G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | 
-                                                              G_PARAM_STATIC_BLURB));
+       obj_properties[PROP_BOOKMARKS] =
+               g_param_spec_object ("bookmarks",
+                                    "Bookmarks set",
+                                    "Bookmarks set",
+                                    EPHY_TYPE_BOOKMARKS,
+                                    G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
+
+       obj_properties[PROP_BOOKMARK] =
+               g_param_spec_pointer ("bookmark",
+                                     "Bookmark",
+                                     "Bookmark",
+                                     G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
+
+       g_object_class_install_properties (object_class, LAST_PROP, obj_properties);
 }


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