|
|
|
|
@ -873,6 +873,11 @@ void on_key_generate_accept(GtkWidget *self, key_creation_window* window){
|
|
|
|
|
const char *email = gtk_entry_get_text(GTK_ENTRY(window->EmailEntry));
|
|
|
|
|
char *strength = yon_char_from_long(gtk_spin_button_get_value(GTK_SPIN_BUTTON(window->KeyStrengthSpin)));
|
|
|
|
|
const char *comment = gtk_entry_get_text(GTK_ENTRY(window->CommentsEntry));
|
|
|
|
|
if (!yon_char_is_empty(name)&&strlen(name)<5){
|
|
|
|
|
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),NAME_SHORT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
|
yon_ubl_status_highlight_incorrect(window->NameEntry);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
GtkWidget *highlight_target=NULL;
|
|
|
|
|
if (yon_char_is_empty(name)){
|
|
|
|
|
highlight_target=window->NameEntry;
|
|
|
|
|
@ -882,8 +887,6 @@ void on_key_generate_accept(GtkWidget *self, key_creation_window* window){
|
|
|
|
|
highlight_target=window->EmailEntry;
|
|
|
|
|
} else if (yon_char_is_empty(strength)){
|
|
|
|
|
highlight_target=window->KeyStrengthSpin;
|
|
|
|
|
} else if (yon_char_is_empty(comment)){
|
|
|
|
|
highlight_target=window->CommentsEntry;
|
|
|
|
|
}
|
|
|
|
|
if (highlight_target){
|
|
|
|
|
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
|
@ -939,6 +942,8 @@ key_creation_window *yon_key_creation_window_new(){
|
|
|
|
|
yon_gtk_entry_set_password_visibility_icon(GTK_ENTRY(window->PasswordConfirmationEntry));
|
|
|
|
|
yon_gtk_entry_set_password_visibility_icon(GTK_ENTRY(window->PasswordEntry));
|
|
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(window->ExpireCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),window->ExpireButton);
|
|
|
|
|
g_signal_connect(G_OBJECT(window->ExpireCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),window->ExpireEntry);
|
|
|
|
|
g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
|
|
|
|
|
g_signal_connect(G_OBJECT(window->ExpireButton),"clicked",G_CALLBACK(on_calendar_open),window);
|
|
|
|
|
g_signal_connect(G_OBJECT(window->AddButton),"clicked",G_CALLBACK(on_key_generate_accept),window);
|
|
|
|
|
@ -954,6 +959,7 @@ key_creation_window *yon_key_creation_window_new(){
|
|
|
|
|
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(window->EncryptionCombo),parsed[2],parsed[0]);
|
|
|
|
|
yon_char_parsed_free(parsed,parsed_size);
|
|
|
|
|
}
|
|
|
|
|
gtk_combo_box_set_active_id(GTK_COMBO_BOX(window->EncryptionCombo),"RSA");
|
|
|
|
|
return window;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|