231 Commits

Author SHA1 Message Date
Nick Treleaven
21f0715381 Fix \b regex word boundary always matching at start of search 2011-12-25 13:42:19 +00:00
Nick Treleaven
c2481ccb95 Use GRegex matching for Find & Replace commands 2011-12-25 13:23:06 +00:00
Dimitar Zhekov
4ffbd8f9ad split "always wrap search and hide find dialog" pref into "always wrap search" and "hide find dialog" 2011-12-05 21:54:38 +01:00
Colomban Wendling
36ebb1f2b7 Use canonical macros for stock items rather than plain strings
This makes the code more readable, potentially more future-proof (if
the actual string changes) and better style (catches possible typos at
build-time).
2011-10-30 22:01:49 +01:00
Matthew Brush
82146e953f Remove max length limit of 248 characters on search dialogs 2011-10-23 00:41:50 -07:00
Matthew Brush
182bdc3b17 Replace GTK_BIN(...)->child with gtk_bin_get_child(...) 2011-10-11 21:30:28 -07:00
Colomban Wendling
d06e9f4575 Remove $Id$ and $Date$ SVN keywords 2011-10-09 22:57:35 +02:00
Colomban Wendling
5d606ce351 Deprecate ui_widget_set_tooltip_text() in favor of gtk_widget_set_tooltip_text()
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5840 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-06-13 18:41:50 +00:00
Colomban Wendling
d455e83d6e Also use the actual user search in the combo box history
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5833 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-06-03 13:41:00 +00:00
Colomban Wendling
6f9d845181 In messages show the actual text user entered in Find and Replace dialogs
Previously we could put into a message a string where escape sequences
were already translated.

