aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-window.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-08-01 23:57:48 +0800
committerChristian Persch <chpe@src.gnome.org>2005-08-01 23:57:48 +0800
commit110be671322a06930c86f0ac68b4e898a4664913 (patch)
tree745868ed1d8cf07e0f23560db07dca70767d3611 /src/ephy-window.c
parent97198c89b6c5d58264f2a53bae7b26420d183ea9 (diff)
downloadgsoc2013-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-window.c')
-rw-r--r--src/ephy-window.c33
1 files changed, 9 insertions, 24 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 7ab8cf956..949077ca3 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -49,7 +49,6 @@
#include "ephy-tabs-menu.h"
#include "ephy-stock-icons.h"
#include "ephy-extension.h"
-#include "ephy-favicon-cache.h"
#include "ephy-link.h"
#include "ephy-gui.h"
#include "ephy-notebook.h"
@@ -1193,33 +1192,19 @@ sync_tab_document_type (EphyTab *tab,
}
static void
-sync_tab_icon (EphyTab *tab, GParamSpec *pspec, EphyWindow *window)
+sync_tab_icon (EphyTab *tab,
+ GParamSpec *pspec,
+ EphyWindow *window)
{
- const char *address;
- EphyFaviconCache *cache;
- GdkPixbuf *pixbuf = NULL;
-
- if (window->priv->closing) return;
-
- 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);
- }
+ EphyWindowPrivate *priv = window->priv;
+ GdkPixbuf *icon;
- gtk_window_set_icon (GTK_WINDOW (window), pixbuf);
+ if (priv->closing) return;
- ephy_toolbar_set_favicon (window->priv->toolbar, address);
+ icon = ephy_tab_get_icon (tab);
- if (pixbuf)
- {
- g_object_unref (pixbuf);
- }
+ gtk_window_set_icon (GTK_WINDOW (window), icon);
+ ephy_toolbar_set_favicon (priv->toolbar, icon);
}
static void