diff options
author | Carlos Garcia Campos <cgarcia@igalia.com> | 2012-06-06 00:10:33 +0800 |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2012-06-13 18:56:19 +0800 |
commit | e83e965f4d59773d3f54fdfd85f1c862c45d6111 (patch) | |
tree | e7be4f8a8ab7cda46ba7f1468464d169cc59fc1a /lib | |
parent | 774148787a7061f82413d409cfbe18658c4597d5 (diff) | |
download | gsoc2013-epiphany-e83e965f4d59773d3f54fdfd85f1c862c45d6111.tar.gz gsoc2013-epiphany-e83e965f4d59773d3f54fdfd85f1c862c45d6111.tar.zst gsoc2013-epiphany-e83e965f4d59773d3f54fdfd85f1c862c45d6111.zip |
ephy-download-widget: Check the icon has changed before updating the image
Diffstat (limited to 'lib')
-rw-r--r-- | lib/widgets/ephy-download-widget.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/widgets/ephy-download-widget.c b/lib/widgets/ephy-download-widget.c index 0ef240b92..0c84420c2 100644 --- a/lib/widgets/ephy-download-widget.c +++ b/lib/widgets/ephy-download-widget.c @@ -137,11 +137,14 @@ download_clicked_cb (GtkButton *button, static void update_download_icon (EphyDownloadWidget *widget) { - GIcon *new_icon; + GIcon *new_icon, *old_icon; new_icon = get_gicon_from_download (widget->priv->download); - gtk_image_set_from_gicon (GTK_IMAGE (widget->priv->icon), new_icon, - GTK_ICON_SIZE_LARGE_TOOLBAR); + gtk_image_get_gicon (GTK_IMAGE (widget->priv->icon), &old_icon, NULL); + if (!g_icon_equal (new_icon, old_icon)) { + gtk_image_set_from_gicon (GTK_IMAGE (widget->priv->icon), new_icon, + GTK_ICON_SIZE_LARGE_TOOLBAR); + } g_object_unref (new_icon); } |