/* passphrase.c - GTK+ based passphrase callback
- * Copyright (C) 2001-2013 Werner Koch (dd9jn) and the Claws Mail team
+ * Copyright (C) 2001-2016 Werner Koch (dd9jn) and the Claws Mail 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
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
*/
#ifdef HAVE_CONFIG_H
gtk_window_set_default_size(GTK_WINDOW(window), 375, 100);
gtk_window_set_resizable(GTK_WINDOW(window), TRUE);
gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
+ gtk_window_set_type_hint(GTK_WINDOW(window), GDK_WINDOW_TYPE_HINT_DIALOG);
gtk_window_set_modal(GTK_WINDOW(window), TRUE);
g_signal_connect(G_OBJECT(window), "delete_event",
G_CALLBACK(passphrase_deleted), NULL);
*(strchr(my_uid, '>')) = ')';
if (new_key == 1) {
- buf = g_strdup_printf (_("<span weight=\"bold\" size=\"larger\">%sPlease enter the passphrase for the new key:</span>\n\n"
- "%.*s\n"),
+ buf = g_strdup_printf (g_strconcat("<span weight=\"bold\" size=\"larger\">%s",
+ _("Please enter the passphrase for the new key:"),
+ "</span>\n\n%.*s\n", NULL),
prev_bad ?
_("Passphrases did not match.\n") : "",
linelen (my_uid), my_uid);
} else if (new_key == 2) {
- buf = g_strdup_printf (_("<span weight=\"bold\" size=\"larger\">Please re-enter the passphrase for the new key:</span>\n\n"
- "%.*s\n"),
+ buf = g_strdup_printf (g_strconcat("<span weight=\"bold\" size=\"larger\">",
+ _("Please re-enter the passphrase for the new key:"),
+ "</span>\n\n%.*s\n", NULL),
linelen (my_uid), my_uid);
} else {
- buf = g_strdup_printf (_("<span weight=\"bold\" size=\"larger\">%sPlease enter the passphrase for:</span>\n\n"
- "%.*s\n"),
+ buf = g_strdup_printf (g_strconcat("<span weight=\"bold\" size=\"larger\">%s",
+ _("Please enter the passphrase for:"),
+ "</span>\n\n%.*s\n", NULL),
prev_bad ?
_("Bad passphrase.\n") : "",
linelen (my_uid), my_uid);
pass = g_strdup(last_pass);
else {
gpgmegtk_set_passphrase_grab (prefs_gpg_get_config()->passphrase_grab);
- debug_print ("%% requesting passphrase for '%s'\n ", uid_hint);
+ debug_print ("%% requesting passphrase for '%s'\n", uid_hint);
pass = passphrase_mbox (uid_hint, passphrase_hint, prev_bad, FALSE);
gpgmegtk_free_passphrase();
if (!pass) {
debug_print ("%% cancel passphrase entry\n");
if (write(fd, "\n", 1) != 1)
- debug_print("short write");
+ debug_print("short write\n");
return GPG_ERR_CANCELED;
}
}
#else
if (write(fd, pass, strlen(pass)) != strlen(pass))
- debug_print("Short write");
+ debug_print("short write\n");
if (write(fd, "\n", 1) != 1)
- debug_print("Short write");
+ debug_print("short write\n");
#endif
g_free(pass);