[Xfce4-commits] <midori:master> Only encode and insert images of existing thumbnails
Christian Dywan
noreply at xfce.org
Wed Mar 23 22:34:01 CET 2011
Updating branch refs/heads/master
to e13bebf4debd209a9fd9893f06fbbb3bdedd2adc (commit)
from 0efdd74c77fcbe9a35c308b1e1f10317ce2ba11b (commit)
commit e13bebf4debd209a9fd9893f06fbbb3bdedd2adc
Author: Paweł Forysiuk <tuxator at o2.pl>
Date: Wed Mar 23 22:32:49 2011 +0100
Only encode and insert images of existing thumbnails
midori/midori-view.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/midori/midori-view.c b/midori/midori-view.c
index 1175e23..162a8a0 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -3829,10 +3829,17 @@ prepare_speed_dial_html (MidoriView* view)
gchar* encoded;
gchar* thumb_content;
- g_file_get_contents (thumb_file, &thumb_content, &sz, NULL);
- encoded = g_base64_encode ((guchar*)thumb_content, sz);
- g_free (thumb_file);
- g_free (thumb_content);
+ if (g_access (thumb_file, F_OK) == 0)
+ {
+ g_file_get_contents (thumb_file, &thumb_content, &sz, NULL);
+ encoded = g_base64_encode ((guchar*)thumb_content, sz);
+ g_free (thumb_file);
+ g_free (thumb_content);
+ }
+ else
+ {
+ encoded = "";
+ }
g_free (slot_id);
g_string_append_printf (markup,
More information about the Xfce4-commits
mailing list