summaryrefslogtreecommitdiff
path: root/ui-summary.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ui-summary.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/ui-summary.c b/ui-summary.c
index 1e895a6..c684628 100644
--- a/ui-summary.c
+++ b/ui-summary.c
@@ -50,29 +50,21 @@ static void print_tag_header()
header = 1;
}
-static int cgit_print_tag_cb(const char *refname, const unsigned char *sha1,
- int flags, void *cb_data)
+static int print_tag(struct refinfo *ref)
{
struct tag *tag;
struct taginfo *info;
- struct object *obj;
- char buf[256], *url;
+ char *url, *name = (char *)ref->refname;
- strncpy(buf, refname, sizeof(buf));
- obj = parse_object(sha1);
- if (!obj)
- return 1;
- if (obj->type == OBJ_TAG) {
- tag = lookup_tag(sha1);
+ if (ref->object->type == OBJ_TAG) {
+ tag = lookup_tag(ref->object->sha1);
if (!tag || parse_tag(tag) || !(info = cgit_parse_tag(tag)))
return 2;
- if (!header)
- print_tag_header();
html("<tr><td>");
url = cgit_pageurl(cgit_query_repo, "tag",
- fmt("id=%s", refname));
+ fmt("id=%s", name));
html_link_open(url, NULL, NULL);
- html_txt(buf);
+ html_txt(name);
html_link_close();
html("</td><td>");
if (info->tagger_date > 0)
@@ -87,9 +79,9 @@ static int cgit_print_tag_cb(const char *refname, const unsigned char *sha1,
if (!header)
print_tag_header();
html("<tr><td>");
- html_txt(buf);
+ html_txt(name);
html("</td><td colspan='2'/><td>");
- cgit_object_link(obj);
+ cgit_object_link(ref->object);
html("</td></tr>\n");
}
return 0;
@@ -155,8 +147,18 @@ static void cgit_print_branches()
static void cgit_print_tags()
{
+ struct reflist list;
+ int i;
+
header = 0;
- for_each_tag_ref(cgit_print_tag_cb, NULL);
+ list.refs = NULL;
+ list.alloc = list.count = 0;
+ for_each_tag_ref(cgit_refs_cb, &list);
+ if (list.count == 0)
+ return;
+ print_tag_header();
+ for(i=0; i<list.count; i++)
+ print_tag(list.refs[i]);
}
static void cgit_print_archives()
=3ae13e6fcc1fe55606921383380434b6752dff1c&follow=1'>Moved the menu to an extra fileRené 'Necoro' Neumann2-210/+207 2009-09-05One database instance is enough :)René 'Necoro' Neumann1-7/+18 2009-09-05Print database type at the bottom of exceptions. NOTE: This does not handle m...René 'Necoro' Neumann2-1/+6 2009-09-05Fix an error, where a category vanishes after refreshing, using the EixSQLDat...René 'Necoro' Neumann2-1/+19 2009-09-03And here is the debugging again :) ... using ctypesRené 'Necoro' Neumann1-1/+8 2009-09-03Screw debugging ... prefer the ctypes approach to get rid of yet another c-mo...René 'Necoro' Neumann3-27/+11 2009-09-03Use this wrapper instead of ctypes to set the textdomain and stuff for the gt...René 'Necoro' Neumann1-9/+5 2009-09-03Add small wrapper to C-gettextRené 'Necoro' Neumann2-1/+22 2009-08-31Update messages.potRené 'Necoro' Neumann1-42/+94 2009-08-31Removed the gtk- strings from translationsRené 'Necoro' Neumann7-3639/+3479 2009-08-31Removed the 'translatable' attribute from 'gtk-*' stringsRené 'Necoro' Neumann5-11/+11 2009-08-31Removed TODO. Renamed ChangeLog to TODORené 'Necoro' Neumann2-40/+0 2009-08-27Only import stuff if necessaryRené 'Necoro' Neumann1-8/+8 2009-08-25Release the threadQueue-Lock in syncv0.13René 'Necoro' Neumann1-0/+1 2009-08-25Updated portugese translationAlberto Federman Neto1-650/+687 2009-08-15Update spanish translationDaniel Halens1-245/+258 2009-08-15Use boolean flags instead of obscure C flags for ipc.MessageQueueRené 'Necoro' Neumann3-13/+15 2009-08-15TypoRené 'Necoro' Neumann1-1/+1 2009-08-15Enhanced the extensions.shRené 'Necoro' Neumann1-3/+8 2009-08-15Move eix-format to correct locationRené 'Necoro' Neumann1-0/+0