comparison src/gtkutils.c @ 4793:677d3cb193a1

[gaim-migrate @ 5113] this removes all the remaining deprecated glib, gdk, gdk-pixbuf, and gtk function calls. Hopefully I didn't break anything. Most of this is due to the deprecation of g_strcasecmp and g_strncasecmp. Two functions I never thought would be deprecated, but apparently they're no good at comparing utf8 text. g_ascii_str{,n}casecmp is OK when you're sure that it's ASCII. Otherwise, we're supposed to use g_utf8_collate(), except that it is case sensitive. Since glib doesn't currently have a case-insensitive one, I wrote one. If you need to compare utf8 text, you can use gaim_utf8_strcasecmp(). I have to go do dishes now. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sun, 16 Mar 2003 00:01:49 +0000
parents 283fb289c510
children a9a831508b43
comparison
equal deleted inserted replaced
4792:9212d1c5b7dc 4793:677d3cb193a1
163 return FALSE; 163 return FALSE;
164 164
165 b1 = gtk_text_buffer_get_text(buffer, &start1, &start2, FALSE); 165 b1 = gtk_text_buffer_get_text(buffer, &start1, &start2, FALSE);
166 b2 = gtk_text_buffer_get_text(buffer, &end1, &end2, FALSE); 166 b2 = gtk_text_buffer_get_text(buffer, &end1, &end2, FALSE);
167 167
168 if (!g_strncasecmp(b1, s1, strlen(s1)) && 168 if (!g_ascii_strncasecmp(b1, s1, strlen(s1)) &&
169 !g_strncasecmp(b2, s2, strlen(s2))) { 169 !g_ascii_strncasecmp(b2, s2, strlen(s2))) {
170 170
171 if (really) { 171 if (really) {
172 GtkTextMark *m_end1, *m_end2; 172 GtkTextMark *m_end1, *m_end2;
173 173
174 m_end1= gtk_text_buffer_create_mark(buffer, "m1", &end1, TRUE); 174 m_end1= gtk_text_buffer_create_mark(buffer, "m1", &end1, TRUE);