[epiphany] EphyWindowAction: Use g_object_class_install_properties.
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] EphyWindowAction: Use g_object_class_install_properties.
- Date: Wed, 16 Dec 2015 13:07:28 +0000 (UTC)
commit df9c8a02275dc8019e2e2d73381ed040d8b74d14
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Thu Dec 10 12:59:39 2015 +0100
EphyWindowAction: Use g_object_class_install_properties.
https://bugzilla.gnome.org/show_bug.cgi?id=759401
src/ephy-window-action.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/src/ephy-window-action.c b/src/ephy-window-action.c
index 5f4da14..4f91f93 100644
--- a/src/ephy-window-action.c
+++ b/src/ephy-window-action.c
@@ -29,9 +29,12 @@ struct _EphyWindowActionPrivate {
enum {
PROP_0,
- PROP_WINDOW
+ PROP_WINDOW,
+ LAST_PROP
};
+static GParamSpec *obj_properties[LAST_PROP];
+
G_DEFINE_TYPE (EphyWindowAction, ephy_window_action, GTK_TYPE_ACTION)
static void
@@ -82,11 +85,14 @@ ephy_window_action_class_init (EphyWindowActionClass *class)
object_class->set_property = ephy_window_action_set_property;
object_class->get_property = ephy_window_action_get_property;
- g_object_class_install_property (object_class,
- PROP_WINDOW,
- g_param_spec_object ("window", NULL, NULL,
- G_TYPE_OBJECT,
- G_PARAM_READWRITE | G_PARAM_STATIC_NAME |
G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_CONSTRUCT));
+ obj_properties[PROP_WINDOW] =
+ g_param_spec_object ("window",
+ NULL,
+ NULL,
+ G_TYPE_OBJECT,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT);
+
+ g_object_class_install_properties (object_class, LAST_PROP, obj_properties);
g_type_class_add_private (object_class, sizeof (EphyWindowActionPrivate));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]