idok-commit AT lists.psi.ch
Subject: Commit emails of the iDok project
List archive
- From: "AFS account Florian Huebner" <huebner AT savannah.psi.ch>
- To: idok-commit AT lists.psi.ch
- Subject: [idok-commit] idok commit r181 - trunk/java/ch/idok/qtgui
- Date: Thu, 21 Aug 2008 14:07:47 +0200
- List-archive: <https://lists.web.psi.ch/pipermail/idok-commit/>
- List-id: Commit emails of the iDok project <idok-commit.lists.psi.ch>
Author: huebner
Date: Thu Aug 21 14:07:47 2008
New Revision: 181
Log:
Fixed Bug #IDO-40: Search expression wrong message
Modified:
trunk/java/ch/idok/qtgui/SearchController.java
Modified: trunk/java/ch/idok/qtgui/SearchController.java
==============================================================================
--- trunk/java/ch/idok/qtgui/SearchController.java (original)
+++ trunk/java/ch/idok/qtgui/SearchController.java Thu Aug 21 14:07:47
2008
@@ -67,6 +67,10 @@
private final List<String> header_ = new ArrayList<String>();
private final QProgressDialog progress_;
+
+ private String searchFolder = "";
+
+ private String searchTime = "";
/*
* this hashmap is filled with all "top level" entries. all later entries
@@ -139,10 +143,22 @@
ui_.dmsDirWidget.setCursor(BUSYCURSOR);
ui_.searchTreeWidget.clear();
ui_.searchTreeWidget.setHeaderLabels(header_);
- searchComboBox_.setEditText(shortSearchExpression);
+// searchComboBox_.setEditText(shortSearchExpression);
+
+ if (shortSearchExpression.equals("Enter search expression...")) {
+ shortSearchExpression = "";
+ }
+
+ if (!searchTime.equals("") && shortSearchExpression.equals("")) {
+ shortSearchExpression = searchTime;// +" AND " +
shortSearchExpression;
+ }else if (!searchTime.equals("") &&
!shortSearchExpression.equals("")) {
+ shortSearchExpression = searchTime +" AND " +
shortSearchExpression;
+ }
String searchExpression = repoC_.getCurrentProjectName() + "/"
+ repoC_.getCurrentRepoName() + "::" + shortSearchExpression;
+
+ searchTime = "";
if (metaData.equals("")) {
int number = 0;
@@ -232,7 +248,7 @@
ui_.dmsDirWidget.unsetCursor();
ui_.searchTreeWidget.unsetCursor();
-
+ searchFolder= "";
}
/**
@@ -251,6 +267,10 @@
// history
QTreeWidgetItem newItem;
+ if
(!searchFolder.equals("")&&!(searchFolder.startsWith(filePath.split("/")[0])))
{
+ return null;
+ }
+
if (allTopSearchResults_.containsKey(filePath)) {
newItem = new
QTreeWidgetItem(allTopSearchResults_.get(filePath));
allTopSearchResults_.get(filePath).setChildIndicatorPolicy(
@@ -347,13 +367,14 @@
}
private final void prepareSearchWithinFolder(String folder) {
- String searchString;
- if (folder.equals("")) {
- searchString = "";
- } else {
- searchString = "auto\\:relpath:" + folder + "* AND ";
- }
- searchComboBox_.setEditText(searchString);
+// String searchString;
+// if (folder.equals("")) {
+// searchString = "";
+// } else {
+// searchString = "auto\\:relpath:" + folder + "* AND ";
+// }
+// searchComboBox_.setEditText(searchString);
+ searchFolder = folder;
searchComboBox_.setFocus();
}
@@ -363,11 +384,13 @@
String searchString;
searchString = "svn\\:entry\\:committed-date:[" + fromDate + " TO "
+ toDate + "]";
- if (!folder.equals("")) {
- searchString = "auto\\:relpath:" + folder + "* AND " +
searchString;
- }
- searchComboBox_.setEditText(searchString);
- searchComboBox_.setFocus();
+// if (!folder.equals("")) {
+// searchString = "auto\\:relpath:" + folder + "* AND " +
searchString;
+// }
+// searchComboBox_.setEditText(searchString);
+ searchFolder = folder;
+ searchTime = searchString;
+// searchComboBox_.setFocus();
startSearch();
}
- [idok-commit] idok commit r181 - trunk/java/ch/idok/qtgui, AFS account Florian Huebner, 08/21/2008
Archive powered by MHonArc 2.6.19.