From 9337c7ee83221d48d02c3c7b5c9dcbaca23ad92f Mon Sep 17 00:00:00 2001 From: Jeff Smith Date: Sun, 1 Oct 2017 23:39:06 -0500 Subject: ui-tree: move set_title_from_path to ui-shared The ui-blame code will also need to call set_title_from_path, so go ahead and move it to ui-shared. Signed-off-by: Jeff Smith Reviewed-by: John Keeping --- ui-shared.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ui-shared.h') diff --git a/ui-shared.h b/ui-shared.h index 87799f1..40f6207 100644 --- a/ui-shared.h +++ b/ui-shared.h @@ -77,4 +77,6 @@ extern void cgit_print_snapshot_links(const char *repo, const char *head, const char *hex, int snapshots); extern void cgit_add_hidden_formfields(int incl_head, int incl_search, const char *page); + +extern void cgit_set_title_from_path(const char *path); #endif /* UI_SHARED_H */ -- cgit v1.2.3-24-g4f1b From f6ffe40d1a2c985494e48dc2d36663ffde1e6044 Mon Sep 17 00:00:00 2001 From: Jeff Smith Date: Sun, 1 Oct 2017 23:39:07 -0500 Subject: ui-shared: make a char* parameter const All cgit_xxx_link functions take const char* for the 'name' parameter, except for cgit_commit_link, which takes a char* and subsequently modifies the contents. Avoiding the content changes, and making it const char* will avoid the need to make copies of const char* strings being passed to cgit_commit_link. Signed-off-by: Jeff Smith Reviewed-by: John Keeping --- ui-shared.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui-shared.h') diff --git a/ui-shared.h b/ui-shared.h index 40f6207..2cd7ac9 100644 --- a/ui-shared.h +++ b/ui-shared.h @@ -30,7 +30,7 @@ extern void cgit_log_link(const char *name, const char *title, const char *class, const char *head, const char *rev, const char *path, int ofs, const char *grep, const char *pattern, int showmsg, int follow); -extern void cgit_commit_link(char *name, const char *title, +extern void cgit_commit_link(const char *name, const char *title, const char *class, const char *head, const char *rev, const char *path); extern void cgit_patch_link(const char *name, const char *title, -- cgit v1.2.3-24-g4f1b From 1649afdc9b2febe9ab7e1abe1956c5dcaff93aa1 Mon Sep 17 00:00:00 2001 From: Jeff Smith Date: Sun, 1 Oct 2017 23:39:09 -0500 Subject: ui-tree: link to blame UI if enabled Create links to the blame page. Signed-off-by: Jeff Smith Reviewed-by: John Keeping --- ui-shared.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ui-shared.h') diff --git a/ui-shared.h b/ui-shared.h index 2cd7ac9..b760a17 100644 --- a/ui-shared.h +++ b/ui-shared.h @@ -26,6 +26,9 @@ extern void cgit_tree_link(const char *name, const char *title, extern void cgit_plain_link(const char *name, const char *title, const char *class, const char *head, const char *rev, const char *path); +extern void cgit_blame_link(const char *name, const char *title, + const char *class, const char *head, + const char *rev, const char *path); extern void cgit_log_link(const char *name, const char *title, const char *class, const char *head, const char *rev, const char *path, int ofs, const char *grep, -- cgit v1.2.3-24-g4f1b