aboutsummaryrefslogtreecommitdiffstats
path: root/src/toolbar.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-01-12 04:12:48 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-01-12 04:12:48 +0800
commit594097cc0181cfea7e8205448a7b6e315e311a36 (patch)
tree8401a7431661f52e384a69bf9ce5cfc03e60a464 /src/toolbar.c
parent67a3a6a3e873bf7972d76cee8396b8dec08fdcae (diff)
downloadgsoc2013-epiphany-594097cc0181cfea7e8205448a7b6e315e311a36.tar
gsoc2013-epiphany-594097cc0181cfea7e8205448a7b6e315e311a36.tar.gz
gsoc2013-epiphany-594097cc0181cfea7e8205448a7b6e315e311a36.tar.bz2
gsoc2013-epiphany-594097cc0181cfea7e8205448a7b6e315e311a36.tar.lz
gsoc2013-epiphany-594097cc0181cfea7e8205448a7b6e315e311a36.tar.xz
gsoc2013-epiphany-594097cc0181cfea7e8205448a7b6e315e311a36.tar.zst
gsoc2013-epiphany-594097cc0181cfea7e8205448a7b6e315e311a36.zip
Reimplement favicons. Now all exit crashes related to connections left
2003-01-11 Marco Pesenti Gritti <marco@it.gnome.org> * embed/Makefile.am: * embed/ephy-embed-favicon.c: * embed/ephy-embed-favicon.h: * embed/ephy-embed-shell.c: (ephy_embed_shell_get_favicon_cache): * embed/ephy-favicon-cache.c: (ephy_favicon_cache_class_init), (ephy_favicon_cache_new), (ephy_favicon_cache_load), (icon_is_obsolete), (icons_added_cb), (icons_removed_cb), (remove_obsolete_icons), (ephy_favicon_cache_save), (ephy_favicon_cache_init), (kill_download), (cleanup_downloads_hash), (ephy_favicon_cache_finalize), (favicon_name_build), (favicon_download_completed_cb), (ephy_favicon_cache_download), (ephy_favicon_cache_get): * embed/ephy-favicon-cache.h: * embed/ephy-favicon.c: * embed/ephy-favicon.h: * embed/mozilla/mozilla-embed-shell.cpp: * src/ephy-tab.c: (ephy_tab_init), (ephy_tab_favicon_cb), (ephy_tab_location_cb), (ephy_tab_get_location), (ephy_tab_get_favicon_url): * src/ephy-tab.h: * src/ephy-window.c: (update_favicon_control): * src/toolbar.c: (toolbar_setup_favicon_ebox), (toolbar_update_favicon): Reimplement favicons. Now all exit crashes related to connections left open by favicons should be fixed.
Diffstat (limited to 'src/toolbar.c')
-rwxr-xr-xsrc/toolbar.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/src/toolbar.c b/src/toolbar.c
index 24558e4a5..695f657da 100755
--- a/src/toolbar.c
+++ b/src/toolbar.c
@@ -29,7 +29,6 @@
#include "ephy-gui.h"
#include "ephy-location-entry.h"
#include "ephy-shell.h"
-#include "ephy-embed-favicon.h"
#include "ephy-dnd.h"
#include "ephy-toolbar-bonobo-view.h"
#include "ephy-toolbar-item-factory.h"
@@ -255,8 +254,7 @@ toolbar_setup_favicon_ebox (Toolbar *t, GtkWidget *w)
g_return_if_fail (w == p->favicon_ebox);
- p->favicon = g_object_ref (ephy_embed_favicon_new
- (ephy_window_get_active_embed (p->window)));
+ p->favicon = g_object_ref (gtk_image_new ());
gtk_container_add (GTK_CONTAINER (p->favicon_ebox), p->favicon);
gtk_container_set_border_width (GTK_CONTAINER (p->favicon_ebox), 2);
@@ -667,10 +665,29 @@ toolbar_set_location (Toolbar *t,
void
toolbar_update_favicon (Toolbar *t)
{
- if (t->priv->favicon)
+ GdkPixbuf *pixbuf = NULL;
+ EphyFaviconCache *cache;
+ EphyTab *tab;
+ const char *url;
+
+ cache = ephy_embed_shell_get_favicon_cache (EPHY_EMBED_SHELL (ephy_shell));
+ tab = ephy_window_get_active_tab (t->priv->window);
+ url = ephy_tab_get_favicon_url (tab);
+
+ if (url)
+ {
+ pixbuf = ephy_favicon_cache_get (cache, url);
+ }
+
+ if (pixbuf)
+ {
+ gtk_image_set_from_pixbuf (GTK_IMAGE (t->priv->favicon), pixbuf);
+ }
+ else
{
- ephy_embed_favicon_set_embed (EPHY_EMBED_FAVICON (t->priv->favicon),
- ephy_window_get_active_embed (t->priv->window));
+ gtk_image_set_from_stock (GTK_IMAGE (t->priv->favicon),
+ GTK_STOCK_JUMP_TO,
+ GTK_ICON_SIZE_MENU);
}
}