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(); }
Yeah, this always annoyed me as well.. Thanks for the patch! :) (Btw, you have seen the nifty rightclick menu option for grep, right? Much easier than to copy and paste yourself..)
Subject: Re: Grep tool focuses to last active field rather than to pattern field Yep - but copy/paste behavior is hard to unlearn. BTW - it might be reasonable to remove the few references to IGNORE_SCM_DIRS (the #define and a few #ifdef) - the patch I had sent in to implement that mechanism had these to make the code a bit more obvious when I opened it in the editor - they probably shouldn't have made it into the source pool. Also, I'm looking at adding a menu item (so I can create a shortcut) that opens the grep dialog with the text currently in the copy buffer as the pattern to search for (so I can copy, then invoke grep and have the text already in the pattern string - much like the context menu). Should I send that in when complete? Thanks,Bill Jens Dagerbo <jens.dagerbo@swipnet.se> wrote:------- You are receiving this mail because: ------- You reported the bug, or are watching the reporter. http://bugs.kde.org/show_bug.cgi?id=57965 jens.dagerbo@swipnet.se changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED ------- Additional Comments From jens.dagerbo@swipnet.se 2003-05-01 16:57 ------- Yeah, this always annoyed me as well.. Thanks for the patch! :) (Btw, you have seen the nifty rightclick menu option for grep, right? Much easier than to copy and paste yourself..) --------------------------------- Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo.<DIV>Yep - but copy/paste behavior is hard to unlearn. BTW - it might be reasonable to remove the few references to IGNORE_SCM_DIRS (the #define and a few #ifdef) - the patch I had sent in to implement that mechanism had these to make the code a bit more obvious when I opened it in the editor - they probably shouldn't have made it into the source pool.</DIV> <DIV> </DIV> <DIV>Also, I'm looking at adding a menu item (so I can create a shortcut) that opens the grep dialog with the text currently in the copy buffer as the pattern to search for (so I can copy, then invoke grep and have the text already in the pattern string - much like the context menu). Should I send that in when complete?</DIV> <DIV> </DIV> <DIV>Thanks,</DIV> <DIV>Bill<BR><BR><B><I>Jens Dagerbo <jens.dagerbo@swipnet.se></I></B> wrote:</DIV> <BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">------- You are receiving this mail because: -------<BR>You reported the bug, or are watching the reporter.<BR><BR>http://bugs.kde.org/show_bug.cgi?id=57965 <BR>jens.dagerbo@swipnet.se changed:<BR><BR>What |Removed |Added<BR>----------------------------------------------------------------------------<BR>Status|UNCONFIRMED |RESOLVED<BR>Resolution| |FIXED<BR><BR><BR><BR>------- Additional Comments From jens.dagerbo@swipnet.se 2003-05-01 16:57 -------<BR>Yeah, this always annoyed me as well.. Thanks for the patch! :) <BR><BR>(Btw, you have seen the nifty rightclick menu option for grep, right? Much easier than <BR>to copy and paste yourself..)</BLOCKQUOTE><p><hr SIZE=1> Do you Yahoo!?<br> <a href="http://us.rd.yahoo.com/search/mailsig/*http://search.yahoo.com">The New Yahoo! Search</a> - Faster. Easier. Bingo.