[epiphany/wip/modern_gobject] EphyFileMonitor: Use g_object_install_properties
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/modern_gobject] EphyFileMonitor: Use g_object_install_properties
- Date: Wed, 16 Sep 2015 02:15:08 +0000 (UTC)
commit 0bc4a8b2a7ee730c064ece4dc8f49df11a736266
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Tue Sep 15 21:05:46 2015 -0500
EphyFileMonitor: Use g_object_install_properties
embed/ephy-file-monitor.c | 21 ++++++++++++---------
1 files changed, 12 insertions(+), 9 deletions(-)
---
diff --git a/embed/ephy-file-monitor.c b/embed/ephy-file-monitor.c
index fb549bf..57b9e80 100644
--- a/embed/ephy-file-monitor.c
+++ b/embed/ephy-file-monitor.c
@@ -45,10 +45,12 @@ G_DEFINE_TYPE (EphyFileMonitor, ephy_file_monitor, G_TYPE_OBJECT)
enum {
PROP_0,
-
- PROP_VIEW
+ PROP_VIEW,
+ LAST_PROP
};
+static GParamSpec *obj_properties[LAST_PROP];
+
static void
ephy_file_monitor_cancel (EphyFileMonitor *monitor)
{
@@ -267,13 +269,14 @@ ephy_file_monitor_class_init (EphyFileMonitorClass *klass)
gobject_class->get_property = ephy_file_monitor_get_property;
gobject_class->set_property = ephy_file_monitor_set_property;
- g_object_class_install_property (gobject_class,
- PROP_VIEW,
- g_param_spec_object ("view",
- "View",
- "The file monitor's associated view",
- EPHY_TYPE_WEB_VIEW,
- G_PARAM_READWRITE | G_PARAM_STATIC_NAME |
G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_CONSTRUCT_ONLY));
+ obj_properties[PROP_VIEW] =
+ g_param_spec_object ("view",
+ "View",
+ "The file monitor's associated view",
+ EPHY_TYPE_WEB_VIEW,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
+
+ g_object_class_install_properties (gobject_class, LAST_PROP, obj_properties);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]