[epiphany] EphyBookmarkProperties: Use g_object_class_install_properties.
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] EphyBookmarkProperties: Use g_object_class_install_properties.
- Date: Wed, 16 Dec 2015 13:08:59 +0000 (UTC)
commit 079e04cd17432f8e255da572f250fa0b6d08b556
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Sat Dec 12 17:22:48 2015 +0100
EphyBookmarkProperties: Use g_object_class_install_properties.
https://bugzilla.gnome.org/show_bug.cgi?id=759401
src/bookmarks/ephy-bookmark-properties.c | 48 +++++++++++++++--------------
1 files changed, 25 insertions(+), 23 deletions(-)
---
diff --git a/src/bookmarks/ephy-bookmark-properties.c b/src/bookmarks/ephy-bookmark-properties.c
index 297d931..901c997 100644
--- a/src/bookmarks/ephy-bookmark-properties.c
+++ b/src/bookmarks/ephy-bookmark-properties.c
@@ -71,9 +71,12 @@ enum
PROP_0,
PROP_BOOKMARKS,
PROP_BOOKMARK,
- PROP_CREATING
+ PROP_CREATING,
+ LAST_PROP
};
+static GParamSpec *obj_properties[LAST_PROP];
+
G_DEFINE_TYPE (EphyBookmarkProperties, ephy_bookmark_properties, GTK_TYPE_DIALOG)
static gboolean
@@ -464,28 +467,27 @@ ephy_bookmark_properties_class_init (EphyBookmarkPropertiesClass *klass)
object_class->set_property = ephy_bookmark_properties_set_property;
object_class->get_property = ephy_bookmark_properties_get_property;
- g_object_class_install_property (object_class,
- PROP_BOOKMARKS,
- g_param_spec_object ("bookmarks",
- "bookmarks",
- "bookmarks",
- EPHY_TYPE_BOOKMARKS,
- G_PARAM_READWRITE | G_PARAM_STATIC_NAME |
G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_CONSTRUCT_ONLY));
-
- g_object_class_install_property (object_class,
- PROP_BOOKMARK,
- g_param_spec_pointer ("bookmark",
- "bookmark",
- "bookmark",
- G_PARAM_READWRITE | G_PARAM_STATIC_NAME |
G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_CONSTRUCT));
-
- g_object_class_install_property (object_class,
- PROP_CREATING,
- g_param_spec_boolean ("creating",
- "creating",
- "creating",
- FALSE,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+ obj_properties[PROP_BOOKMARKS] =
+ g_param_spec_object ("bookmarks",
+ "bookmarks",
+ "bookmarks",
+ EPHY_TYPE_BOOKMARKS,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY);
+
+ obj_properties[PROP_BOOKMARK] =
+ g_param_spec_pointer ("bookmark",
+ "bookmark",
+ "bookmark",
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT);
+
+ obj_properties[PROP_CREATING] =
+ g_param_spec_boolean ("creating",
+ "creating",
+ "creating",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
+
+ g_object_class_install_properties (object_class, LAST_PROP, obj_properties);
/* from UI file */
gtk_widget_class_set_template_from_resource (widget_class,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]