From 78f9776b2bff1d4580d0e341c3f81e63dcb4d040 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Tue, 17 Dec 2024 10:52:23 +0600 Subject: [PATCH] Fixed parameter saving --- source/ubl-settings-update.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/ubl-settings-update.c b/source/ubl-settings-update.c index c14bef6..23ea47f 100644 --- a/source/ubl-settings-update.c +++ b/source/ubl-settings-update.c @@ -51,8 +51,12 @@ void on_toggle_button_toggled(GtkWidget *self, main_window *widgets){ } else if (self == widgets->UpdateIntervalDefaultCheck||self == widgets->UpdateIntervalSpin|| self == widgets->UpdateIntervalCombo || self == widgets->BootCheck){ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->UpdateIntervalDefaultCheck))){ - yon_config_remove_by_key(AUTOUPDATE_interval); - } else { + yon_config_remove_by_key(AUTOUPDATE_interval); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->BootCheck),0); + } else if (!gtk_spin_button_get_value(GTK_SPIN_BUTTON(widgets->UpdateIntervalSpin))){ + yon_config_remove_by_key(AUTOUPDATE_interval); + + } else { char *int_str = yon_char_from_long(gtk_spin_button_get_value(GTK_SPIN_BUTTON(widgets->UpdateIntervalSpin))); char *interval = ""; if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->BootCheck))) interval = "boot";