aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-embed-dialog.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2003-09-02 07:20:17 +0800
committerChristian Persch <chpe@src.gnome.org>2003-09-02 07:20:17 +0800
commit73a95385f4034998cc78199dc8bb9ee22d90d6aa (patch)
tree499d78ab52e8937f672e3659105dda083a34c988 /embed/ephy-embed-dialog.c
parent3375c1878c4c0ebf4f5067d128024ea484208f62 (diff)
downloadgsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar
gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar.gz
gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar.bz2
gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar.lz
gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar.xz
gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar.zst
gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.zip
Mega-patch, changelog too long to paste here.
Diffstat (limited to 'embed/ephy-embed-dialog.c')
-rw-r--r--embed/ephy-embed-dialog.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/embed/ephy-embed-dialog.c b/embed/ephy-embed-dialog.c
index 552ec0106..38fc1abe8 100644
--- a/embed/ephy-embed-dialog.c
+++ b/embed/ephy-embed-dialog.c
@@ -41,6 +41,8 @@ enum
PROP_EPHY_EMBED
};
+#define EPHY_EMBED_DIALOG_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_EMBED_DIALOG, EphyEmbedDialogPrivate))
+
struct EphyEmbedDialogPrivate
{
EphyEmbed *embed;
@@ -68,7 +70,7 @@ ephy_embed_dialog_get_type (void)
(GInstanceInitFunc) ephy_embed_dialog_init
};
- ephy_embed_dialog_type = g_type_register_static (EPHY_DIALOG_TYPE,
+ ephy_embed_dialog_type = g_type_register_static (EPHY_TYPE_DIALOG,
"EphyEmbedDialog",
&our_info, 0);
}
@@ -94,12 +96,14 @@ ephy_embed_dialog_class_init (EphyEmbedDialogClass *klass)
"The dialog's embed",
G_TYPE_OBJECT,
G_PARAM_READWRITE));
+
+ g_type_class_add_private (object_class, sizeof(EphyEmbedDialogPrivate));
}
static void
ephy_embed_dialog_init (EphyEmbedDialog *dialog)
{
- dialog->priv = g_new0 (EphyEmbedDialogPrivate, 1);
+ dialog->priv = EPHY_EMBED_DIALOG_GET_PRIVATE (dialog);
dialog->priv->embed = NULL;
}
@@ -117,19 +121,10 @@ unset_embed (EphyEmbedDialog *dialog)
static void
ephy_embed_dialog_finalize (GObject *object)
{
- EphyEmbedDialog *dialog;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_EPHY_EMBED_DIALOG (object));
-
- dialog = EPHY_EMBED_DIALOG (object);
-
- g_return_if_fail (dialog->priv != NULL);
+ EphyEmbedDialog *dialog = EPHY_EMBED_DIALOG (object);
unset_embed (dialog);
- g_free (dialog->priv);
-
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@@ -168,7 +163,7 @@ ephy_embed_dialog_get_property (GObject *object,
EphyEmbedDialog *
ephy_embed_dialog_new (EphyEmbed *embed)
{
- return EPHY_EMBED_DIALOG (g_object_new (EPHY_EMBED_DIALOG_TYPE,
+ return EPHY_EMBED_DIALOG (g_object_new (EPHY_TYPE_EMBED_DIALOG,
"embed", embed,
NULL));
}
@@ -178,7 +173,7 @@ ephy_embed_dialog_new_with_parent (GtkWidget *parent_window,
EphyEmbed *embed)
{
return EPHY_EMBED_DIALOG (g_object_new
- (EPHY_EMBED_DIALOG_TYPE,
+ (EPHY_TYPE_EMBED_DIALOG,
"ParentWindow", parent_window,
"embed", embed,
NULL));