]> source.dussan.org Git - gitblit.git/commitdiff
Refresh log on display. Adjusted spacing of status panel.
authorJames Moger <james.moger@gitblit.com>
Thu, 10 Nov 2011 13:10:19 +0000 (08:10 -0500)
committerJames Moger <james.moger@gitblit.com>
Thu, 10 Nov 2011 13:10:19 +0000 (08:10 -0500)
src/com/gitblit/client/SearchDialog.java
src/com/gitblit/client/StatusPanel.java

index 0f25e9a0117e524a9c91cc3c3ecbbd6bf02a4baa..88864a919a51f9f2ea8c0f51a28448aab5f6511a 100644 (file)
@@ -284,19 +284,23 @@ public class SearchDialog extends JFrame {
                contentPanel.add(controls, BorderLayout.SOUTH);\r
                setLayout(new BorderLayout());\r
                add(contentPanel, BorderLayout.CENTER);\r
-               if (isSearch) {\r
-                       addWindowListener(new WindowAdapter() {\r
-                               @Override\r
-                               public void windowOpened(WindowEvent event) {\r
+               addWindowListener(new WindowAdapter() {\r
+                       @Override\r
+                       public void windowOpened(WindowEvent event) {\r
+                               if (isSearch) {\r
                                        searchFragment.requestFocus();\r
+                               } else {\r
+                                       search(0);\r
                                }\r
+                       }\r
 \r
-                               @Override\r
-                               public void windowActivated(WindowEvent event) {\r
+                       @Override\r
+                       public void windowActivated(WindowEvent event) {\r
+                               if (isSearch) {\r
                                        searchFragment.requestFocus();\r
                                }\r
-                       });\r
-               }\r
+                       }\r
+               });\r
        }\r
 \r
        public void selectRepository(RepositoryModel repository) {\r
@@ -363,8 +367,9 @@ public class SearchDialog extends JFrame {
                tableModel.entries.clear();\r
                tableModel.entries.addAll(entries);\r
                tableModel.fireTableDataChanged();\r
-               setTitle(Translation.get(isSearch ? "gb.search" : "gb.log") + ": " + text + " ("\r
-                               + entries.size() + (page > 0 ? (", pg " + (page + 1)) : "") + ")");\r
+               setTitle(Translation.get(isSearch ? "gb.search" : "gb.log")\r
+                               + (StringUtils.isEmpty(text) ? "" : (": " + text)) + " (" + entries.size()\r
+                               + (page > 0 ? (", pg " + (page + 1)) : "") + ")");\r
                header.setText(getTitle());\r
                if (pack) {\r
                        Utils.packColumns(table, Utils.MARGIN);\r
index 669aa47a5ffe04328610d42a2789c24497c2609a..f22d69c8a69134e7f57abbf7e6068234a4b3cb60 100644 (file)
@@ -106,15 +106,15 @@ public class StatusPanel extends JPanel {
                propertiesTable.setRowHeight(nameRenderer.getFont().getSize() + 8);\r
                propertiesTable.getColumn(name).setCellRenderer(nameRenderer);\r
 \r
-               JPanel centerPanel = new JPanel(new BorderLayout());\r
+               JPanel centerPanel = new JPanel(new BorderLayout(Utils.MARGIN, Utils.MARGIN));\r
                centerPanel.add(fieldsPanel, BorderLayout.NORTH);\r
                centerPanel.add(new JScrollPane(propertiesTable), BorderLayout.CENTER);\r
 \r
-               JPanel controls = new JPanel();\r
+               JPanel controls = new JPanel(new FlowLayout(FlowLayout.CENTER, Utils.MARGIN, 0));\r
                controls.add(refreshStatus);\r
 \r
                header = new HeaderPanel(Translation.get("gb.status"), "health_16x16.png");\r
-               setLayout(new BorderLayout());\r
+               setLayout(new BorderLayout(Utils.MARGIN, Utils.MARGIN));\r
                add(header, BorderLayout.NORTH);\r
                add(centerPanel, BorderLayout.CENTER);\r
                add(controls, BorderLayout.SOUTH);\r