2006-01-31 [cleroy] 2.0.0cvs3
[claws.git] / src / plugins / pgpcore / passphrase.c
index 85c0a595ea3f9cfe65540349e48bec64dfc5ac44..93a3b776cd36395029b560c024ce9ca8f1d99098 100644 (file)
@@ -1,5 +1,5 @@
 /* passphrase.c - GTK+ based passphrase callback
- *      Copyright (C) 2001 Werner Koch (dd9jn)
+ *      Copyright (C) 2001-2006 Werner Koch (dd9jn) and the Sylpheed-Claws team
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -131,8 +131,9 @@ passphrase_mbox(const gchar *uid_hint, const gchar *pass_hint, gint prev_bad)
     gtk_entry_set_visibility(GTK_ENTRY(pass_entry), FALSE);
     gtk_widget_grab_focus(pass_entry);
 
-    gtkut_stock_button_set_create(&confirm_box, &ok_button, GTK_STOCK_OK,
+    gtkut_stock_button_set_create(&confirm_box, 
                                  &cancel_button, GTK_STOCK_CANCEL,
+                                 &ok_button, GTK_STOCK_OK,
                                  NULL, NULL);
     gtk_box_pack_end(GTK_BOX(vbox), confirm_box, FALSE, FALSE, 0);
     gtk_widget_grab_default(ok_button);
@@ -196,7 +197,8 @@ try_again:
     if (pass_ack) {
         const gchar *entry_text;
         entry_text = gtk_entry_get_text(GTK_ENTRY(pass_entry));
-        if (entry_text) /* Hmmm: Do we really need this? */
+       the_passphrase = g_locale_from_utf8(entry_text, -1, NULL, NULL, NULL);
+        if (the_passphrase == NULL) 
             the_passphrase = g_strdup (entry_text);
     }
     gtk_widget_destroy (window);