about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMarco Peereboom <marco@conformal.com>2011-02-19 00:15:09 +0000
committerMarco Peereboom <marco@conformal.com>2011-02-19 00:15:09 +0000
commit12b0ad069820364a60d7fbf66553690f97763fc3 (patch)
treeb613b511347acd78dea3e626a255e0c451108018
parentc8c7663dc36928e62d8142427631a170da3a235e (diff)
downloadxombrero-12b0ad069820364a60d7fbf66553690f97763fc3.tar.gz
show xxxterm favicon in about pages
-rw-r--r--xxxterm.c12
1 files changed, 11 insertions, 1 deletions
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;