Re: [gtk-list] Re: Selection behavior in entries (RFC)
- From: Owen Taylor <owt1 cornell edu>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: Selection behavior in entries (RFC)
- Date: 20 Nov 1997 23:12:26 -0500
Peter Mattis <petm@scam.XCF.Berkeley.EDU> writes:
> 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?
Not until I looked at the source. It's neat though.
> PS Here's a completely untested patch to do the above. I'm pretty sure
> it will compile...
>
...
> - 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))
Seems like this would be simpler as:
if ((entry->selection_start_pos == entry->selection_end_pos) ||
entry->have_selection)
It's not completely reliable under race conditions, but I don't think
that's important here, and anyways, nothing will be unless you
grab the server.
I think some modifications to gtk_selection_received will be necessary
as well.
Off to try it out...
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]