Re: Middle click paste in St.Entry
- From: Emmanuele Bassi <ebassi gmail com>
- To: Florian Müllner <fmuellner gnome org>
- Cc: gnome-shell-list <gnome-shell-list gnome org>
- Subject: Re: Middle click paste in St.Entry
- Date: Tue, 8 Jul 2014 18:34:19 +0100
except that the source actor in the event will be wrong, and if I
added a check for that inside clutter_actor_event() (something which
would make sense for me to add) then you'd get a warning and the event
would be rejected.
you'd have to synthesize a new event from the one passed, though to be
fair that's be a fairly evil thing to do.
if you want to handle middle-click-to-paste by middle-clicking
anywhere other than an entry (something I honestly don't think would
be good to have), then you should connect to the button-release-event
on that other actor, and do what StEntry does when it receives a
middle click. maybe even add a method to StEntry to paste the contents
from a specific clipboard into its text buffer.
ciao,
Emmanuele.
On 8 July 2014 17:47, Florian Müllner <fmuellner gnome org> wrote:
On Tue, Jul 8, 2014 at 6:31 PM, Sam Bull <sam hacking sent com> wrote:
Ah, that makes sense. Is there any way that might be fixed? When
clicking anywhere else on the note, the code is simply:
this._box.connect('button-press-event', function () {
clutterText.grab_key_focus();
});
Is there any way to propagate the middle click through?
Not very pretty, but something like this should work:
this._box.connect('button-press-event', function (actor, event) {
clutterText.event(event, false);
});
_______________________________________________
gnome-shell-list mailing list
gnome-shell-list gnome org
https://mail.gnome.org/mailman/listinfo/gnome-shell-list
--
W: http://www.emmanuelebassi.name
B: http://blogs.gnome.org/ebassi/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]