diff options
author | Tomasz Zarna | 2013-06-06 11:57:01 +0000 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org | 2013-06-13 23:11:51 +0000 |
commit | 66a5bb6d2a08c42b1c1491a995f03b8a96706da0 (patch) | |
tree | 7db6003d64caf62f72ca80b2c08a1e2645eecde0 | |
parent | 7f56d84644375af537af619a32e73cda690cafc1 (diff) | |
download | org.eclipse.mylyn.reviews-66a5bb6d2a08c42b1c1491a995f03b8a96706da0.tar.gz org.eclipse.mylyn.reviews-66a5bb6d2a08c42b1c1491a995f03b8a96706da0.tar.xz org.eclipse.mylyn.reviews-66a5bb6d2a08c42b1c1491a995f03b8a96706da0.zip |
409935: hide "Publishes 0 draft" message in the Publish Comments dialog
Bug: 409935
Change-Id: I48788982bb198f9f0d968d26c737c29f844d2d0a
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=409935
-rw-r--r-- | org.eclipse.mylyn.gerrit.ui/src/org/eclipse/mylyn/internal/gerrit/ui/operations/PublishDialog.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/org.eclipse.mylyn.gerrit.ui/src/org/eclipse/mylyn/internal/gerrit/ui/operations/PublishDialog.java b/org.eclipse.mylyn.gerrit.ui/src/org/eclipse/mylyn/internal/gerrit/ui/operations/PublishDialog.java index e7a0b9d0a..0984e4275 100644 --- a/org.eclipse.mylyn.gerrit.ui/src/org/eclipse/mylyn/internal/gerrit/ui/operations/PublishDialog.java +++ b/org.eclipse.mylyn.gerrit.ui/src/org/eclipse/mylyn/internal/gerrit/ui/operations/PublishDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Tasktop Technologies and others. + * Copyright (c) 2011, 2013 Tasktop Technologies and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -59,8 +59,6 @@ public class PublishDialog extends GerritOperationDialog { private final List<Button> approvalButtons; - private Label statusLabel; - private final String editorCommentText; private final IReviewItemSet set; @@ -116,14 +114,14 @@ public class PublishDialog extends GerritOperationDialog { messageEditor.getViewer().setSelectedRange(editorCommentText.length(), 0); messageEditor.getControl().setFocus(); - statusLabel = new Label(composite, SWT.NONE); - int drafts = 0; for (IComment comment : set.getAllComments()) { drafts += comment.isDraft() ? 1 : 0; } - - statusLabel.setText(NLS.bind("Publishes {0} draft{1}.", drafts, drafts > 1 ? "s" : "")); + if (drafts > 0) { + Label statusLabel = new Label(composite, SWT.NONE); + statusLabel.setText(NLS.bind("Publishes {0} draft{1}.", drafts, drafts > 1 ? "s" : "")); + } return composite; } |