Re:Center text



Pelaez Valdes Canek wrote:
>         Yeah, in fact I'm using that right now, but I dont like it.
> 
>         And I want that the view area "jump" to the  point in question, not
> scrolling to it.
 
So do I !

Last month, this problem was already raised (Subject: GtkText: annoying
scroll):
Some Guy wrote:
> 
>   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.

Marc wrote:
> I recently posted a question on this subject but no-one answered... 

--  
Marc
** ERROR **: sigsegv caught



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