GtkTextView and move-cursor signal.



I'm developing a simple notepad type application (mostly for my own personal use) using GTK+ 2 and the GtkTextView widget. I added a status bar which shows the current file, what line the cursor is on, the total number of lines in the file, and the file's size. All is working pretty well, but the one minor bug I see is that clicking on the text view to move the cursor won't update the status bar with the new line information. I beleive this is because clicking to move the cursor apparently doesn't emit the "move-cursor" signal where are moving it using the keyboard does? Is this the expected behavior or is it possibly a bug? I tried searching for bugs related to this, but the only thing I found was something talking about a new algorithm for how to keep track of where the cursor is and how it should work with scrolling.

If you want an example of what I am talking about, you can download my editor's code from here and compile it: http://kicken.mine.nu:8008/LNote.tar.gz

There is a make file include and it should work ok without much need to edit it. I could also try and write a smaller example if someone thinks it's necessary.


However if this is the expcted behaviour, then how should I update the status bar when the cursor is moved with the mouse? Should I just capture the button-press or similar event and use that?

--
Keith Maika
http://kicken.mine.nu:8008/  - Personal Site.
http://wiser.kicks-ass.org:8008/  - Long-term Project.
http://www.fsf.org/philosophy/can-you-trust.html - Can you trust your computer? http://www.fsf.org/philosophy/no-word-attachments.html - Support Free Communication.



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