[Bug 57965] New: Grep tool focuses to last active field rather than to pattern field
Bill Davenport
bdavnpt2002 at yahoo.com
Thu May 1 15:57:06 UTC 2003
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=57965
Summary: Grep tool focuses to last active field rather than to
pattern field
Product: kdevelop
Version: unspecified
Platform: Compiled Sources
OS/Version: Linux
Status: UNCONFIRMED
Severity: wishlist
Priority: NOR
Component: general
AssignedTo: kdevelop-devel at kdevelop.org
ReportedBy: bdavnpt2002 at yahoo.com
Version: Snapshot 20030501 (using KDE KDE 3.1)
Installed from: Compiled From Sources
Compiler: gcc 3.2
OS: Linux
I find the grep dialog less usefull than it could be. My work habit is to pick up a text string (into the copy buffer) and then invoke the grep dialog box. My expectation is to be able to paste the search string and hit enter, but the dialog box doesn't automatically focus on the pattern field.
I've put together a small patch that causes the grep dialog box to focus on the pattern field when it is brought up:
diff -urN kdevelop-20030501/parts/grepview/grepdlg.h kdevelop-20030501-modified/parts/grepview/grepdlg.h
--- kdevelop-20030501/parts/grepview/grepdlg.h 2003-04-05 20:55:16.000000000 -0500
+++ kdevelop-20030501-modified/parts/grepview/grepdlg.h 2003-05-01 09:55:11.000000000 -0400
@@ -42,6 +42,8 @@
{ return files_combo->currentText(); }
QString directoryString() const
{ return dir_combo->currentText(); }
+ void setFocusPattern()
+ { pattern_combo->setFocus(); }
bool recursiveFlag() const
{ return recursive_box->isChecked(); }
#ifdef IGNORE_SCM_DIRS
diff -urN kdevelop-20030501/parts/grepview/grepviewwidget.cpp kdevelop-20030501-modified/parts/grepview/grepviewwidget.cpp
--- kdevelop-20030501/parts/grepview/grepviewwidget.cpp 2003-04-29 21:55:17.000000000 -0400
+++ kdevelop-20030501-modified/parts/grepview/grepviewwidget.cpp 2003-05-01 09:55:18.000000000 -0400
@@ -116,6 +116,7 @@
void GrepViewWidget::showDialog()
{
+ grepdlg->setFocusPattern();
grepdlg->show();
}
More information about the KDevelop-devel
mailing list