From a4fdd6b9fb2c58b0c8d28cd0f727a098018b50d9 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Tue, 30 Aug 2022 02:37:41 +0300 Subject: [PATCH 53/53] gtk4: Fix optiondlg check buttons See osdn #45520 Signed-off-by: Marko Lindqvist --- client/gui-gtk-4.0/optiondlg.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/client/gui-gtk-4.0/optiondlg.c b/client/gui-gtk-4.0/optiondlg.c index 94772c007f..21839c648f 100644 --- a/client/gui-gtk-4.0/optiondlg.c +++ b/client/gui-gtk-4.0/optiondlg.c @@ -700,9 +700,9 @@ static void option_dialog_option_remove(struct option_dialog *pdialog, static inline void option_dialog_option_bool_set(struct option *poption, bool value) { - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON - (option_get_gui_data(poption)), - value); + gtk_check_button_set_active(GTK_CHECK_BUTTON + (option_get_gui_data(poption)), + value); } /************************************************************************//** @@ -766,8 +766,8 @@ static inline void option_dialog_option_bitwise_set(struct option *poption, int bit; for (bit = 0; NULL != iter; iter = g_list_next(iter), bit++) { - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(iter->data), - value & (1 << bit)); + gtk_check_button_set_active(GTK_CHECK_BUTTON(iter->data), + value & (1 << bit)); } } @@ -897,8 +897,8 @@ static void option_dialog_option_apply(struct option *poption) switch (option_type(poption)) { case OT_BOOLEAN: - (void) option_bool_set(poption, gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON(w))); + (void) option_bool_set(poption, gtk_check_button_get_active + (GTK_CHECK_BUTTON(w))); break; case OT_INTEGER: @@ -939,7 +939,7 @@ static void option_dialog_option_apply(struct option *poption) int bit; for (bit = 0; NULL != iter; iter = g_list_next(iter), bit++) { - if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(iter->data))) { + if (gtk_check_button_get_active(GTK_CHECK_BUTTON(iter->data))) { value |= 1 << bit; } } -- 2.35.1