Re: Gdk selections question



Alexander Larsson <alla lysator liu se> writes:

> The second part would probably work unless this happens as due to the
> first line:
>    gtk_editable_select_region (editable, tmp_pos, tmp_pos);
> -> (editable)->set_selection_bounds (editable, start, end);
> -> gtk_entry_set_selection_bounds (editable, start, end);
> Sets selection_bound and current_pos, then
> -> gtk_entry_update_primary_selection (entry);
> Which does:
>  if (gtk_editable_get_selection_bounds (GTK_EDITABLE (entry), &start, &end))
>   blah
>  else
>   if (gtk_clipboard_get_owner (clipboard) == G_OBJECT (entry))
>    gtk_clipboard_clear (clipboard);
> 
> The else part is taken, since there is no selection, and
> gtk_clipboard_clear () does:
> gtk_selection_owner_set (NULL, clipboard->selection, time);
> 
> This means the primary selection is owned by NULL (none) when the
> gtk_entry_paste() is reached, and the paste just doesn't happen.
> 
> But pasting to the same entry the selection is in works in the X
> version. Why?

Why do you think it works? My observation is middle-button pasting
from GtkEntry isn't at working at all right now. (Even from 
one entry to another.)

I'll take a look at this when I get back from travelling Sunday.

For now, I'd use GtkTextView as your test case; that seems to
work properly.

Regards,
                                        Owen




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