gtk_text_iter_[forward/backward]_search needs a case insensitive search
- From: Mikael Hermansson <tyan linux se>
- To: gtk-devel-list gnome org
- Cc: hp redhat com
- Subject: gtk_text_iter_[forward/backward]_search needs a case insensitive search
- Date: Sat, 6 Oct 2001 18:49:29 +0200
how about adding gboolean is_case_sensitive flags to:
gtk_text_iter_[forward/backward]_search?
Here is a patch:
Index: gtk+/gtk/gtktextiter.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtktextiter.c,v
retrieving revision 1.51
diff -r1.51 gtktextiter.c
4089a4090
> gboolean is_case_sensitive,
4132c4133
< if (match_start) /* if this is the first line we're matching */
---
> if (match_start && is_case_sensitive) /* if this is the first line
we're matching */
4133a4135,4136
> else if (match_start)
> found = strcasestr(line_text, *lines);
4139c4142,4144
< if (strncmp (line_text, *lines, strlen (*lines)) == 0)
---
> if (is_case_sensitive && strncmp (line_text, *lines, strlen
(*lines)) == 0)
> found = line_text;
> else if (g_ascii_strncasecmp (line_text, *lines, strlen (*lines))
== 0)
4183c4188
< return lines_match (&next, lines, visible_only, slice, NULL,
match_end);
---
> return lines_match (&next, lines, visible_only, slice,
is_case_sensitive, NULL, match_end);
4247a4253
> * @is_case_sensitive if FALSE both "TesT" and "TEST" will match
4262a4269
> gboolean is_case_sensitive,
4319c4326
< visible_only, slice, &match, &end))
---
> visible_only, slice, is_case_sensitive, &match,
&end))
4567a4575
> * @is_case_sensitive if FALSE both "TesT" and "TEST" will match
4580a4589
> gboolean is_case_sensitive,
Index: gtk+/gtk/gtktextiter.h
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtktextiter.h,v
retrieving revision 1.31
diff -r1.31 gtktextiter.h
240a241
> gboolean
is_case_sensitive,
248a250
> gboolean
is_case_sensitive,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]