diff options
author | Marco Pesenti Gritti <marco@it.gnome.org> | 2003-01-21 04:07:23 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <mpeseng@src.gnome.org> | 2003-01-21 04:07:23 +0800 |
commit | 3b49a697eca4d8a5004193d7b5cbbdea0e53da52 (patch) | |
tree | 183fc92b5cf09ee5de69c46fd93b462db494b54d /src/ephy-favicon-action.c | |
parent | b847d4bc65b02333271bdd0d2d5beebdd4b21395 (diff) | |
download | gsoc2013-epiphany-3b49a697eca4d8a5004193d7b5cbbdea0e53da52.tar gsoc2013-epiphany-3b49a697eca4d8a5004193d7b5cbbdea0e53da52.tar.gz gsoc2013-epiphany-3b49a697eca4d8a5004193d7b5cbbdea0e53da52.tar.bz2 gsoc2013-epiphany-3b49a697eca4d8a5004193d7b5cbbdea0e53da52.tar.lz gsoc2013-epiphany-3b49a697eca4d8a5004193d7b5cbbdea0e53da52.tar.xz gsoc2013-epiphany-3b49a697eca4d8a5004193d7b5cbbdea0e53da52.tar.zst gsoc2013-epiphany-3b49a697eca4d8a5004193d7b5cbbdea0e53da52.zip |
Fix a stupid mistake porting galeon changes, no more freeze.
2003-01-20 Marco Pesenti Gritti <marco@it.gnome.org>
* embed/ephy-embed-event.c: (ephy_embed_event_finalize):
Fix a stupid mistake porting galeon changes, no more
freeze.
* src/ephy-favicon-action.c: (ephy_favicon_action_sync_icon),
(ephy_favicon_action_class_init), (ephy_favicon_action_init),
(ephy_favicon_action_finalize):
Ref favicon cache.
* src/ephy-window.c: (ephy_window_init):
Initialize ppview pointer.
Diffstat (limited to 'src/ephy-favicon-action.c')
-rw-r--r-- | src/ephy-favicon-action.c | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/src/ephy-favicon-action.c b/src/ephy-favicon-action.c index 9fa68acf2..84dcbca45 100644 --- a/src/ephy-favicon-action.c +++ b/src/ephy-favicon-action.c @@ -28,6 +28,7 @@ struct EphyFaviconActionPrivate { EphyWindow *window; char *icon; + EphyFaviconCache *cache; }; enum @@ -39,6 +40,7 @@ enum static void ephy_favicon_action_init (EphyFaviconAction *action); static void ephy_favicon_action_class_init (EphyFaviconActionClass *class); +static void ephy_favicon_action_finalize (GObject *object); static GObjectClass *parent_class = NULL; @@ -128,16 +130,13 @@ ephy_favicon_action_sync_icon (EggAction *action, GParamSpec *pspec, char *url; GtkWidget *image; GdkPixbuf *pixbuf = NULL; - EphyFaviconCache *cache; - - cache = ephy_embed_shell_get_favicon_cache (EPHY_EMBED_SHELL (ephy_shell)); url = fav_action->priv->icon; image = GTK_WIDGET (g_object_get_data (G_OBJECT (proxy), "image")); if (url) { - pixbuf = ephy_favicon_cache_get (cache, url); + pixbuf = ephy_favicon_cache_get (fav_action->priv->cache, url); } if (pixbuf) @@ -220,6 +219,7 @@ ephy_favicon_action_class_init (EphyFaviconActionClass *class) object_class->set_property = ephy_favicon_action_set_property; object_class->get_property = ephy_favicon_action_get_property; + object_class->finalize = ephy_favicon_action_finalize; parent_class = g_type_class_peek_parent (class); action_class = EGG_ACTION_CLASS (class); @@ -249,4 +249,26 @@ ephy_favicon_action_init (EphyFaviconAction *action) { action->priv = g_new0 (EphyFaviconActionPrivate, 1); action->priv->icon = NULL; + + action->priv->cache = ephy_embed_shell_get_favicon_cache + (EPHY_EMBED_SHELL (ephy_shell)); + g_object_ref (action->priv->cache); +} + +static void +ephy_favicon_action_finalize (GObject *object) +{ + EphyFaviconAction *action; + + g_return_if_fail (EPHY_IS_FAVICON_ACTION (object)); + + action = EPHY_FAVICON_ACTION (object); + + g_return_if_fail (action->priv != NULL); + + g_object_unref (action->priv->cache); + + g_free (action->priv); + + G_OBJECT_CLASS (parent_class)->finalize (object); } |