~vish/ubuntu/maverick/pidgin/bug25979

« back to all changes in this revision

Viewing changes to pidgin/gtksourceiter.c

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-10-09 19:40:26 UTC
  • mfrom: (1.4.1 upstream) (46.1.10 karmic)
  • Revision ID: james.westby@ubuntu.com-20091009194026-wbqqh0bsbz19nx5q
Tags: 1:2.6.2-1ubuntu7
* Don't stick the buddy list window to all desktops as some
  window managers have trouble to properly unstick it (LP: #346840)
  - debian/patches/11_buddy_list_really_show.patch
* Always use default tray icon size on KDE (LP: #209440)
  - debian/patches/62_tray_icon_size_kde.patch
* Use scrollbars in the preferences dialog if the screen height is
  below 700 px instead of 600 px
  - debian/patches/60_1024x600_gtkprefs.c.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- 
 
1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
2
2
 *  gtksourceiter.c
3
3
 *
4
4
 *  Pidgin is the legal property of its developers, whose names are too numerous
7
7
 *
8
8
 *  The following copyright notice applies to this file:
9
9
 *
10
 
 *  Copyright (C) 2000 - 2005 Paolo Maggi 
 
10
 *  Copyright (C) 2000 - 2005 Paolo Maggi
11
11
 *  Copyright (C) 2002, 2003 Jeroen Zwartepoorte
12
12
 *
13
13
 *  This program is free software; you can redistribute it and/or modify
206
206
 
207
207
finally_2:
208
208
        g_free (normalized_s1);
209
 
        g_free (normalized_s2); 
 
209
        g_free (normalized_s2);
210
210
 
211
211
        return ret;
212
212
}
247
247
                {
248
248
                        /* being UTF8 correct sucks; this accounts for extra
249
249
                           offsets coming from canonical decompositions of
250
 
                           UTF8 characters (e.g. accented characters) which 
 
250
                           UTF8 characters (e.g. accented characters) which
251
251
                           g_utf8_normalize() performs */
252
252
                        gchar *normal;
253
253
                        gchar buffer[6];
530
530
 * @match_start: return location for start of match, or %%NULL.
531
531
 * @match_end: return location for end of match, or %%NULL.
532
532
 * @limit: bound for the search, or %%NULL for the end of the buffer.
533
 
 * 
534
 
 * Searches forward for @str. Any match is returned by setting 
535
 
 * @match_start to the first character of the match and @match_end to the 
 
533
 *
 
534
 * Searches forward for @str. Any match is returned by setting
 
535
 * @match_start to the first character of the match and @match_end to the
536
536
 * first character after the match. The search will not continue past
537
537
 * @limit. Note that a search is a linear or O(n) operation, so you
538
538
 * may wish to use @limit to avoid locking up your UI on large
539
539
 * buffers.
540
 
 * 
 
540
 *
541
541
 * If the #GTK_SOURCE_SEARCH_VISIBLE_ONLY flag is present, the match may
542
542
 * have invisible text interspersed in @str. i.e. @str will be a
543
543
 * possibly-noncontiguous subsequence of the matched range. similarly,
550
550
 *
551
551
 * Same as gtk_text_iter_forward_search(), but supports case insensitive
552
552
 * searching.
553
 
 * 
 
553
 *
554
554
 * Return value: whether a match was found.
555
555
 **/
556
556
gboolean
574
574
        if ((flags & GTK_SOURCE_SEARCH_CASE_INSENSITIVE) == 0)
575
575
                return gtk_text_iter_forward_search (iter, str, flags,
576
576
                                                     match_start, match_end,
577
 
                                                     limit); 
 
577
                                                     limit);
578
578
 
579
579
        if (limit && gtk_text_iter_compare (iter, limit) >= 0)
580
580
                return FALSE;
650
650
 * @match_start: return location for start of match, or %%NULL.
651
651
 * @match_end: return location for end of match, or %%NULL.
652
652
 * @limit: location of last possible @match_start, or %%NULL for start of buffer.
653
 
 * 
 
653
 *
654
654
 * Same as gtk_text_iter_backward_search(), but supports case insensitive
655
655
 * searching.
656
 
 * 
 
656
 *
657
657
 * Return value: whether a match was found.
658
658
 **/
659
659
gboolean
677
677
        if ((flags & GTK_SOURCE_SEARCH_CASE_INSENSITIVE) == 0)
678
678
                return gtk_text_iter_backward_search (iter, str, flags,
679
679
                                                      match_start, match_end,
680
 
                                                      limit); 
 
680
                                                      limit);
681
681
 
682
682
        if (limit && gtk_text_iter_compare (iter, limit) <= 0)
683
683
                return FALSE;