|
|
|
@ -1291,25 +1291,31 @@ void on_logrotate_save(GtkWidget *, dictionary *dict){
|
|
|
|
|
}
|
|
|
|
|
int create_active = gtk_combo_box_get_active(GTK_COMBO_BOX(window->CreateLogCombo));
|
|
|
|
|
if (create_active){
|
|
|
|
|
char *rule = (char*)gtk_entry_get_text(GTK_ENTRY(window->CreateLogEntry));
|
|
|
|
|
char *rule_user = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->CreateLogUserCombo));
|
|
|
|
|
char *rule_group = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->CreateGroupCombo));
|
|
|
|
|
if (yon_char_is_empty(rule)){
|
|
|
|
|
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
|
yon_ubl_status_highlight_incorrect(window->CreateLogEntry);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (yon_char_is_empty(rule_user)){
|
|
|
|
|
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
|
yon_ubl_status_highlight_incorrect(window->CreateLogUserCombo);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (yon_char_is_empty(rule_group)){
|
|
|
|
|
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
|
yon_ubl_status_highlight_incorrect(window->CreateGroupCombo);
|
|
|
|
|
return;
|
|
|
|
|
if (create_active==1){
|
|
|
|
|
create = "nocreate";
|
|
|
|
|
} else if (create_active==2){
|
|
|
|
|
char *rule = (char*)gtk_entry_get_text(GTK_ENTRY(window->CreateLogEntry));
|
|
|
|
|
char *rule_user = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->CreateLogUserCombo));
|
|
|
|
|
char *rule_group = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->CreateGroupCombo));
|
|
|
|
|
if (yon_char_is_empty(rule)){
|
|
|
|
|
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
|
yon_ubl_status_highlight_incorrect(window->CreateLogEntry);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (yon_char_is_empty(rule_user)){
|
|
|
|
|
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
|
yon_ubl_status_highlight_incorrect(window->CreateLogUserCombo);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (yon_char_is_empty(rule_group)){
|
|
|
|
|
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
|
yon_ubl_status_highlight_incorrect(window->CreateGroupCombo);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
create = yon_char_unite("create ", rule," ",rule_user," ",rule_group,NULL);
|
|
|
|
|
} else if (create_active==3){
|
|
|
|
|
create = "nocopytruncate";
|
|
|
|
|
}
|
|
|
|
|
create = yon_char_unite("create ", rule," ",rule_user," ",rule_group,NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
char *commandline = yon_char_unite(period,
|
|
|
|
|