aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-01-21 04:07:23 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-01-21 04:07:23 +0800
commit3b49a697eca4d8a5004193d7b5cbbdea0e53da52 (patch)
tree183fc92b5cf09ee5de69c46fd93b462db494b54d /src
parentb847d4bc65b02333271bdd0d2d5beebdd4b21395 (diff)
downloadgsoc2013-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')
-rw-r--r--src/ephy-favicon-action.c30
-rw-r--r--src/ephy-window.c1
2 files changed, 27 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);
}
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 8cca7ba26..43bf353f3 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -526,6 +526,7 @@ ephy_window_init (EphyWindow *window)
window->priv->ignore_layout_toggles = FALSE;
window->priv->closing = FALSE;
window->priv->has_default_size = FALSE;
+ window->priv->ppview_toolbar = NULL;
cache = ephy_embed_shell_get_favicon_cache (EPHY_EMBED_SHELL (ephy_shell));
g_signal_connect_object (G_OBJECT (cache),