GtkText: annoying scroll



  I saw a question in the archives about a search+replace function, to
scroll to a certain point when a string is found.  The answer posted was
to just do a insert_text/delete_text combo where the string was found.
There are two problems with this solution: one, if the text is frozen,
this doesn't work. Two, instead of just zipping down to where the text is
inserted, it scrolls (which can take quite a long time if there is a lot
of text between the current point and the insertion point). 
  I looked through the gtktext.c source, and found a static function
find_line_at_point, which is called by gtk_text_insert_text if the text is
unfrozen. My question is, why is this function static? It seems like a
very valuable function, and if it were available to use by an application
it would really help with stuff like search+replace (there is even a flag
to set whether it scrolls to the line or just zaps right there!).  Can
this function be made public in the next gtk release, or at least a
wrapper function? It would be very useful.

Thanks for listening
---
Matt Perry [guy@mikepery.linuxos.org]

Reporter (to Mahatma Gandhi): Mr Gandhi, what do you think of Western
        Civilization?
Gandhi: I think it would be a good idea.
---



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]