diff options
author | James Moger <james.moger@gitblit.com> | 2011-11-10 08:10:19 -0500 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2011-11-10 08:10:19 -0500 |
commit | a568f2ac97f4c7b73ee0cdf2007f553bb8c81c2c (patch) | |
tree | 543e4612e26e0bfbff3ae1120beaa7d7badcd42b /src/com/gitblit | |
parent | c7a721aad7c23640d59ad682854e066f4538436c (diff) | |
download | gitblit-a568f2ac97f4c7b73ee0cdf2007f553bb8c81c2c.tar.gz gitblit-a568f2ac97f4c7b73ee0cdf2007f553bb8c81c2c.zip |
Refresh log on display. Adjusted spacing of status panel.
Diffstat (limited to 'src/com/gitblit')
-rw-r--r-- | src/com/gitblit/client/SearchDialog.java | 25 | ||||
-rw-r--r-- | src/com/gitblit/client/StatusPanel.java | 6 |
2 files changed, 18 insertions, 13 deletions
diff --git a/src/com/gitblit/client/SearchDialog.java b/src/com/gitblit/client/SearchDialog.java index 0f25e9a0..88864a91 100644 --- a/src/com/gitblit/client/SearchDialog.java +++ b/src/com/gitblit/client/SearchDialog.java @@ -284,19 +284,23 @@ public class SearchDialog extends JFrame { contentPanel.add(controls, BorderLayout.SOUTH);
setLayout(new BorderLayout());
add(contentPanel, BorderLayout.CENTER);
- if (isSearch) {
- addWindowListener(new WindowAdapter() {
- @Override
- public void windowOpened(WindowEvent event) {
+ addWindowListener(new WindowAdapter() {
+ @Override
+ public void windowOpened(WindowEvent event) {
+ if (isSearch) {
searchFragment.requestFocus();
+ } else {
+ search(0);
}
+ }
- @Override
- public void windowActivated(WindowEvent event) {
+ @Override
+ public void windowActivated(WindowEvent event) {
+ if (isSearch) {
searchFragment.requestFocus();
}
- });
- }
+ }
+ });
}
public void selectRepository(RepositoryModel repository) {
@@ -363,8 +367,9 @@ public class SearchDialog extends JFrame { tableModel.entries.clear();
tableModel.entries.addAll(entries);
tableModel.fireTableDataChanged();
- setTitle(Translation.get(isSearch ? "gb.search" : "gb.log") + ": " + text + " ("
- + entries.size() + (page > 0 ? (", pg " + (page + 1)) : "") + ")");
+ setTitle(Translation.get(isSearch ? "gb.search" : "gb.log")
+ + (StringUtils.isEmpty(text) ? "" : (": " + text)) + " (" + entries.size()
+ + (page > 0 ? (", pg " + (page + 1)) : "") + ")");
header.setText(getTitle());
if (pack) {
Utils.packColumns(table, Utils.MARGIN);
diff --git a/src/com/gitblit/client/StatusPanel.java b/src/com/gitblit/client/StatusPanel.java index 669aa47a..f22d69c8 100644 --- a/src/com/gitblit/client/StatusPanel.java +++ b/src/com/gitblit/client/StatusPanel.java @@ -106,15 +106,15 @@ public class StatusPanel extends JPanel { propertiesTable.setRowHeight(nameRenderer.getFont().getSize() + 8);
propertiesTable.getColumn(name).setCellRenderer(nameRenderer);
- JPanel centerPanel = new JPanel(new BorderLayout());
+ JPanel centerPanel = new JPanel(new BorderLayout(Utils.MARGIN, Utils.MARGIN));
centerPanel.add(fieldsPanel, BorderLayout.NORTH);
centerPanel.add(new JScrollPane(propertiesTable), BorderLayout.CENTER);
- JPanel controls = new JPanel();
+ JPanel controls = new JPanel(new FlowLayout(FlowLayout.CENTER, Utils.MARGIN, 0));
controls.add(refreshStatus);
header = new HeaderPanel(Translation.get("gb.status"), "health_16x16.png");
- setLayout(new BorderLayout());
+ setLayout(new BorderLayout(Utils.MARGIN, Utils.MARGIN));
add(header, BorderLayout.NORTH);
add(centerPanel, BorderLayout.CENTER);
add(controls, BorderLayout.SOUTH);
|