pull/2/head
Ivan Yartsev 2 years ago
parent 850cac908c
commit 6c993474ce

@ -517,13 +517,13 @@ void on_journald_save(GtkWidget *self, journald_window *window){
char *storage;
int storage_active = gtk_combo_box_get_active(GTK_COMBO_BOX(window->LogStorageCombo));
switch (storage_active){
case 0: storage="auto";
case 1: storage="auto";
break;
case 1: storage="volatile";
case 2: storage="volatile";
break;
case 2: storage="persistent";
case 3: storage="persistent";
break;
case 3: storage="none";
case 4: storage="none";
break;
}
@ -561,6 +561,10 @@ void on_journald_save(GtkWidget *self, journald_window *window){
}
if (amount>0)
yon_config_register(JOURNALD("RateLimitIntervalSec"),"logging",yon_char_from_long(interval));
} else {
yon_config_remove_by_key(JOURNALD("RateLimitBurst"));
yon_config_remove_by_key(JOURNALD("RateLimitIntervalSec"));
}
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->LogSizeMaxCheck))){
@ -572,7 +576,8 @@ void on_journald_save(GtkWidget *self, journald_window *window){
}
if (logssize>0)
yon_config_register(JOURNALD("SystemMaxUse"),"logging",yon_char_from_long(logssize));
}
} else
yon_config_remove_by_key(JOURNALD("SystemMaxUse"));
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->RotationSizeMaxCheck))){
char * rotationMaxSize;
@ -582,7 +587,8 @@ void on_journald_save(GtkWidget *self, journald_window *window){
rotationMaxSize = yon_char_append(yon_char_from_long(maxsize),modif);
if (maxsize>0)
yon_config_register(JOURNALD("SystemMaxFileSize"),"logging",rotationMaxSize);
}
} else
yon_config_remove_by_key(JOURNALD("SystemMaxFileSize"));
long storagefree;
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->LogFreeSpaceCheck))){
@ -593,7 +599,8 @@ void on_journald_save(GtkWidget *self, journald_window *window){
if (storagefree>0)
yon_config_register(JOURNALD("SystemKeepFree"),"logging",storagespace);
}
} else
yon_config_remove_by_key(JOURNALD("SystemKeepFree"));
int consoleforwardactive = gtk_combo_box_get_active(GTK_COMBO_BOX(window->RedirectCombo));
char *confor=NULL;
@ -610,8 +617,10 @@ void on_journald_save(GtkWidget *self, journald_window *window){
int forwardempty = gtk_combo_box_get_active(GTK_COMBO_BOX(window->ForwardedTypeCombo));
yon_config_register(JOURNALD("Storage"),"logging",storage);
if (storage_active!=0)
yon_config_register(JOURNALD("Storage"),"logging",storage);
else
yon_config_remove_by_key(JOURNALD("Storage"));
if (compress_active!=0)
yon_config_register(JOURNALD("Compress"),"logging",compress);
else

Loading…
Cancel
Save