From 3f414e89dd6c219c88825e99f62943e7da6a33a8 Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Thu, 23 Dec 2010 16:51:51 +0000 Subject: add about --- xxxterm.c | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/xxxterm.c b/xxxterm.c index 9ab05d3..752b4d0 100644 --- a/xxxterm.c +++ b/xxxterm.c @@ -998,6 +998,41 @@ focus(struct tab *t, struct karg *args) return (0); } +int +about(struct tab *t, struct karg *args) +{ + char *about; + + if (t == NULL) + errx(1, "about"); + + + about = g_strdup_printf(XT_DOCTYPE + "" + "" + "About" + "" + "

About

" + "" + "Version: %s

" + "Authors:" + "

" + "Copyrights and licenses can be found on the XXXterm " + "website" + "" + "", + version + ); + + webkit_web_view_load_string(t->wv, about, NULL, NULL, ""); + + g_free(about); + return (0); +} + int help(struct tab *t, struct karg *args) { @@ -1022,7 +1057,7 @@ help(struct tab *t, struct karg *args) "" ; - webkit_web_view_load_string(t->wv, help, NULL, NULL, NULL); + webkit_web_view_load_string(t->wv, help, NULL, NULL, ""); return (0); } @@ -1991,6 +2026,8 @@ struct cmd { { "qa", 0, quit, {0} }, { "qa!", 0, quit, {0} }, { "help", 0, help, {0} }, + { "about", 0, about, {0} }, + { "version", 0, about, {0} }, /* favorites */ { "fav", 0, favorites, {0} }, -- cgit 1.4.1-2-gfad0