summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorTomasz Zarna2012-08-15 18:25:19 (EDT)
committer Matthias Sohn2012-08-15 18:25:19 (EDT)
commit757aef93db63e3dd576142b9bd005bedbf2aa111 (patch)
tree0a60880473baff1ea9ac6223e7c8a5065d8df74e
parent7305e02c426fb4a54456b136b637c93a6dae0a86 (diff)
downloadegit-757aef93db63e3dd576142b9bd005bedbf2aa111.zip
egit-757aef93db63e3dd576142b9bd005bedbf2aa111.tar.gz
egit-757aef93db63e3dd576142b9bd005bedbf2aa111.tar.bz2
Use FOLDER icon when displaying branches in hierarchical moderefs/changes/40/7140/4
The current REMOTE_SPEC icon looks odd when browsing local branches checked out from Gerrit i.e. change/7130/1. The fix replaces the icon with FOLDER. It also make sure sorting doesn't change when switching between hierarchical and flat mode. Change-Id: I0258332763f1300e6324c30441db11ac5e5d2e9a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/RepositoriesViewSorter.java2
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/RepositoryTreeNodeType.java5
2 files changed, 5 insertions, 2 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/RepositoriesViewSorter.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/RepositoriesViewSorter.java
index c83f776..9fba85b 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/RepositoriesViewSorter.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/RepositoriesViewSorter.java
@@ -38,6 +38,8 @@ public class RepositoriesViewSorter extends
public int category(Object element) {
if (element instanceof RepositoryTreeNode) {
RepositoryTreeNode<? extends Object> node = (RepositoryTreeNode<? extends Object>) element;
+ if (node.getType() == RepositoryTreeNodeType.BRANCHHIERARCHY)
+ return RepositoryTreeNodeType.REF.ordinal();
return node.getType().ordinal();
}
return super.category(element);
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/RepositoryTreeNodeType.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/RepositoryTreeNodeType.java
index 7ad8da5..3c378a7 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/RepositoryTreeNodeType.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/RepositoryTreeNodeType.java
@@ -28,8 +28,9 @@ public enum RepositoryTreeNodeType {
/** */
LOCAL(PlatformUI.getWorkbench().getSharedImages().getImage(
ISharedImages.IMG_OBJ_FOLDER)), //
- /** */
- BRANCHHIERARCHY(UIIcons.REMOTE_SPEC.createImage()), //
+ /** */
+ BRANCHHIERARCHY(PlatformUI.getWorkbench().getSharedImages().getImage(
+ ISharedImages.IMG_OBJ_FOLDER)), //
/** */
REMOTETRACKING(PlatformUI.getWorkbench().getSharedImages().getImage(
ISharedImages.IMG_OBJ_FOLDER)), //