From c25b9801899e86753dd6ba80ebc68102ee37a21c Mon Sep 17 00:00:00 2001 From: James Moger Date: Wed, 3 Oct 2012 17:39:52 -0400 Subject: [PATCH] Display fork indicator in Manager --- build.xml | 1 + src/com/gitblit/client/IndicatorsRenderer.java | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/build.xml b/build.xml index 6ad0e46d..72313417 100644 --- a/build.xml +++ b/build.xml @@ -613,6 +613,7 @@ + diff --git a/src/com/gitblit/client/IndicatorsRenderer.java b/src/com/gitblit/client/IndicatorsRenderer.java index 3622db7a..59ce6dd1 100644 --- a/src/com/gitblit/client/IndicatorsRenderer.java +++ b/src/com/gitblit/client/IndicatorsRenderer.java @@ -53,6 +53,8 @@ public class IndicatorsRenderer extends JPanel implements TableCellRenderer, Ser private final ImageIcon frozenIcon; private final ImageIcon federatedIcon; + + private final ImageIcon forkIcon; public IndicatorsRenderer() { super(new FlowLayout(FlowLayout.RIGHT, 1, 0)); @@ -64,6 +66,7 @@ public class IndicatorsRenderer extends JPanel implements TableCellRenderer, Ser doxIcon = new ImageIcon(getClass().getResource("/book_16x16.png")); frozenIcon = new ImageIcon(getClass().getResource("/cold_16x16.png")); federatedIcon = new ImageIcon(getClass().getResource("/federated_16x16.png")); + forkIcon = new ImageIcon(getClass().getResource("/commit_divide_16x16.png")); } @Override @@ -77,6 +80,11 @@ public class IndicatorsRenderer extends JPanel implements TableCellRenderer, Ser if (value instanceof RepositoryModel) { StringBuilder tooltip = new StringBuilder(); RepositoryModel model = (RepositoryModel) value; + if (model.isFork()) { + JLabel icon = new JLabel(forkIcon); + tooltip.append(Translation.get("gb.isFork")).append("
"); + add(icon); + } if (model.useTickets) { JLabel icon = new JLabel(tixIcon); tooltip.append(Translation.get("gb.tickets")).append("
"); -- 2.39.5