예제 #1
0
void sgpgme_check_create_key(void)
{
	if (prefs_gpg_get_config()->gpg_ask_create_key &&
	    !sgpgme_has_secret_key()) {
		sgpgme_create_secret_key(NULL, TRUE);
	} else {
		prefs_gpg_get_config()->gpg_ask_create_key = FALSE;
		prefs_gpg_save_config();
	}	
}
예제 #2
0
파일: prefs_gpg.c 프로젝트: Mortal/claws
static void prefs_gpg_update_sens(struct GPGAccountPage *page)
{
	gboolean active;
	active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->key_custom));
	if (sgpgme_has_secret_key()) {
		gtk_widget_hide(page->new_key_box);
		gtk_widget_set_sensitive(page->key_default, TRUE);
		gtk_widget_set_sensitive(page->key_by_from, TRUE);
		gtk_widget_set_sensitive(page->key_custom, TRUE);
		gtk_widget_set_sensitive(page->keyid, active);
		gtk_widget_set_sensitive(page->keyid_label, active);
	} else {
		gtk_widget_show(page->new_key_box);
		gtk_widget_set_sensitive(page->key_default, FALSE);
		gtk_widget_set_sensitive(page->key_by_from, FALSE);
		gtk_widget_set_sensitive(page->key_custom, FALSE);
		gtk_widget_set_sensitive(page->keyid, FALSE);
		gtk_widget_set_sensitive(page->keyid_label, FALSE);
	}
}