Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn2015-06-08 15:01:42 -0400
committerMatthias Sohn2015-06-08 17:11:27 -0400
commit712d3a2bff24f66fd971aae4f0d588f49f79dcc3 (patch)
tree027b05fd37f77259a670ba435b4fdefd05c7533a
parent7d85ce9be99b0fe436f5d227511e241dfe90cc29 (diff)
downloadegit-712d3a2bff24f66fd971aae4f0d588f49f79dcc3.tar.gz
egit-712d3a2bff24f66fd971aae4f0d588f49f79dcc3.tar.xz
egit-712d3a2bff24f66fd971aae4f0d588f49f79dcc3.zip
Don't pre-select all repositories when opening RepositorySearchDialog
Starting with no preselection saves one click if the user wants to add one or few repositories which seems the most common case. This also fixes bug 469607. Bug: 469607 Change-Id: I7ba4e8983319e1cbf7121bb764c936b3f261d185 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositorySearchDialog.java16
1 files changed, 1 insertions, 15 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositorySearchDialog.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositorySearchDialog.java
index d8de64c23..324545047 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositorySearchDialog.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositorySearchDialog.java
@@ -101,8 +101,6 @@ public class RepositorySearchDialog extends WizardPage {
private final IEclipsePreferences prefs = InstanceScope.INSTANCE
.getNode(Activator.getPluginId());
- private boolean isUserModifiedTreeSelection;
-
private static final class ContentProvider implements ITreeContentProvider {
private final Object[] children = new Object[0];
@@ -308,16 +306,10 @@ public class RepositorySearchDialog extends WizardPage {
@Override
public boolean isElementVisible(Viewer viewer, Object element) {
- boolean elementVisible = super
- .isElementVisible(viewer, element);
- // Only user selected elements are not searched.
if (getCheckedItems().contains(element)) {
- if (!isUserModifiedTreeSelection)
- fTreeViewer.setChecked(element, elementVisible);
- else
return true;
}
- return elementVisible;
+ return super.isElementVisible(viewer, element);
}
};
@@ -328,7 +320,6 @@ public class RepositorySearchDialog extends WizardPage {
@Override
public void checkStateChanged(CheckStateChangedEvent event) {
- isUserModifiedTreeSelection = true;
enableOk();
}
});
@@ -352,7 +343,6 @@ public class RepositorySearchDialog extends WizardPage {
@Override
public void widgetSelected(SelectionEvent e) {
- isUserModifiedTreeSelection = true;
fTreeViewer.setAllChecked(true);
enableOk();
}
@@ -370,7 +360,6 @@ public class RepositorySearchDialog extends WizardPage {
@Override
public void widgetSelected(SelectionEvent e) {
- isUserModifiedTreeSelection = true;
fTreeViewer.setAllChecked(false);
enableOk();
}
@@ -524,9 +513,6 @@ public class RepositorySearchDialog extends WizardPage {
uncheckAllItem.setEnabled(!validDirs.isEmpty());
fTree.clearFilter();
fTreeViewer.setInput(validDirs);
- // this sets all to selected
- fTreeViewer.setAllChecked(true);
- isUserModifiedTreeSelection = false;
enableOk();
}

Back to the top