From 12b0ad069820364a60d7fbf66553690f97763fc3 Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Sat, 19 Feb 2011 00:15:09 +0000 Subject: show xxxterm favicon in about pages --- xxxterm.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/xxxterm.c b/xxxterm.c index b950526..138c30f 100644 --- a/xxxterm.c +++ b/xxxterm.c @@ -1252,6 +1252,8 @@ load_uri(struct tab *t, gchar *uri) struct karg args; gchar *newuri = NULL; int i; + char file[PATH_MAX]; + GdkPixbuf *pb; if (uri == NULL) return; @@ -1270,6 +1272,14 @@ load_uri(struct tab *t, gchar *uri) if (!strcmp(&uri[XT_URI_ABOUT_LEN], about_list[i].name)) { bzero(&args, sizeof args); about_list[i].func(t, &args); + + snprintf(file, sizeof file, "%s/%s", + resource_dir, icons[0]); + pb = gdk_pixbuf_new_from_file(file, NULL); + gtk_entry_set_icon_from_pixbuf( + GTK_ENTRY(t->uri_entry), + GTK_ENTRY_ICON_PRIMARY, pb); + gdk_pixbuf_unref(pb); return; } show_oops(t, "invalid about page"); @@ -3486,7 +3496,7 @@ void url_set(struct tab *t, int enable_url_entry) { GdkPixbuf *pixbuf; - int progress; + int progress; show_url = enable_url_entry; -- cgit 1.4.1-2-gfad0