Re: [gtk-list] Selection behavior in entries (RFC)
- From: Peter Mattis <petm scam XCF Berkeley EDU>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Selection behavior in entries (RFC)
- Date: Thu, 20 Nov 1997 19:27:59 -0800
Owen Taylor writes:
>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.
I agree with this. If the current selection is active (ie. it is the X
selection) then pasting should insert the selection where the mouse is
clicked. Replacing the active selection with itself seems kinda
silly. However, replacing an inactive selection is something that I
really like being able to do. Anyone ever notice that you can make an
inactive selection by dragging with the third mouse button?
Peter
PS Here's a completely untested patch to do the above. I'm pretty sure
it will compile...
--- gtkentry.c.bak Thu Nov 20 19:29:31 1997
+++ gtkentry.c Thu Nov 20 19:35:59 1997
@@ -719,7 +719,8 @@
{
if (event->button == 2)
{
- if (entry->selection_start_pos == entry->selection_end_pos)
+ if ((entry->selection_start_pos == entry->selection_end_pos) ||
+ (gdk_selection_owner_get (GDK_SELECTION_PRIMARY) == widget->window))
entry->current_pos = gtk_entry_position (entry, event->x + entry->scroll_offset);
gtk_selection_convert (widget, GDK_SELECTION_PRIMARY,
GDK_TARGET_STRING, event->time);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]