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

Loading…
Cancel
Save