Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2015-09-14 17:45:12 -0400
committerMatthias Sohn2015-09-16 17:50:19 -0400
commit527d3ae11591e8a6bcd584f5b660f22b6a57c8dd (patch)
treeddcc4ce0b40709bbfee2a4eee37934bf49fc1a4c
parentd9f2520f2305be77c0dadf0628922651736e7d15 (diff)
downloadegit-527d3ae11591e8a6bcd584f5b660f22b6a57c8dd.tar.gz
egit-527d3ae11591e8a6bcd584f5b660f22b6a57c8dd.tar.xz
egit-527d3ae11591e8a6bcd584f5b660f22b6a57c8dd.zip
Specify modal dialog style for results of "dry run" in push dialog
Bug: 391182 Change-Id: Ia86cbf6b12ae94366eb38bd1d39f2bb571e8d48b Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushOperationUI.java2
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushResultDialog.java15
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushToGerritPage.java3
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushWizard.java2
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/SimpleConfigurePushDialog.java3
5 files changed, 17 insertions, 8 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushOperationUI.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushOperationUI.java
index 5663f971f..3aaee00f1 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushOperationUI.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushOperationUI.java
@@ -250,7 +250,7 @@ public class PushOperationUI {
if (expectedResult == null || !expectedResult.equals(result)) {
if (event.getResult().isOK())
PushResultDialog.show(repository, result,
- destinationString, showConfigureButton);
+ destinationString, showConfigureButton, false);
else
Activator.handleError(event.getResult().getMessage(),
event.getResult().getException(), true);
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushResultDialog.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushResultDialog.java
index 854ced23d..a042c8099 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushResultDialog.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushResultDialog.java
@@ -47,10 +47,12 @@ class PushResultDialog extends TitleAreaDialog {
* @param showConfigureButton
* whether to show the "Configure..." button in the result dialog
* or not
+ * @param modal
+ * true to have application modal style
*/
public static void show(final Repository repository,
final PushOperationResult result, final String sourceString,
- final boolean showConfigureButton) {
+ final boolean showConfigureButton, final boolean modal) {
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
@Override
public void run() {
@@ -61,7 +63,7 @@ class PushResultDialog extends TitleAreaDialog {
Shell shell = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getShell();
PushResultDialog dialog = new PushResultDialog(
- shell, repository, result, sourceString);
+ shell, repository, result, sourceString, modal);
dialog.showConfigureButton(showConfigureButton);
dialog.open();
}
@@ -71,9 +73,14 @@ class PushResultDialog extends TitleAreaDialog {
}
PushResultDialog(final Shell parentShell, final Repository localDb,
- final PushOperationResult result, final String destinationString) {
+ final PushOperationResult result, final String destinationString,
+ boolean modal) {
super(parentShell);
- setShellStyle(getShellStyle() & ~SWT.APPLICATION_MODAL | SWT.RESIZE);
+ int shellStyle = getShellStyle() | SWT.RESIZE;
+ if (!modal) {
+ shellStyle &= ~SWT.APPLICATION_MODAL;
+ }
+ setShellStyle(shellStyle);
this.localDb = localDb;
this.result = result;
this.destinationString = destinationString;
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushToGerritPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushToGerritPage.java
index 602fa535b..c50bf7095 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushToGerritPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushToGerritPage.java
@@ -254,7 +254,8 @@ class PushToGerritPage extends WizardPage {
Shell shell = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getShell();
PushResultDialog dlg = new PushResultDialog(shell,
- repository, result[0], op.getDestinationString());
+ repository, result[0], op.getDestinationString(),
+ false);
dlg.showConfigureButton(false);
dlg.open();
}
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushWizard.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushWizard.java
index 6e4091d44..550c2836a 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushWizard.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushWizard.java
@@ -316,7 +316,7 @@ public class PushWizard extends Wizard {
.getActiveWorkbenchWindow().getShell();
final Dialog dialog = new PushResultDialog(
shell, localDb, result,
- destinationString);
+ destinationString, false);
dialog.open();
}
});
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/SimpleConfigurePushDialog.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/SimpleConfigurePushDialog.java
index 220b1a8ec..0042fb747 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/SimpleConfigurePushDialog.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/SimpleConfigurePushDialog.java
@@ -596,7 +596,8 @@ public class SimpleConfigurePushDialog extends TitleAreaDialog {
repository,
result,
op
- .getDestinationString());
+ .getDestinationString(),
+ true);
dlg.showConfigureButton(false);
dlg.open();
}

Back to the top