http://qa.mandrakesoft.com/show_bug.cgi?id=3633
[EMAIL PROTECTED] changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |
------- Additional Comments From [EMAIL PROTECTED] 2003-04-02 12:26 -------
As far as the line of code I posted erasing the buffer, oops. That's not what I
intended. I'm
trying to do whatever move the insertion point/cursor back to the beginning.
No, gtktext_insert isn't playing with a "scrollbar" directly, it doesn't know for sure
it's in a
ScrolledWindow or anything, the problem is where it's leaving the cursor/insertion
point. It'll
leave it after the text it inserts, so when you go to the window, it'll be scrolled to
the bottom
because of that. If you click near the top, that won't happen anymore, so that's how
I can
confirm that this is the cause.
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
------- Reminder: -------
assigned_to: [EMAIL PROTECTED]
status: REOPENED
creation_date:
description:
ugtk2 should probably be a Product component choice in Bugzilla. Oh well, onward with
the
bug.
If you use gtktext_insert to create an information window (say a gtk TextView inside
of a
ScrolledWindow) it will leave the cursor at the end, so if you view your window, often
it'll appear
scrolled all the way to the bottom, rather than the top which is usually what's
desired.
I propose adding:
$textview->get_buffer->set_text('', 0);
near the end of the function (after text has been added to the TextView). I'm
actually not sure if
that should be a 0 or a 1, but you get the idea. I'm moving the cursor back to the
beginning of
the TextView.
I can't think of a reason that this behavior would be undesired, because if you wanted
the cursor
at the end for the next insert, you'd just use the provided gtktext_append function
anyway. The
only thing I can think of is, if you're doing appends, you might to leave the cursor
at the end in
the case, so maybe the line I added should only be if you're not in append mode.