[epiphany] EphyTopicsPalette: Use g_object_class_install_properties.
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] EphyTopicsPalette: Use g_object_class_install_properties.
- Date: Wed, 16 Dec 2015 13:08:29 +0000 (UTC)
commit e4ebb84e9b4467a8886898f96fd93cb0db261942
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Sat Dec 12 13:53:59 2015 +0100
EphyTopicsPalette: Use g_object_class_install_properties.
https://bugzilla.gnome.org/show_bug.cgi?id=759401
src/bookmarks/ephy-topics-palette.c | 54 ++++++++++++++++------------------
1 files changed, 25 insertions(+), 29 deletions(-)
---
diff --git a/src/bookmarks/ephy-topics-palette.c b/src/bookmarks/ephy-topics-palette.c
index 57df0f3..7ea88f2 100644
--- a/src/bookmarks/ephy-topics-palette.c
+++ b/src/bookmarks/ephy-topics-palette.c
@@ -45,9 +45,12 @@ enum
PROP_0,
PROP_BOOKMARKS,
PROP_BOOKMARK,
- PROP_MODE
+ PROP_MODE,
+ LAST_PROP
};
+static GParamSpec *obj_properties[LAST_PROP];
+
enum
{
MODE_GROUPED,
@@ -327,32 +330,25 @@ ephy_topics_palette_class_init (EphyTopicsPaletteClass *klass)
object_class->set_property = ephy_topics_palette_set_property;
object_class->constructor = ephy_topics_palette_constructor;
- 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));
-
- g_object_class_install_property (object_class,
- PROP_MODE,
- g_param_spec_int ("mode",
- "Mode",
- "Mode",
- 0, MODES-1, 0,
- G_PARAM_WRITABLE |
- 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);
+
+ obj_properties[PROP_MODE] =
+ g_param_spec_int ("mode",
+ "Mode",
+ "Mode",
+ 0, MODES-1, 0,
+ G_PARAM_WRITABLE | 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]