From: James Moger Date: Wed, 3 Oct 2012 21:39:52 +0000 (-0400) Subject: Display fork indicator in Manager X-Git-Tag: v1.2.0~186 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c25b9801899e86753dd6ba80ebc68102ee37a21c;p=gitblit.git Display fork indicator in Manager --- 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("
");