summaryrefslogtreecommitdiff
path: root/tests/testlockbutton.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-08-30 19:36:27 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-08-30 21:23:25 -0400
commit2c5c938f0d2bfdc60d351142eb4afa97d055986c (patch)
treec35fddc4cc1d05bf4c39d4249bd336e33d386512 /tests/testlockbutton.c
parentcfade230ced9a28f1aefe4982790109406a6b578 (diff)
downloadgtk+-2c5c938f0d2bfdc60d351142eb4afa97d055986c.tar.gz
Clean up uses of gtk_toggle_button_get/set_active
Replace all uses on check buttons by the corresponding check button api.
Diffstat (limited to 'tests/testlockbutton.c')
-rw-r--r--tests/testlockbutton.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/testlockbutton.c b/tests/testlockbutton.c
index 9832bb53cf..ff7599b65f 100644
--- a/tests/testlockbutton.c
+++ b/tests/testlockbutton.c
@@ -180,10 +180,10 @@ update_clicked (GtkButton *button, GtkLockButton *lockbutton)
permission = gtk_lock_button_get_permission (lockbutton);
- allowed = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (allowed_button));
- can_acquire = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (can_acquire_button));
- can_release = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (can_release_button));
- success = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (success_button));
+ allowed = gtk_check_button_get_active (GTK_CHECK_BUTTON (allowed_button));
+ can_acquire = gtk_check_button_get_active (GTK_CHECK_BUTTON (can_acquire_button));
+ can_release = gtk_check_button_get_active (GTK_CHECK_BUTTON (can_release_button));
+ success = gtk_check_button_get_active (GTK_CHECK_BUTTON (success_button));
g_permission_impl_update (permission, allowed, can_acquire, can_release);
g_test_permission_set_success (G_TEST_PERMISSION (permission), success);
}
@@ -202,9 +202,9 @@ permission_changed (GPermission *permission,
"can-release", &can_release,
NULL);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (allowed_button), allowed);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (can_acquire_button), can_acquire);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (can_release_button), can_release);
+ gtk_check_button_set_active (GTK_CHECK_BUTTON (allowed_button), allowed);
+ gtk_check_button_set_active (GTK_CHECK_BUTTON (can_acquire_button), can_acquire);
+ gtk_check_button_set_active (GTK_CHECK_BUTTON (can_release_button), can_release);
gtk_widget_set_sensitive (content, allowed);
}