Created
June 6, 2014 13:10
-
-
Save brb/26ac8fb849ab9ac69d15 to your computer and use it in GitHub Desktop.
a hack to enable paste from clipboard for pinentry (gtk2, based on 0.8.3 vsn). fcks up the security (!)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/gtk+-2/pinentry-gtk-2.c b/gtk+-2/pinentry-gtk-2.c | |
index 421bc02..91a9fbf 100644 | |
--- a/gtk+-2/pinentry-gtk-2.c | |
+++ b/gtk+-2/pinentry-gtk-2.c | |
@@ -186,7 +186,7 @@ button_clicked (GtkWidget *widget, gpointer data) | |
gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (time_out))); | |
#endif | |
- s = gtk_secure_entry_get_text (GTK_SECURE_ENTRY (entry)); | |
+ s = gtk_entry_get_text (GTK_ENTRY (entry)); | |
if (!s) | |
s = ""; | |
passphrase_ok = 1; | |
@@ -255,7 +255,7 @@ changed_text_handler (GtkWidget *widget) | |
if (!qualitybar || !pinentry->quality_bar) | |
return; | |
- s = gtk_secure_entry_get_text (GTK_SECURE_ENTRY (widget)); | |
+ s = gtk_entry_get_text (GTK_ENTRY (widget)); | |
if (!s) | |
s = ""; | |
length = strlen (s); | |
@@ -400,7 +400,9 @@ create_window (int confirm_mode) | |
GTK_FILL, GTK_FILL, 4, 0); | |
} | |
- entry = gtk_secure_entry_new (); | |
+ entry = gtk_entry_new (); | |
+ gtk_entry_set_visibility(GTK_ENTRY(entry), FALSE); | |
+ | |
gtk_widget_set_size_request (entry, 200, -1); | |
g_signal_connect (G_OBJECT (entry), "activate", | |
G_CALLBACK (enter_callback), entry); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment