diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2005-08-01 23:57:48 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2005-08-01 23:57:48 +0800 |
commit | 110be671322a06930c86f0ac68b4e898a4664913 (patch) | |
tree | 745868ed1d8cf07e0f23560db07dca70767d3611 /src/ephy-notebook.c | |
parent | 97198c89b6c5d58264f2a53bae7b26420d183ea9 (diff) | |
download | gsoc2013-epiphany-110be671322a06930c86f0ac68b4e898a4664913.tar gsoc2013-epiphany-110be671322a06930c86f0ac68b4e898a4664913.tar.gz gsoc2013-epiphany-110be671322a06930c86f0ac68b4e898a4664913.tar.bz2 gsoc2013-epiphany-110be671322a06930c86f0ac68b4e898a4664913.tar.lz gsoc2013-epiphany-110be671322a06930c86f0ac68b4e898a4664913.tar.xz gsoc2013-epiphany-110be671322a06930c86f0ac68b4e898a4664913.tar.zst gsoc2013-epiphany-110be671322a06930c86f0ac68b4e898a4664913.zip |
Add a ::icon property to EphyTab, and use that everywhere instead of
2005-08-01 Christian Persch <chpe@cvs.gnome.org>
* src/ephy-location-action.c: (sync_icon),
(ephy_location_action_set_property),
(ephy_location_action_get_property),
(ephy_location_action_class_init), (ephy_location_action_init),
(ephy_location_action_finalize):
* src/ephy-notebook.c: (sync_icon):
* src/ephy-tab.c: (ephy_tab_set_property), (ephy_tab_get_property),
(ephy_tab_class_init), (ephy_tab_finalize), (ephy_tab_load_icon),
(ephy_tab_icon_cache_changed_cb), (ephy_tab_set_icon_address),
(ephy_tab_get_icon), (ephy_tab_init):
* src/ephy-tab.h:
* src/ephy-toolbar.c: (ephy_toolbar_set_favicon):
* src/ephy-toolbar.h:
* src/ephy-window.c: (sync_tab_icon):
Add a ::icon property to EphyTab, and use that everywhere instead
of querying the icon cache, thus saving memory.
Diffstat (limited to 'src/ephy-notebook.c')
-rw-r--r-- | src/ephy-notebook.c | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c index 6ca48217c..d2ec4691b 100644 --- a/src/ephy-notebook.c +++ b/src/ephy-notebook.c @@ -32,7 +32,6 @@ #include "ephy-embed.h" #include "ephy-window.h" #include "ephy-shell.h" -#include "ephy-favicon-cache.h" #include "ephy-spinner.h" #include "ephy-link.h" #include "ephy-debug.h" @@ -864,32 +863,16 @@ sync_load_status (EphyTab *tab, GParamSpec *pspec, GtkWidget *proxy) } static void -sync_icon (EphyTab *tab, GParamSpec *pspec, GtkWidget *proxy) +sync_icon (EphyTab *tab, + GParamSpec *pspec, + GtkWidget *proxy) { - EphyFaviconCache *cache; - GdkPixbuf *pixbuf = NULL; - GtkImage *icon = NULL; - const char *address; - - cache = EPHY_FAVICON_CACHE - (ephy_embed_shell_get_favicon_cache (EPHY_EMBED_SHELL (ephy_shell))); - address = ephy_tab_get_icon_address (tab); - - if (address) - { - pixbuf = ephy_favicon_cache_get (cache, address); - } + GtkImage *icon; icon = GTK_IMAGE (g_object_get_data (G_OBJECT (proxy), "icon")); - if (icon) - { - gtk_image_set_from_pixbuf (icon, pixbuf); - } - - if (pixbuf) - { - g_object_unref (pixbuf); - } + g_return_if_fail (icon != NULL); + + gtk_image_set_from_pixbuf (icon, ephy_tab_get_icon (tab)); } static void |