[epiphany] EphySQLiteStatement: Use g_object_class_install_properties.
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] EphySQLiteStatement: Use g_object_class_install_properties.
- Date: Wed, 16 Dec 2015 13:07:58 +0000 (UTC)
commit 39e56d5fe169529dec8b35f15a090c7105771dd9
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Fri Dec 11 01:15:01 2015 +0100
EphySQLiteStatement: Use g_object_class_install_properties.
https://bugzilla.gnome.org/show_bug.cgi?id=759401
lib/ephy-sqlite-statement.c | 33 ++++++++++++++++++---------------
1 files changed, 18 insertions(+), 15 deletions(-)
---
diff --git a/lib/ephy-sqlite-statement.c b/lib/ephy-sqlite-statement.c
index d0d370c..69b593b 100644
--- a/lib/ephy-sqlite-statement.c
+++ b/lib/ephy-sqlite-statement.c
@@ -25,9 +25,12 @@ enum
{
PROP_0,
PROP_PREPARED_STATEMENT,
- PROP_CONNECTION
+ PROP_CONNECTION,
+ LAST_PROP
};
+static GParamSpec *obj_properties[LAST_PROP];
+
struct _EphySQLiteStatementPrivate {
sqlite3_stmt *prepared_statement;
EphySQLiteConnection *connection;
@@ -81,20 +84,20 @@ ephy_sqlite_statement_class_init (EphySQLiteStatementClass *klass)
gobject_class->set_property = ephy_sqlite_statement_set_property;
g_type_class_add_private (gobject_class, sizeof (EphySQLiteStatementPrivate));
- g_object_class_install_property (gobject_class,
- PROP_PREPARED_STATEMENT,
- g_param_spec_pointer ("prepared-statement",
- "Prepared statement",
- "The statement's backing SQLite prepared statement",
- 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_CONNECTION,
- g_param_spec_object ("connection",
- "Connection",
- "The statement's backing SQLite connection",
- EPHY_TYPE_SQLITE_CONNECTION,
- G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE |
G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
+ obj_properties[PROP_PREPARED_STATEMENT] =
+ g_param_spec_pointer ("prepared-statement",
+ "Prepared statement",
+ "The statement's backing SQLite prepared statement",
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS);
+
+ obj_properties[PROP_CONNECTION] =
+ g_param_spec_object ("connection",
+ "Connection",
+ "The statement's backing SQLite connection",
+ EPHY_TYPE_SQLITE_CONNECTION,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | 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]