Ejemplo n.º 1
0
void prefs_gpg_remove_skip_encryption_warning(const gchar *systemid)
{
	gchar **systems = NULL;
	int i = 0;
	if (prefs_gpg_get_config()->skip_encryption_warning == NULL)
		return;

	if (prefs_gpg_should_skip_encryption_warning(systemid)) {
		systems = g_strsplit(prefs_gpg_get_config()->skip_encryption_warning,
				",", -1);
		g_free(prefs_gpg_get_config()->skip_encryption_warning);
		prefs_gpg_get_config()->skip_encryption_warning = NULL;

		while (systems && systems[i]) {
			if (!strcmp(systems[i],systemid)) {
				i++;
				continue;
			}
			prefs_gpg_add_skip_encryption_warning(systems[i]);
			i++;
		}
		
		g_strfreev(systems);
	}
	prefs_gpg_save_config();
}
Ejemplo n.º 2
0
static const gchar *pgpinline_get_encrypt_warning(void)
{
    if (prefs_gpg_should_skip_encryption_warning(pgpinline_system.id))
        return NULL;
    else
        return _("Please note that attachments are not encrypted by "
                 "the PGP/Inline system, nor are email headers, like Subject.");
}
Ejemplo n.º 3
0
static const gchar *pgpmime_get_encrypt_warning(void)
{
	if (prefs_gpg_should_skip_encryption_warning(pgpmime_system.id))
		return NULL;
	else
		return _("Please note that email headers, like Subject, "
			 "are not encrypted by the PGP/Mime system.");
}
Ejemplo n.º 4
0
void prefs_gpg_add_skip_encryption_warning(const gchar *systemid)
{
	gchar *tmp = NULL;
	if (prefs_gpg_get_config()->skip_encryption_warning == NULL)
		prefs_gpg_get_config()->skip_encryption_warning =
			g_strdup_printf("%s,", systemid);
	else if (!prefs_gpg_should_skip_encryption_warning(systemid)) {
		tmp = g_strdup_printf("%s%s,",
			prefs_gpg_get_config()->skip_encryption_warning,
			systemid);
		g_free(prefs_gpg_get_config()->skip_encryption_warning);
		prefs_gpg_get_config()->skip_encryption_warning = tmp;
	}
	prefs_gpg_save_config();
}