Skip to Content.
Sympa Menu

idok-commit - [idok-commit] idok commit r202 - trunk/java/ch/idok/qtgui

idok-commit AT lists.psi.ch

Subject: Commit emails of the iDok project

List archive

[idok-commit] idok commit r202 - trunk/java/ch/idok/qtgui


Chronological Thread 
  • From: "AFS account Florian Huebner" <huebner AT savannah.psi.ch>
  • To: idok-commit AT lists.psi.ch
  • Subject: [idok-commit] idok commit r202 - trunk/java/ch/idok/qtgui
  • Date: Tue, 2 Sep 2008 11:57:34 +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: Tue Sep 2 11:57:34 2008
New Revision: 202

Log:
Fixed the "Number of documents found:" display while searching for documents

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 Tue Sep 2 11:57:34
2008
@@ -71,6 +71,8 @@
private String searchFolder = "";

private String searchTime = "";
+
+ private int numberOfResults;

/*
* this hashmap is filled with all "top level" entries. all later entries
@@ -136,6 +138,7 @@
DmsCredentials cred =
GuiClientHandler.getInstance().getCredentials();
if (cred == null)
return;
+ numberOfResults = 0;
// search either for next virtual folder structure or for
// documents which are inside the leaf folders
// Only then further metadata fields like author need to be fetched
@@ -161,7 +164,6 @@
searchTime = "";

if (metaData.equals("")) {
- int number = 0;
ui_.browseTabWidget.setCurrentIndex(1);
ui_.searchTreeWidget.setSortingEnabled(false);
try {
@@ -179,16 +181,13 @@
QueryMatch m = it.nextElement();
allTopSearchResults_ = new HashMap<String,
QTreeWidgetItem>();
while (m != null) {
- number++;
QTreeWidgetItem row = fillDocumentRow(m);
if (row != null)
ui_.searchTreeWidget.addTopLevelItem(row);

- if ((number % 10) == 0) {
- progress_.setValue(number);
- progress_.setLabelText("Documents found:" + number);
+ if ((numberOfResults % 10) == 0) {
ui_.numberOfDocumentsLabel
- .setText("Number of documents found: " +
number);
+ .setText("Number of documents found: " +
numberOfResults);
}
QApplication.processEvents();
if (progress_.wasCanceled()) {
@@ -205,7 +204,7 @@

} finally {
ui_.numberOfDocumentsLabel
- .setText("Number of documents found: " + number);
+ .setText("Number of documents found: " +
numberOfResults);
progress_.reset();
for (int i = 0; i < ui_.searchTreeWidget.columnCount(); i++)
{
ui_.searchTreeWidget.resizeColumnToContents(i);
@@ -281,6 +280,10 @@
allTopSearchResults_.put(filePath, newItem);
topLevelItem = true;
}
+ numberOfResults += 1;
+ progress_.setValue(numberOfResults);
+ progress_.setLabelText("Documents found:" + numberOfResults);
+
newItem.setText(0, filePath);
// keep track of document via its repository path using column 0 item




  • [idok-commit] idok commit r202 - trunk/java/ch/idok/qtgui, AFS account Florian Huebner, 09/02/2008

Archive powered by MHonArc 2.6.19.

Top of Page