Update to gwtexpui-1.2.0-SNAPSHOT
This version of gwtexpui is fully updated to GWT 2.0.0, which we are also moving towards. The clippy widget now allows for a smaller preview text, removing the need for us to force the clippy movie to line wrap onto the next line through a CSS hack. Change-Id: I879f2b7e57c1743cc773d4054847cbf8451b4d06 Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
parent
e5ea78a7f7
commit
2a65129eb7
@ -17,7 +17,6 @@
|
||||
<inherits name='com.google.gwt.user.User'/>
|
||||
<inherits name='com.google.gwt.resources.Resources'/>
|
||||
<inherits name='com.google.gwt.user.theme.chrome.Chrome'/>
|
||||
<inherits name='com.google.gwtexpui.css.CSS'/>
|
||||
<inherits name='com.google.gwtexpui.clippy.Clippy'/>
|
||||
<inherits name='com.google.gwtexpui.globalkey.GlobalKey'/>
|
||||
<inherits name='com.google.gwtexpui.progress.Progress'/>
|
||||
|
@ -39,8 +39,10 @@ class SshHostKeyPanel extends Composite {
|
||||
final HTML hdr = new HTML(Util.C.sshHostKeyKnownHostEntry());
|
||||
hdr.setStyleName("gerrit-SshHostKeyPanel-Heading");
|
||||
body.add(hdr);
|
||||
final CopyableLabel lbl =
|
||||
new CopyableLabel(info.getHostIdent() + " " + info.getHostKey());
|
||||
|
||||
final CopyableLabel lbl;
|
||||
lbl = new CopyableLabel(info.getHostIdent() + " " + info.getHostKey());
|
||||
lbl.setPreviewText(SshPanel.elide(lbl.getText(), 80));
|
||||
lbl.addStyleName("gerrit-SshHostKeyPanel-KnownHostEntry");
|
||||
body.add(lbl);
|
||||
}
|
||||
|
@ -561,7 +561,7 @@ class SshPanel extends Composite {
|
||||
fmt.addStyleName(row, 2, S_INVALID);
|
||||
}
|
||||
table.setText(row, 3, k.getAlgorithm());
|
||||
table.setText(row, 4, elide(k.getEncodedKey()));
|
||||
table.setText(row, 4, elide(k.getEncodedKey(), 40));
|
||||
table.setText(row, 5, k.getComment());
|
||||
table.setText(row, 6, FormatUtil.mediumFormat(k.getLastUsedOn()));
|
||||
table.setText(row, 7, FormatUtil.mediumFormat(k.getStoredOn()));
|
||||
@ -577,12 +577,12 @@ class SshPanel extends Composite {
|
||||
|
||||
setRowItem(row, k);
|
||||
}
|
||||
}
|
||||
|
||||
String elide(final String s) {
|
||||
if (s == null || s.length() < 40) {
|
||||
return s;
|
||||
}
|
||||
return s.substring(0, 30) + "..." + s.substring(s.length() - 10);
|
||||
static String elide(final String s, final int len) {
|
||||
if (s == null || s.length() < len || len <= 10) {
|
||||
return s;
|
||||
}
|
||||
return s.substring(0, len - 10) + "..." + s.substring(s.length() - 10);
|
||||
}
|
||||
}
|
||||
|
@ -901,14 +901,8 @@
|
||||
white-space: nowrap;
|
||||
font-family: 'Lucida Console', 'Lucida Sans Typewriter', Monaco, monospace;
|
||||
font-size: small;
|
||||
overflow: hidden;
|
||||
width: 80em;
|
||||
}
|
||||
.gerrit-SshHostKeyPanel-KnownHostEntry .gwtexpui-Clippy-Control {
|
||||
display: block;
|
||||
margin-left: 0px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.gerrit-ContributorAgreement-Button {
|
||||
font-weight: bold;
|
||||
|
2
pom.xml
2
pom.xml
@ -49,7 +49,7 @@ limitations under the License.
|
||||
<jgitVersion>0.5.1.51-g96b2e76</jgitVersion>
|
||||
<gwtormVersion>1.1.2</gwtormVersion>
|
||||
<gwtjsonrpcVersion>1.2.1-SNAPSHOT</gwtjsonrpcVersion>
|
||||
<gwtexpuiVersion>1.1.4</gwtexpuiVersion>
|
||||
<gwtexpuiVersion>1.2.0-SNAPSHOT</gwtexpuiVersion>
|
||||
<gwtVersion>2.0.0</gwtVersion>
|
||||
<slf4jVersion>1.5.8</slf4jVersion>
|
||||
<guiceVersion>2.0</guiceVersion>
|
||||
|
Loading…
x
Reference in New Issue
Block a user