Merge "ChangeScreen2: Show number of related changes in the tab title"

This commit is contained in:
Edwin Kempin
2013-11-21 06:48:49 +00:00
committed by Gerrit Code Review
6 changed files with 27 additions and 0 deletions

View File

@@ -27,5 +27,6 @@ interface Constants extends com.google.gwt.i18n.client.Constants {
String draft();
String draftCommentsTooltip();
String notAvailable();
String relatedChangesTooltip();
}

View File

@@ -10,4 +10,5 @@ author = Author / Committer
draft = (DRAFT)
draftCommentsTooltip = Draft comment(s) inside
notAvailable = N/A
relatedChangesTooltip = Same branch changes connected by Git history

View File

@@ -0,0 +1,20 @@
// Copyright (C) 2013 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.gerrit.client.change;
public interface Messages extends com.google.gwt.i18n.client.Messages {
String relatedChanges(int count);
String relatedChanges(String count);
}

View File

@@ -0,0 +1 @@
relatedChanges = Related Changes ({0})

View File

@@ -127,11 +127,14 @@ class RelatedChanges extends Composite {
.get(new AsyncCallback<RelatedInfo>() {
@Override
public void onSuccess(RelatedInfo result) {
tabPanel.getTabBar().setTabText(0, Resources.M.relatedChanges(result.changes().length()));
render(revision, result.changes());
}
@Override
public void onFailure(Throwable err) {
tabPanel.getTabBar().setTabText(0,
Resources.M.relatedChanges(Resources.C.notAvailable()));
progress.setVisible(false);
scroll.setVisible(false);
UIObject.setVisible(error, true);

View File

@@ -22,6 +22,7 @@ import com.google.gwt.resources.client.ImageResource;
public interface Resources extends ClientBundle {
public static final Resources I = GWT.create(Resources.class);
static final Constants C = GWT.create(Constants.class);
static final Messages M = GWT.create(Messages.class);
@Source("star_open.png") ImageResource star_open();
@Source("star_filled.png") ImageResource star_filled();