[epiphany] EphyHistoryService: Use g_object_class_install_properties.
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] EphyHistoryService: Use g_object_class_install_properties.
- Date: Wed, 16 Dec 2015 13:10:05 +0000 (UTC)
commit efc19dcae76f25c2e0b30aa079cf3068c2b7c03e
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Sat Dec 12 21:15:39 2015 +0100
EphyHistoryService: Use g_object_class_install_properties.
https://bugzilla.gnome.org/show_bug.cgi?id=759401
lib/history/ephy-history-service.c | 34 +++++++++++++++++++---------------
1 files changed, 19 insertions(+), 15 deletions(-)
---
diff --git a/lib/history/ephy-history-service.c b/lib/history/ephy-history-service.c
index e3aa9d6..edaa67a 100644
--- a/lib/history/ephy-history-service.c
+++ b/lib/history/ephy-history-service.c
@@ -79,9 +79,12 @@ static void ephy_history_service_quit (EphyHistoryService *self, Eph
enum {
PROP_0,
PROP_HISTORY_FILENAME,
- PROP_READ_ONLY
+ PROP_READ_ONLY,
+ LAST_PROP
};
+static GParamSpec *obj_properties[LAST_PROP];
+
#define EPHY_HISTORY_SERVICE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), EPHY_TYPE_HISTORY_SERVICE,
EphyHistoryServicePrivate))
G_DEFINE_TYPE (EphyHistoryService, ephy_history_service, G_TYPE_OBJECT);
@@ -264,20 +267,21 @@ ephy_history_service_class_init (EphyHistoryServiceClass *klass)
1,
G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE);
- g_object_class_install_property (gobject_class,
- PROP_HISTORY_FILENAME,
- g_param_spec_string ("history-filename",
- "History filename",
- "The filename of the SQLite file holding containing
history",
- NULL,
- G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE |
G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
- g_object_class_install_property (gobject_class,
- PROP_READ_ONLY,
- g_param_spec_boolean ("read-only",
- "Read only mode",
- "Whether the history service works in read only
mode",
- FALSE,
- G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE |
G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
+ obj_properties[PROP_HISTORY_FILENAME] =
+ g_param_spec_string ("history-filename",
+ "History filename",
+ "The filename of the SQLite file holding containing history",
+ NULL,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS);
+
+ obj_properties[PROP_READ_ONLY] =
+ g_param_spec_boolean ("read-only",
+ "Read only mode",
+ "Whether the history service works in read only mode",
+ FALSE,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS);
+
+ g_object_class_install_properties (gobject_class, LAST_PROP, obj_properties);
g_type_class_add_private (gobject_class, sizeof (EphyHistoryServicePrivate));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]