Merge "ChangeScreen2: Rename "Revisions" to "Patch Sets""

This commit is contained in:
Edwin Kempin 2013-11-30 06:18:24 +00:00 committed by Gerrit Code Review
commit ae8a0b9126
7 changed files with 26 additions and 26 deletions

View File

@ -159,8 +159,8 @@ public class ChangeScreen2 extends Screen {
@UiField History history;
@UiField Button includedIn;
@UiField Button revisions;
@UiField Element revisionsText;
@UiField Button patchSets;
@UiField Element patchSetsText;
@UiField Button download;
@UiField Button reply;
@UiField Button expandAll;
@ -171,7 +171,7 @@ public class ChangeScreen2 extends Screen {
private ReplyAction replyAction;
private EditMessageAction editMessageAction;
private IncludedInAction includedInAction;
private RevisionsAction revisionsAction;
private PatchSetsAction patchSetsAction;
private DownloadAction downloadAction;
public ChangeScreen2(Change.Id changeId, String base, String revision, boolean openReplyBox) {
@ -340,11 +340,11 @@ public class ChangeScreen2 extends Screen {
}
int currentlyViewedPatchSet = info.revision(revision)._number();
revisionsText.setInnerText(Resources.M.revisions(
patchSetsText.setInnerText(Resources.M.patchSets(
currentlyViewedPatchSet, currentPatchSet));
revisionsAction = new RevisionsAction(
patchSetsAction = new PatchSetsAction(
info.legacy_id(), revision,
style, headerLine, revisions);
style, headerLine, patchSets);
}
private void initDownloadAction(ChangeInfo info, String revision) {
@ -466,9 +466,9 @@ public class ChangeScreen2 extends Screen {
downloadAction.show();
}
@UiHandler("revisions")
void onRevision(ClickEvent e) {
revisionsAction.show();
@UiHandler("patchSets")
void onPatchSets(ClickEvent e) {
patchSetsAction.show();
}
@UiHandler("reply")

View File

@ -358,8 +358,8 @@ limitations under the License.
<g:Button ui:field='includedIn' styleName='' visible="false">
<div><ui:msg>Included in</ui:msg></div>
</g:Button>
<g:Button ui:field='revisions' styleName=''>
<div ui:field='revisionsText'/>
<g:Button ui:field='patchSets' styleName=''>
<div ui:field='patchSetsText'/>
</g:Button>
<g:Button ui:field='download' styleName=''>
<div><ui:msg>Download</ui:msg></div>

View File

@ -15,7 +15,7 @@
package com.google.gerrit.client.change;
public interface Messages extends com.google.gwt.i18n.client.Messages {
String revisions(int currentlyViewedPatchSet, int currentPatchSet);
String patchSets(int currentlyViewedPatchSet, int currentPatchSet);
String changeWithNoRevisions(int changeId);
String relatedChanges(int count);
String relatedChanges(String count);

View File

@ -1,4 +1,4 @@
revisions = Revisions ({0}/{1})
patchSets = Patch Sets ({0}/{1})
changeWithNoRevisions = Cannot display change {0} because it has no revisions.
relatedChanges = Related Changes ({0})
conflictingChanges = Conflicts With ({0})

View File

@ -18,17 +18,17 @@ import com.google.gerrit.reviewdb.client.Change;
import com.google.gwt.user.client.ui.UIObject;
import com.google.gwt.user.client.ui.Widget;
class RevisionsAction extends RightSidePopdownAction {
private final RevisionsBox revisionBox;
class PatchSetsAction extends RightSidePopdownAction {
private final PatchSetsBox revisionBox;
RevisionsAction(
PatchSetsAction(
Change.Id changeId,
String revision,
ChangeScreen2.Style style,
UIObject relativeTo,
Widget downloadButton) {
super(style, relativeTo, downloadButton);
this.revisionBox = new RevisionsBox(changeId, revision);
this.revisionBox = new PatchSetsBox(changeId, revision);
}
Widget getWidget() {

View File

@ -50,8 +50,8 @@ import com.google.gwtexpui.safehtml.client.SafeHtmlBuilder;
import java.util.Collections;
import java.util.EnumSet;
class RevisionsBox extends Composite {
interface Binder extends UiBinder<HTMLPanel, RevisionsBox> {}
class PatchSetsBox extends Composite {
interface Binder extends UiBinder<HTMLPanel, PatchSetsBox> {}
private static final Binder uiBinder = GWT.create(Binder.class);
private static final String OPEN;
@ -64,13 +64,13 @@ class RevisionsBox extends Composite {
private static final native void init(String o) /*-{
$wnd[o] = $entry(function(e,i) {
return @com.google.gerrit.client.change.RevisionsBox::onOpen(Lcom/google/gwt/dom/client/NativeEvent;I)(e,i);
return @com.google.gerrit.client.change.PatchSetsBox::onOpen(Lcom/google/gwt/dom/client/NativeEvent;I)(e,i);
});
}-*/;
private static boolean onOpen(NativeEvent e, int idx) {
if (link.handleAsClick(e.<Event> cast())) {
RevisionsBox t = getRevisionBox(e);
PatchSetsBox t = getRevisionBox(e);
if (t != null) {
t.onOpenRow(idx);
e.preventDefault();
@ -80,12 +80,12 @@ class RevisionsBox extends Composite {
return true;
}
private static RevisionsBox getRevisionBox(NativeEvent event) {
private static PatchSetsBox getRevisionBox(NativeEvent event) {
com.google.gwt.user.client.Element e = event.getEventTarget().cast();
for (e = DOM.getParent(e); e != null; e = DOM.getParent(e)) {
EventListener l = DOM.getEventListener(e);
if (l instanceof RevisionsBox) {
return (RevisionsBox) l;
if (l instanceof PatchSetsBox) {
return (PatchSetsBox) l;
}
}
return null;
@ -106,7 +106,7 @@ class RevisionsBox extends Composite {
@UiField FlexTable table;
@UiField Style style;
RevisionsBox(Change.Id changeId, String revision) {
PatchSetsBox(Change.Id changeId, String revision) {
this.changeId = changeId;
this.revision = revision;
initWidget(uiBinder.createAndBindUi(this));

View File

@ -18,7 +18,7 @@ limitations under the License.
xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui'>
<ui:with field='res' type='com.google.gerrit.client.change.Resources'/>
<ui:style type='com.google.gerrit.client.change.RevisionsBox.Style'>
<ui:style type='com.google.gerrit.client.change.PatchSetsBox.Style'>
@eval selectionColor com.google.gerrit.client.Gerrit.getTheme().selectionColor;
.revisionBox {