idok-commit AT lists.psi.ch
Subject: Commit emails of the iDok project
List archive
- From: "Apache" <apache AT savannah.psi.ch>
- To: idok-commit AT lists.psi.ch
- Subject: [idok-commit] idok commit r152 - trunk/java/ch/idok/qtgui
- Date: Mon, 28 Jul 2008 15:09:56 +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 AT PSI.CH
Date: Mon Jul 28 15:09:56 2008
New Revision: 152
Log:
Added improvement IDO-117: Automatically override "Enter search expression"
text
Modified:
trunk/java/ch/idok/qtgui/MainWindow.java
Modified: trunk/java/ch/idok/qtgui/MainWindow.java
==============================================================================
--- trunk/java/ch/idok/qtgui/MainWindow.java (original)
+++ trunk/java/ch/idok/qtgui/MainWindow.java Mon Jul 28 15:09:56 2008
@@ -54,7 +54,6 @@
import com.trolltech.qt.gui.QScrollArea;
import com.trolltech.qt.gui.QToolBar;
import com.trolltech.qt.gui.QTreeWidgetItem;
-import com.trolltech.qt.gui.QAction.ActionEvent;
import com.trolltech.qt.gui.QKeySequence.StandardKey;
/**
@@ -143,6 +142,8 @@
private QAction openAdvancedSearchAction_;
private VirtualFolderController vfc_;
+
+ private Boolean firstSearchChange_;
/**
* Currently open repository
@@ -536,6 +537,8 @@
searchComboBox_.setInsertPolicy(QComboBox.InsertPolicy.InsertAtTop);
searchComboBox_.setEditText(tr("Enter search expression..."));
+ searchComboBox_.editTextChanged.connect(this, "clearSearchBox()");
+ firstSearchChange_ = true;
searchAction_ = new QAction(Icons.SEARCHICON, "Search", this);
searchAction_
@@ -553,6 +556,15 @@
openAdvancedSearchAction_.setEnabled(false);
}
+
+ private void clearSearchBox(){
+ if (firstSearchChange_) {
+ String temp =
searchComboBox_.currentText().substring(searchComboBox_.currentText().length()-1);
+ searchComboBox_.clearEditText();
+ searchComboBox_.setEditText(temp);
+ firstSearchChange_ = false;
+ }
+ }
private void createMenus() {
autoCommit_ = new QCheckBox(tr("Auto Commit"));
- [idok-commit] idok commit r152 - trunk/java/ch/idok/qtgui, Apache, 07/28/2008
Archive powered by MHonArc 2.6.19.