aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Megert2011-11-17 17:22:51 (EST)
committerMatthias Sohn2011-11-17 17:22:51 (EST)
commitd9e467faadba3c8e866d6f6ccd370bf91035abd6 (patch)
treea806226013559ee7e4de57c63e90e66e04439c68
parent4437b2270058f9d1108aa72a2c6b6a1ea278dc01 (diff)
downloadegit-d9e467faadba3c8e866d6f6ccd370bf91035abd6.zip
egit-d9e467faadba3c8e866d6f6ccd370bf91035abd6.tar.gz
egit-d9e467faadba3c8e866d6f6ccd370bf91035abd6.tar.bz2
Don't start operation when single-clicking an item in a dialogrefs/changes/41/4641/2
Replaces the open listener with a double-click listener. Bug 364016 Change-Id: I502faba0ba22eafd468fc680b20df2e15aa6976f Signed-off-by: Daniel Megert <daniel_megert@ch.ibm.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/AbstractBranchSelectionDialog.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/AbstractBranchSelectionDialog.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/AbstractBranchSelectionDialog.java
index 8fd2e69..a96f47b 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/AbstractBranchSelectionDialog.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/AbstractBranchSelectionDialog.java
@@ -5,6 +5,7 @@
* Copyright (C) 2010, Chris Aniszczyk <caniszczyk@gmail.com>
* Copyright (C) 2010, Mathias Kinzler <mathias.kinzler@sap.com>
* Copyright (C) 2011, Dariusz Luksza <dariusz@luksza.org>
+ * Copyright (C) 2011, Daniel Megert <daniel_megert@ch.ibm.com>
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -33,10 +34,10 @@ import org.eclipse.egit.ui.internal.repository.tree.TagsNode;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.viewers.IOpenListener;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.OpenEvent;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
@@ -231,9 +232,8 @@ public abstract class AbstractBranchSelectionDialog extends TitleAreaDialog {
});
// double-click support
- branchTree.addOpenListener(new IOpenListener() {
-
- public void open(OpenEvent event) {
+ branchTree.addDoubleClickListener(new IDoubleClickListener() {
+ public void doubleClick(DoubleClickEvent event) {
RepositoryTreeNode node = (RepositoryTreeNode) ((IStructuredSelection) branchTree
.getSelection()).getFirstElement();
if (node == null)
@@ -246,7 +246,6 @@ public abstract class AbstractBranchSelectionDialog extends TitleAreaDialog {
!branchTree.getExpandedState(node));
else if (getButton(Window.OK).isEnabled())
buttonPressed(OK);
-
}
});