summaryrefslogtreecommitdiffabout
authorJustin Waters <justin.waters@timesys.com>2009-01-09 22:35:10 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2009-01-11 11:52:38 (UTC)
commit1383fe3fa60b4c207d103a49943a59de71a36fe1 (patch) (side-by-side diff)
treed967bb5589949a4ff7862bc99efec88fa6437b51
parentaa60ae12cb3db965b3fe7239424cab92175b8343 (diff)
downloadcgit-1383fe3fa60b4c207d103a49943a59de71a36fe1.zip
cgit-1383fe3fa60b4c207d103a49943a59de71a36fe1.tar.gz
cgit-1383fe3fa60b4c207d103a49943a59de71a36fe1.tar.bz2
Change toggle to more meaningful term
In the log interface, there is a toggle link at the top, but it isn't clear what's being toggled. I've changed it to "Expand" and "Collapse" to make it clear that you are getting more and less information, respectively. Signed-off-by: Justin Waters <justin.waters@timesys.com>
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ui-log.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui-log.c b/ui-log.c
index c3757dd..3202848 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -144,49 +144,50 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
if (path) {
argv[argc++] = "--";
argv[argc++] = path;
}
init_revisions(&rev, NULL);
rev.abbrev = DEFAULT_ABBREV;
rev.commit_format = CMIT_FMT_DEFAULT;
rev.verbose_header = 1;
rev.show_root_diff = 0;
setup_revisions(argc, argv, &rev, NULL);
load_ref_decorations();
rev.show_decorations = 1;
rev.grep_filter.regflags |= REG_ICASE;
compile_grep_patterns(&rev.grep_filter);
prepare_revision_walk(&rev);
if (pager)
html("<table class='list nowrap'>");
html("<tr class='nohover'><th class='left'>Age</th>"
"<th class='left'>Commit message");
if (pager) {
html(" (");
- cgit_log_link("toggle", NULL, NULL, ctx.qry.head, ctx.qry.sha1,
+ cgit_log_link(ctx.qry.showmsg ? "Collapse" : "Expand", NULL,
+ NULL, ctx.qry.head, ctx.qry.sha1,
ctx.qry.path, ctx.qry.ofs, ctx.qry.grep,
ctx.qry.search, ctx.qry.showmsg ? 0 : 1);
html(")");
}
html("</th><th class='left'>Author</th>");
if (ctx.repo->enable_log_filecount) {
html("<th class='left'>Files</th>");
columns++;
if (ctx.repo->enable_log_linecount) {
html("<th class='left'>Lines</th>");
columns++;
}
}
html("</tr>\n");
if (ofs<0)
ofs = 0;
for (i = 0; i < ofs && (commit = get_revision(&rev)) != NULL; i++) {
free(commit->buffer);
commit->buffer = NULL;
free_commit_list(commit->parents);
commit->parents = NULL;
}