summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Möhn <richard.moehn@fu-berlin.de>2014-10-27 18:43:56 +0100
committerDavid Pursehouse <david.pursehouse@sonymobile.com>2014-11-13 01:16:38 +0000
commit2b68c20a2a8bf8361ca958001ee6c4dc4a1eb846 (patch)
tree900b44ba1e3edb264a2cc9ebddcb305af0649532
parent08314c5fcbf6ae5dc62a946099ae0a94233d1d67 (diff)
SideBySide2: Show file name in window title again
In the old side by side diff screen, the name of the file being diffed was shown in the window title. For some reason the code that set the window title wasn't adopted from PatchScreen into SideBySide2. Put the setting of the window title back in. Put it into onInitUI(), since this was the place where it had first stood in PatchScreen. SideBySide2 already displays the path on the page, so leave out the setPageTitle() from PatchScreen, because this would display that path again. Also don't obtain the file name by finding the last slash with lastIndexOf() and then taking the substring from there, but use FileInfo.getFileName() instead. Searching for "lastIndexOf('/')" in the whole project gives quite some occurences. I thought reusing something might be a good idea. Bug: Issue 2960 Change-Id: I12a280b8a437b60e4e2f779b81072117d45a1505
-rw-r--r--gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/SideBySide2.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/SideBySide2.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/SideBySide2.java
index 881bcec888..20d4d69fe9 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/SideBySide2.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/SideBySide2.java
@@ -142,6 +142,7 @@ public class SideBySide2 extends Screen {
protected void onInitUI() {
super.onInitUI();
setHeaderVisible(false);
+ setWindowTitle(FileInfo.getFileName(path));
}
@Override