コード例 #1
0
ファイル: pgpinline.c プロジェクト: buzz/claws
static void pgpinline_inhibit_encrypt_warning(gboolean inhibit)
{
    if (inhibit)
        prefs_gpg_add_skip_encryption_warning(pgpinline_system.id);
    else
        prefs_gpg_remove_skip_encryption_warning(pgpinline_system.id);
}
コード例 #2
0
ファイル: prefs_gpg.c プロジェクト: Mortal/claws
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();
}