Entries emptiness checks

pull/129/head
Ivan Yartsev 6 months ago
parent 1cb7ae472e
commit e950ee0dd0

@ -1117,6 +1117,11 @@ void on_logrotate_save(GtkWidget *, dictionary *dict){
rotate_count = yon_char_append("rotate ",yon_char_from_long(fileamount));
if (active==2){
const char *text = gtk_entry_get_text(GTK_ENTRY(window->FileAmountEntry));
if (yon_char_is_empty(text)){
yon_ubl_status_box_spawn(window->StatusBox,EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(window->FileAmountEntry);
return;
}
olddir=yon_char_unite("olddir ",text,NULL);
}
}
@ -1189,7 +1194,12 @@ void on_logrotate_save(GtkWidget *, dictionary *dict){
int original_active = gtk_combo_box_get_active(GTK_COMBO_BOX(window->SaveOriginalCombo));
if (original_active==1){
char *ext_file = (char*)gtk_entry_get_text(GTK_ENTRY(window->SaveOriginalEntry));
char *ext_file = (char*)gtk_entry_get_text(GTK_ENTRY(window->SaveOriginalEntry));
if (yon_char_is_empty(ext_file)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(window->SaveOriginalEntry);
return;
}
extension = yon_char_append("extension ",ext_file);
}

@ -666,6 +666,7 @@
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can-focus">True</property>
<property name="placeholder-text" translatable="yes">0</property>
</object>
<packing>
<property name="expand">False</property>

Loading…
Cancel
Save