Selection behavior in entries (RFC)




I've noticed a rather strange thing about how pasting works
in text entries.

GTK text entries are different from Motif entries in that
text can be selected (in gray, not blue) even if the widget
doesn't own the X selection. 

When text is selected and the 2nd mouse button is pressed,
the text replaces the current (active or inactive)
selection, if there is one.  If not it is inserted where the
insertion cursor is.

In contrast, in Motif entries, the text is always inserted
where the 2nd mouse button is pressed. (The cursor is
moved there before insertion). To me this is a more natural
behavior. But the worst thing about the current GTK behavior
is that it is impossible to cut and paste within a single
entry and have any effect. (Try it!)

My inclination is to change things to match the Motif behavior,
except in the case where there is a current _inactive_
selection, in which case the new text will replace the
inactive selection.

The other possibilities would be to leave things as they 
are, except in the case of an _active_ selection, or
to match the Motif behavior completely. 

Comments?
                                        Owen





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