- if (prefs_common.work_offline) {
- gchar *cmd = g_strdup_printf("gpg --recv-keys %s", sig->fpr);
+ gchar *cmd = g_strdup_printf("gpg --no-tty --recv-keys %s", sig->fpr);
+ AlertValue val = G_ALERTDEFAULT;
+ if (!prefs_common.work_offline) {
+ val = alertpanel(_("Key import"),
+ _("This key is not in your keyring. Do you want "
+ "Sylpheed-Claws to try and import it from a "
+ "keyserver?"),
+ GTK_STOCK_NO, "+" GTK_STOCK_YES, NULL);
+ GTK_EVENTS_FLUSH();
+ }
+ if (val == G_ALERTDEFAULT) {
+ TEXTVIEW_INSERT(_("\n Key ID "));
+ TEXTVIEW_INSERT(sig->fpr);
+ TEXTVIEW_INSERT(":\n\n");