[epiphany/wip/adblocker: 10/10] EphyUriTester: Use g_object_class_install_properties
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/adblocker: 10/10] EphyUriTester: Use g_object_class_install_properties
- Date: Tue, 15 Sep 2015 00:07:19 +0000 (UTC)
commit d40118fc5e8766a64bc063aace7b7df58fe1fe79
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Thu Sep 10 21:10:38 2015 -0500
EphyUriTester: Use g_object_class_install_properties
embed/web-extension/ephy-uri-tester.c | 32 +++++++++++++++++---------------
1 files changed, 17 insertions(+), 15 deletions(-)
---
diff --git a/embed/web-extension/ephy-uri-tester.c b/embed/web-extension/ephy-uri-tester.c
index 39c93ac..268b86e 100644
--- a/embed/web-extension/ephy-uri-tester.c
+++ b/embed/web-extension/ephy-uri-tester.c
@@ -62,8 +62,11 @@ enum
PROP_0,
PROP_FILTERS,
PROP_BASE_DATA_DIR,
+ LAST_PROP
};
+static GParamSpec *obj_properties[LAST_PROP];
+
G_DEFINE_TYPE (EphyUriTester, ephy_uri_tester, G_TYPE_OBJECT)
/* Private functions. */
@@ -873,21 +876,20 @@ ephy_uri_tester_class_init (EphyUriTesterClass *klass)
object_class->constructed = ephy_uri_tester_constructed;
object_class->finalize = ephy_uri_tester_finalize;
- g_object_class_install_property
- (object_class,
- PROP_FILTERS,
- g_param_spec_pointer ("filters",
- "filters",
- "filters",
- G_PARAM_WRITABLE));
- g_object_class_install_property
- (object_class,
- PROP_BASE_DATA_DIR,
- g_param_spec_string ("base-data-dir",
- "Base data dir",
- "The base dir where to create the adblock data dir",
- NULL,
- G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
+ obj_properties[PROP_FILTERS] =
+ g_param_spec_pointer ("filters",
+ "filters",
+ "filters",
+ G_PARAM_WRITABLE);
+
+ obj_properties[PROP_BASE_DATA_DIR] =
+ g_param_spec_string ("base-data-dir",
+ "Base data dir",
+ "The base dir where to create the adblock data dir",
+ NULL,
+ G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY);
+
+ g_object_class_install_properties (object_class, LAST_PROP, obj_properties);
}
EphyUriTester *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]