diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2011-03-17 12:09:48 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2011-03-17 12:09:48 +0000 |
commit | 4de9349fb8cd7b858785e428ae6f6da33ba38f3a (patch) | |
tree | 2e88bbc4e7e2a31286f154dd322609509c5127b1 /content/fetchers/about.c | |
parent | a70c32422a56ce4c5c2107fe59509215ea36e6e9 (diff) | |
download | netsurf-4de9349fb8cd7b858785e428ae6f6da33ba38f3a.tar.gz netsurf-4de9349fb8cd7b858785e428ae6f6da33ba38f3a.tar.bz2 |
Skip duplicates on about:about.
svn path=/trunk/netsurf/; revision=12090
Diffstat (limited to 'content/fetchers/about.c')
-rw-r--r-- | content/fetchers/about.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/content/fetchers/about.c b/content/fetchers/about.c index 053051dda..69c4d4329 100644 --- a/content/fetchers/about.c +++ b/content/fetchers/about.c @@ -387,17 +387,18 @@ static bool fetch_about_about_handler(struct fetch_about_context *ctx); struct about_handlers { const char *name; fetch_about_handler handler; + bool duplicate; }; struct about_handlers about_handler_list[] = { - { "credits", fetch_about_credits_handler }, - { "licence", fetch_about_licence_handler }, - { "license", fetch_about_license_handler }, - { "config", fetch_about_config_handler }, - { "Choices", fetch_about_choices_handler }, - { "testament", fetch_about_testament_handler }, - { "about", fetch_about_about_handler }, - { "blank", fetch_about_blank_handler } /* The default */ + { "credits", fetch_about_credits_handler, false }, + { "licence", fetch_about_licence_handler, false }, + { "license", fetch_about_license_handler, true }, + { "config", fetch_about_config_handler, false }, + { "Choices", fetch_about_choices_handler, false }, + { "testament", fetch_about_testament_handler, false }, + { "about", fetch_about_about_handler, false }, + { "blank", fetch_about_blank_handler, false } /* The default */ }; #define about_handler_list_len (sizeof(about_handler_list) / sizeof(struct about_handlers)) @@ -437,6 +438,11 @@ static bool fetch_about_about_handler(struct fetch_about_context *ctx) "<ul>\n"); for (abt_loop = 0; abt_loop < about_handler_list_len; abt_loop++) { + + /* Skip over duplicate entries */ + if (about_handler_list[abt_loop].duplicate) + continue; + res = snprintf(buffer + slen, sizeof buffer - slen, "<li><a href=\"about:%s\">about:%s</a></li>\n", about_handler_list[abt_loop].name, |