gtk: Allow pasting using the mouse.
authorWerner Koch <wk@gnupg.org>
Fri, 24 Oct 2014 14:20:20 +0000 (16:20 +0200)
committerWerner Koch <wk@gnupg.org>
Sun, 26 Oct 2014 10:02:44 +0000 (11:02 +0100)
commit4f4af9056d1c100aa53363f019253160cd8d9ff0
tree44a40f3fdd1d9b3b04286808037443dbc5645047
parent2ef788fb5dce2e49fa925264802388f4c002cd31
gtk: Allow pasting using the mouse.

* gtk+-2/gtksecentry.h (_GtkSecureEntry): Add fields insert_pos,
real_changed, cand change_count.
(_GtkSecureEntryClass): Add field paste_clipboard.
* gtk+-2/gtksecentry.c (PASTE_CLIPBOARD): New.
(gtk_secure_entry_class_init): Set paste_clipboard and create
paste-clipboard signal.
(gtk_secure_entry_button_press): Call gtk_secure_entry_pase.
(begin_change, end_change, emit_changed): New.
(gtk_secure_entry_real_insert_text): Use emit_changed.
(gtk_secure_entry_real_delete_text): Ditto.
(paste_received, gtk_secure_entry_paste)
(gtk_secure_entry_paste_clipboard): New.
--

The new code as been taken from gtk 2.20.1.

I have not figured out why the keybindings for C-v and s-Insert do not
work.
gtk+-2/gtksecentry.c
gtk+-2/gtksecentry.h
gtk+-2/pinentry-gtk-2.c