From ad1c126d5109f1c6b768b8048da71f888a8d6821 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Thu, 9 Sep 2010 18:13:09 +0200 Subject: [PATCH] improve simple search entry tooltips --- src/qtgui/ssearch_w.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/qtgui/ssearch_w.cpp b/src/qtgui/ssearch_w.cpp index 5711aac4..62ebb2c2 100644 --- a/src/qtgui/ssearch_w.cpp +++ b/src/qtgui/ssearch_w.cpp @@ -79,10 +79,37 @@ void SSearch::searchTextChanged(const QString& text) void SSearch::searchTypeChanged(int typ) { LOGDEB(("Search type now %d\n", typ)); + // Adjust context help if (typ == SST_LANG) HelpClient::installMap(this->name(), "RCL.SEARCH.LANG"); else HelpClient::installMap(this->name(), "RCL.SEARCH.SIMPLE"); + + // Also fix tooltips + switch (typ) { + case SST_LANG: + queryText->setToolTip( +"Enter query language expression. Cheat sheet:
\n" +"term1 term2 : 'term1' and 'term2' in any field.
\n" +"field:term1 : 'term1' in field 'field'.
\n" +" Standard field names/synonyms:
\n" +" title/subject/caption, author/from, recipient/to, filename, ext.
\n" +" Pseudo-fields: dir, mime/format, type/rclcat.
\n" +"term1 term2 OR term3 : term1 AND (term2 OR term3).
\n" +" No actual parentheses allowed.
\n" +"\"term1 term2\" : phrase (must occur exactly). Possible modifiers:
\n" +"\"term1 term2\"p : unordered proximity search with default distance.
\n" +"Use Show Query link when in doubt about result and see manual (<F1>) for more detail.\n" + ); + break; + case SST_FNM: + queryText->setToolTip("Enter file name wildcard expression."); + break; + case SST_ANY: + case SST_ALL: + default: + queryText->setToolTip("Enter search terms here. Type ESC SPC for completions of current term."); + } } void SSearch::startSimpleSearch()