From 0e44acbb2fec928a1606dc60f427a148fff405c9 Mon Sep 17 00:00:00 2001
From: Mohamed Ragab <moragab@gmail.com>
Date: Wed, 02 May 2012 11:15:01 -0400
Subject: [PATCH] Added a script to facilitate setting the proxy host and port and no proxy hosts, and then it concatenates all the java system properties for setting the java proxy configurations and puts the resulting string in an environment variable JAVA_PROXY_CONFIG, modified the scirpts gitblit,  gitblit-ubuntu, and gitblit-centos to source the java-proxy-config.sh script and then include the resulting java proxy configuration in the java command

---
 src/com/gitblit/client/SearchDialog.java |   31 +++++++++++++++++++------------
 1 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/src/com/gitblit/client/SearchDialog.java b/src/com/gitblit/client/SearchDialog.java
index cf17116..628a209 100644
--- a/src/com/gitblit/client/SearchDialog.java
+++ b/src/com/gitblit/client/SearchDialog.java
@@ -16,6 +16,7 @@
 package com.gitblit.client;
 
 import java.awt.BorderLayout;
+import java.awt.Cursor;
 import java.awt.FlowLayout;
 import java.awt.Insets;
 import java.awt.Rectangle;
@@ -91,8 +92,7 @@
 		this.gitblit = gitblit;
 		this.isSearch = isSearch;
 		setTitle(Translation.get(isSearch ? "gb.search" : "gb.log"));
-		setIconImage(new ImageIcon(getClass().getResource(
-				isSearch ? "/gitblt-favicon.png" : "/commit_changes_16x16.png")).getImage());
+		setIconImage(new ImageIcon(getClass().getResource("/gitblt-favicon.png")).getImage());
 		initialize();
 		setSize(900, 550);
 	}
@@ -283,19 +283,23 @@
 		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) {
@@ -328,6 +332,7 @@
 		if (isSearch && StringUtils.isEmpty(fragment)) {
 			return;
 		}
+		setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
 		SwingWorker<List<FeedEntryModel>, Void> worker = new SwingWorker<List<FeedEntryModel>, Void>() {
 			@Override
 			protected List<FeedEntryModel> doInBackground() throws IOException {
@@ -341,6 +346,7 @@
 
 			@Override
 			protected void done() {
+				setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
 				try {
 					List<FeedEntryModel> results = get();
 					if (isSearch) {
@@ -360,8 +366,9 @@
 		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);

--
Gitblit v1.9.1