+static void
+refresh_folder_error_handler (ModestMailOperation *mail_op,
+ gpointer user_data)
+{
+ const GError *error = modest_mail_operation_get_error (mail_op);
+
+ if (error->code == TNY_SYSTEM_ERROR_MEMORY ||
+ error->code == TNY_IO_ERROR_WRITE ||
+ error->code == TNY_IO_ERROR_READ) {
+ ModestMailOperationStatus st = modest_mail_operation_get_status (mail_op);
+ /* If the mail op has been cancelled then it's not an error: don't show any message */
+ if (st != MODEST_MAIL_OPERATION_STATUS_CANCELED) {
+ modest_platform_information_banner (NULL, NULL,
+ dgettext("ke-recv",
+ "cerm_device_memory_full"));
+ }
+ }
+}
+