http://qa.mandrakesoft.com/show_bug.cgi?id=3633

           Product: drakxtools
         Component: program
           Summary: gtktext_insert leaves cursor at the end (ugtk2.pm)
           Version: 9.1-26mdk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


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.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

Reply via email to