Re: [gedit-list] getting cursor position



Il giorno mer, 18/10/2006 alle 10.05 +0200, Frederic Back ha scritto:
> Hello,
> 
> I started hacking on the class browser plugin again, and I am currently
> stuck with the following problem:
> 
> I would like to highlight the class the cursor is currently positioned
> at in the class browser. I tried to get the current cursor position by
> connecting to the view's "cursor-changed" signal, but it seems that it
> is emitted only when I move the cursor with the keyboard and not with
> the mouse.
> 
> Does somebody know how to reliably get the cursor position without
> polling the buffer?

You can connect to the 'notify' signal and watch the "cursor-position"
property of the buffer.


ciao
	Paolo

>  And if not, do you think that setting a timeout to
> get the current position is legitimate in this case?
> 
> Thanks!
> Fred
> 
> _______________________________________________
> gedit-list mailing list
> gedit-list gnome org
> http://mail.gnome.org/mailman/listinfo/gedit-list




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