aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-toolbars-model.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 /src/ephy-toolbars-model.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 'src/ephy-toolbars-model.c')
-rwxr-xr-xsrc/ephy-toolbars-model.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ephy-toolbars-model.c b/src/ephy-toolbars-model.c
index 6384b06e5..55d351873 100755
--- a/src/ephy-toolbars-model.c
+++ b/src/ephy-toolbars-model.c
@@ -56,6 +56,8 @@ enum
static GObjectClass *parent_class = NULL;
+#define EPHY_TOOLBARS_MODEL_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_TOOLBARS_MODEL, EphyToolbarsModelPrivate))
+
struct EphyToolbarsModelPrivate
{
EphyBookmarks *bookmarks;
@@ -403,8 +405,10 @@ ephy_toolbars_model_class_init (EphyToolbarsModelClass *klass)
g_param_spec_object ("bookmarks",
"Bookmarks",
"Bookmarks",
- EPHY_BOOKMARKS_TYPE,
+ EPHY_TYPE_BOOKMARKS,
G_PARAM_READWRITE));
+
+ g_type_class_add_private (object_class, sizeof(EphyToolbarsModelPrivate));
}
static void
@@ -456,7 +460,8 @@ toolbar_removed (EphyToolbarsModel *model, int position)
static void
ephy_toolbars_model_init (EphyToolbarsModel *t)
{
- t->priv = g_new0 (EphyToolbarsModelPrivate, 1);
+ t->priv = EPHY_TOOLBARS_MODEL_GET_PRIVATE (t);
+
t->priv->bookmarks = NULL;
t->priv->loading = FALSE;
t->priv->xml_file = g_build_filename (ephy_dot_dir (),
@@ -474,17 +479,12 @@ ephy_toolbars_model_finalize (GObject *object)
{
EphyToolbarsModel *t = EPHY_TOOLBARS_MODEL (object);
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_EPHY_TOOLBARS_MODEL (object));
-
save_changes (t);
g_object_unref (t->priv->bookmarks);
g_free (t->priv->xml_file);
- g_free (t->priv);
-
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@@ -493,7 +493,7 @@ ephy_toolbars_model_new (EphyBookmarks *bookmarks)
{
EphyToolbarsModel *t;
- t = EPHY_TOOLBARS_MODEL (g_object_new (EPHY_TOOLBARS_MODEL_TYPE,
+ t = EPHY_TOOLBARS_MODEL (g_object_new (EPHY_TYPE_TOOLBARS_MODEL,
"bookmarks", bookmarks,
NULL));