diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-08-30 18:21:48 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-08-30 21:23:25 -0400 |
commit | 1b6f73401960cbacf8c76f9c7411836a1ab286fd (patch) | |
tree | cfda7bc995253a138f87fe8e14464601e9e6b18a /tests/testappchooser.c | |
parent | cd284da79427ad5eea2ddd902ae5f7370dde5980 (diff) | |
download | gtk+-1b6f73401960cbacf8c76f9c7411836a1ab286fd.tar.gz |
tests: Stop using radio buttons
Use grouped check buttons.
Diffstat (limited to 'tests/testappchooser.c')
-rw-r--r-- | tests/testappchooser.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/testappchooser.c b/tests/testappchooser.c index f5abdde70c..a3418dd34b 100644 --- a/tests/testappchooser.c +++ b/tests/testappchooser.c @@ -81,9 +81,9 @@ prepare_dialog (void) gboolean use_file = FALSE; char *content_type = NULL; - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (radio_file))) + if (gtk_check_button_get_active (GTK_CHECK_BUTTON (radio_file))) use_file = TRUE; - else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (radio_content))) + else if (gtk_check_button_get_active (GTK_CHECK_BUTTON (radio_content))) use_file = FALSE; if (use_file) @@ -208,9 +208,11 @@ main (int argc, char **argv) g_signal_connect (file_l, "clicked", G_CALLBACK (button_clicked), NULL); - radio_file = gtk_radio_button_new_with_label (NULL, "Use GFile"); - radio_content = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (radio_file), - "Use content type"); + radio_file = gtk_check_button_new_with_label ("Use GFile"); + radio_content = gtk_check_button_new_with_label ("Use content type"); + gtk_check_button_set_group (GTK_CHECK_BUTTON (radio_content), GTK_CHECK_BUTTON (radio_file)); + gtk_check_button_set_group (GTK_CHECK_BUTTON (radio_file), GTK_CHECK_BUTTON (radio_content)); + gtk_check_button_set_active (GTK_CHECK_BUTTON (radio_file), TRUE); gtk_grid_attach (GTK_GRID (grid), radio_file, 0, 1, 1, 1); |