In the code, now we pass the original text together with the one
that is actually searched for.  New `original_text' field was added to
GeanySearchData.  A bug was fixed in document.c:show_replace_summary(): it
did not escape the "No matches found for ..." string.

Patch by Eugene Arshinov, thanks.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5832 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-06-03 13:40:42 +00:00
Colomban Wendling
6e6b4a61fc Make search.c:on_replace_dialog_response() a little more readable
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5797 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-17 13:47:36 +00:00
Colomban Wendling
a0d6a1f618 Fix pattern filtering when not searching in subdirectories
grep's --include option doesn't filter files passed explicitly to grep,
so when we build the file list to search in, take the filters into
account.
Also drop the --include options in this case since they aren't useful.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5755 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-01 14:38:57 +00:00
Colomban Wendling
e48def3c68 Use project patterns in the FIF dialog
User can now select what kind of file patterns should be used:
 * all: all files are searched
 * project: project patterns are used (only if a project is open)
 * custom: manually entered custom patterns are used

Based on a patch by Jiří Techet, thanks.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5753 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-04-30 21:50:37 +00:00
Nick Treleaven
9cd027ac50 Remove old comment, reorder stash prefs (patch by Dimitar Zhekov, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5701 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-04-08 16:49:38 +00:00
Nick Treleaven
20bab74fd5 Don't auto-enable case-sensitive option when enabling regex in
Find/Replace dialogs.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5695 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-04-05 16:16:47 +00:00
Colomban Wendling
7698bf60a7 Improve usage of G_(UN)?LIKELY()
G_(UN)?LIKELY() should be only used on whole conditional expressions,
and only if the branching is very highly predictable, not if it is only
more probable.

These macros should be used with care because a wrong prediction may
be a lot worst than what a good prediction can give.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5625 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-24 22:00:18 +00:00
Colomban Wendling
4ac3ccbd37 Make Shift-Enter in search dialog and toolbar search entries search backwards
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5621 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-24 16:51:02 +00:00
Colomban Wendling
4cfedde35a Fix a few warnings and style
* Don't use strlen(..) > 0 or == 0, simply check the first character
  against 0;
* Fix a return without a value (my bad in last commit);
* Fix storing a literal in a non-const string.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5610 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-20 16:02:52 +00:00
Enrico Tröger
4f6354d434 Respect saved state of 'Case sensitive' option when using the 'Regular expressions' option as well.
Cleanup.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5575 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-06 14:36:42 +00:00
Enrico Tröger
56cd8dff87 Remember Find and Replace options across restarts (patch by Dimitar Zhekov, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5573 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-06 14:18:05 +00:00
Enrico Tröger
6ac2623208 Update copyright information.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5528 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-01-19 19:39:09 +00:00
Enrico Tröger
de16fda4f6 Fix off-by-one bug in 'search_mark_all'.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5299 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-10-16 12:37:20 +00:00
Nick Treleaven
df6d46d345 Add hidden pref 'find_selection_type' with option to repeat last
search when there's no selection.
Change default Find Selection behaviour to not let the X selection
override the current word (can be confusing).
Add docs for Find Selection commands.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5253 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-09-23 12:22:44 +00:00
Nick Treleaven
1f063b535b Make Find Selected commands repeat the last search if the selection
was lost.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5247 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-09-21 16:25:10 +00:00
Nick Treleaven
ab673d22fd Move find_again() to search.c.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5246 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-09-21 16:16:15 +00:00
Nick Treleaven
98e6efb3b4 Add msgwin_set_messages_dir() to API (patch by Jiří Techet, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5237 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-09-16 15:31:23 +00:00
Nick Treleaven
d840f86a9d Fix some 'possible' NULL pointer dereferences (based on patch by
Erik de Castro Lopo).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5224 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-09-13 15:03:18 +00:00
Nick Treleaven
f2770f94c9 Fix 2 minor leaks.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5217 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-09-09 16:56:42 +00:00
Nick Treleaven
bb2e1cc96e Include all files if the Find in Files pattern field is enabled and
empty.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5195 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-08-24 12:17:33 +00:00
Nick Treleaven
466baa1216 Avoid duplicating string (just for neatness).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5154 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-08-12 17:14:47 +00:00
Frank Lanitz
2364a0d0a3 Fix a memory leak based on input by Daniel Marjamäki. Thanks.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5145 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-08-12 05:49:07 +00:00
Nick Treleaven
67537a9918 Revert (most of) last 2 commits as Grep's --exclude-dir=.?* doesn't seem to be working as expected.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5092 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-07-06 14:20:12 +00:00
Nick Treleaven
ab124475a6 Make Find in Files extra options default to --exclude-dir=.?* to
filter out hidden directories. (Still disabled by default so
non-GNU/older Grep works).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5091 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-07-06 14:01:26 +00:00
Nick Treleaven
1579f306a2 Replace regex flag warning with debug message.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5085 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-07-02 13:54:36 +00:00
Nick Treleaven
ea81430704 Restore tabbing past Find in Files combo box drop down menus.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5067 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-06-28 13:47:14 +00:00
Nick Treleaven
4476a79127 Use ui_hookup_widget() instead of g_object_set_data_full() for
widgets.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5063 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-06-23 16:57:28 +00:00
Nick Treleaven
18f29f6036 Remove unnecessary widget lookups.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5062 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-06-23 16:16:15 +00:00
Nick Treleaven
c3a7b3e126 Add file pattern to combo box history.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5061 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-06-23 16:06:10 +00:00
Nick Treleaven
5b0dc2b8f8 Implement Find in Files file pattern search.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5060 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-06-23 12:34:11 +00:00
Nick Treleaven
a4c31a2156 Add Files checkbox and combo to Find in Files dialog, currently
does nothing & is disabled.
Don't try to focus the next entry on pressing tab anymore as this
is more complicated now.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5059 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-06-22 16:51:01 +00:00
Nick Treleaven
2f5285cb53 Move 2 Find in Files checkboxes for even spacing.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5057 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-06-21 15:16:31 +00:00
Nick Treleaven
8d4d759ab5 Simplify FIF 'Fixed strings, Grep regular expressions, Extended
regular expressions' radio buttons with a 'Use regular expressions'
checkbox. This uses the extended syntax (which is the same as the
Find/Replace regex syntax).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5056 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-06-21 14:57:03 +00:00
Nick Treleaven
94ee5132d2 Put Find in Files Search field above Directory field.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5055 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-06-21 14:27:20 +00:00
Nick Treleaven
c41b55d692 Add ui_combo_box_add_to_history() to API.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5048 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-06-18 12:20:15 +00:00
Nick Treleaven
e2c321b2e2 Only replace template filename matching start of word on saving.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4901 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-11 12:10:31 +00:00
Nick Treleaven
c26dd54a9e Fix search_find_text not returning -1 when match is out of range.
This fixes invalid memory reads and wrong template filename
wildcard replacement.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4898 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-11 11:49:09 +00:00
Nick Treleaven
bf09ed5c48 Fix replacing {filename} template wildcard for custom file
templates with non-default file extension.
Add search_find_text() for POSIX regex searches.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4873 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-05 12:50:59 +00:00
Nick Treleaven
c266895832 Fix replacing '^' regex.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4793 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-03-31 11:53:37 +00:00
Nick Treleaven
5bbd6a30d7 Fix wrong selection range after Replace in Selection.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4784 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-03-25 13:43:37 +00:00
Nick Treleaven
201b595b51 Rename Stash data types to be independently named from Geany (so
Stash can be reused for other projects).
Rename GeanyPrefGroup to StashGroup.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4776 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-03-18 17:04:17 +00:00