Thread: case sensitivity in GtkTextView

  1. #1
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300

    case sensitivity in GtkTextView

    When applying a text search with gtk+ 2.0 in a GtkTextView widget using gtk_text_iter_forward_search, the search is always case sensitive. Does anyone know how to change this?

    According to all the documentation I could dig up, the third argument to _forward_search is "gtk-text-search-flags" (a bitmask) but all the examples I've found set this to zero. What flags are there/what could they mean? I can't see any other means of modifying the search within the function call.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  2. #2
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    Hmmm. According to the DOCS case-sensitivity flags are possible in the future.

  3. #3
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Yes, i found this somewhere too:
    Code:
    /* Possible future plans: SEARCH_CASE_INSENSITIVE, SEARCH_REGEXP */
    In the end I just wrote a non-gtk function with "strcasestr" to feed character positions from the text buffer to gtk_text_buffer_get_iter_at_offset.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How can I make this code more elegant?
    By ejohns85 in forum C++ Programming
    Replies: 3
    Last Post: 04-02-2009, 08:55 AM
  2. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  3. Base converter libary
    By cdonlan in forum C++ Programming
    Replies: 22
    Last Post: 05-15-2005, 01:11 AM
  4. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  5. Converting Numbers to Words
    By denizengt in forum C Programming
    Replies: 20
    Last Post: 11-05-2003, 09:19 PM

Tags for this Thread