[epiphany] EphyEmbedDialog: Use g_object_install_properties
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] EphyEmbedDialog: Use g_object_install_properties
- Date: Sat, 7 Nov 2015 16:53:08 +0000 (UTC)
commit a057a406d8aba9488f731cf0081465e0c367b1af
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Tue Sep 15 16:50:25 2015 -0500
EphyEmbedDialog: Use g_object_install_properties
embed/ephy-embed-dialog.c | 32 ++++++++++++++++++--------------
1 files changed, 18 insertions(+), 14 deletions(-)
---
diff --git a/embed/ephy-embed-dialog.c b/embed/ephy-embed-dialog.c
index de096a5..3347a24 100644
--- a/embed/ephy-embed-dialog.c
+++ b/embed/ephy-embed-dialog.c
@@ -21,12 +21,6 @@
#include "ephy-embed-dialog.h"
-enum
-{
- PROP_0,
- PROP_EPHY_EMBED
-};
-
typedef struct
{
EphyEmbed *embed;
@@ -34,6 +28,15 @@ typedef struct
G_DEFINE_TYPE_WITH_PRIVATE (EphyEmbedDialog, ephy_embed_dialog, EPHY_TYPE_DIALOG)
+enum
+{
+ PROP_0,
+ PROP_EPHY_EMBED,
+ LAST_PROP
+};
+
+static GParamSpec *obj_properties[LAST_PROP];
+
static void
unset_embed (EphyEmbedDialog *dialog)
{
@@ -100,13 +103,14 @@ ephy_embed_dialog_class_init (EphyEmbedDialogClass *klass)
object_class->set_property = ephy_embed_dialog_set_property;
object_class->get_property = ephy_embed_dialog_get_property;
- g_object_class_install_property (object_class,
- PROP_EPHY_EMBED,
- g_param_spec_object ("embed",
- "Embed",
- "The dialog's embed",
- G_TYPE_OBJECT,
- G_PARAM_READWRITE | G_PARAM_STATIC_NAME |
G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
+ obj_properties[PROP_EPHY_EMBED] =
+ g_param_spec_object ("embed",
+ "Embed",
+ "The dialog's embed",
+ G_TYPE_OBJECT,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+
+ g_object_class_install_properties (object_class, LAST_PROP, obj_properties);
}
static void
@@ -146,7 +150,7 @@ ephy_embed_dialog_set_embed (EphyEmbedDialog *dialog,
embedptr = &priv->embed;
g_object_add_weak_pointer (G_OBJECT (priv->embed),
(gpointer *) embedptr);
- g_object_notify (G_OBJECT (dialog), "embed");
+ g_object_notify_by_pspec (G_OBJECT (dialog), obj_properties[PROP_EPHY_EMBED]);
}
EphyEmbed *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]