+static void _display_queue_error(ComposeQueueResult val)
+{
+ switch (val) {
+ case COMPOSE_QUEUE_SUCCESS:
+ break;
+ case COMPOSE_QUEUE_ERROR_NO_MSG:
+ alertpanel_error(_("Could not queue message."));
+ break;
+ case COMPOSE_QUEUE_ERROR_WITH_ERRNO:
+ alertpanel_error(_("Could not queue message:\n\n%s."),
+ g_strerror(errno));
+ break;
+ case COMPOSE_QUEUE_ERROR_SIGNING_FAILED:
+ alertpanel_error(_("Could not queue message for sending:\n\n"
+ "Signature failed: %s"), privacy_get_error());
+ break;
+ case COMPOSE_QUEUE_ERROR_ENCRYPT_FAILED:
+ alertpanel_error(_("Could not queue message for sending:\n\n"
+ "Encryption failed: %s"), privacy_get_error());
+ break;
+ case COMPOSE_QUEUE_ERROR_CHAR_CONVERSION:
+ alertpanel_error(_("Could not queue message for sending:\n\n"
+ "Charset conversion failed."));
+ break;
+ case COMPOSE_QUEUE_ERROR_NO_ENCRYPTION_KEY:
+ alertpanel_error(_("Could not queue message for sending:\n\n"
+ "Couldn't get recipient encryption key."));
+ break;
+ default:
+ /* unhandled error */
+ debug_print("oops, unhandled compose_queue() return value %d\n",
+ val);
+ break;
+ }
+}
+