[file-roller/wip/gtk4: 7/54] gtk4: removed use of gtk_toggle_button_(set|get)_inconsistent




commit b786e7c3ff1ddac47a2e82eab5333b8d8c6a68c1
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Mon Sep 26 23:09:07 2022 +0200

    gtk4: removed use of gtk_toggle_button_(set|get)_inconsistent

 src/dlg-add.c               | 4 ++--
 src/dlg-extract.c           | 4 ++--
 src/dlg-password.c          | 2 +-
 src/fr-new-archive-dialog.c | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/dlg-add.c b/src/dlg-add.c
index 3bbce2fe..c5d1fd4e 100644
--- a/src/dlg-add.c
+++ b/src/dlg-add.c
@@ -292,12 +292,12 @@ sync_widgets_with_options (DialogData *data,
 
        if ((data->window->archive != NULL) && data->window->archive->propAddCanStoreLinks) {
                gtk_widget_set_sensitive (GET_WIDGET ("follow_links_checkbutton"), TRUE);
-               gtk_toggle_button_set_inconsistent (GTK_TOGGLE_BUTTON (GET_WIDGET 
("follow_links_checkbutton")), FALSE);
+               gtk_check_button_set_inconsistent (GTK_CHECK_BUTTON (GET_WIDGET 
("follow_links_checkbutton")), FALSE);
                gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("follow_links_checkbutton")), ! 
no_follow_symlinks);
        }
        else {
                gtk_widget_set_sensitive (GET_WIDGET ("follow_links_checkbutton"), FALSE);
-               gtk_toggle_button_set_inconsistent (GTK_TOGGLE_BUTTON (GET_WIDGET 
("follow_links_checkbutton")), TRUE);
+               gtk_check_button_set_inconsistent (GTK_CHECK_BUTTON (GET_WIDGET 
("follow_links_checkbutton")), TRUE);
        }
 }
 
diff --git a/src/dlg-extract.c b/src/dlg-extract.c
index db9ebb9c..4c58bfca 100644
--- a/src/dlg-extract.c
+++ b/src/dlg-extract.c
@@ -221,10 +221,10 @@ extract_cb_start_extracting (DialogData *data)
 
        fr_window_set_extract_default_dir (window, destination);
 
-       skip_newer = ! gtk_toggle_button_get_inconsistent (GTK_TOGGLE_BUTTON (GET_WIDGET 
("keep_newer_checkbutton"))) && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET 
("keep_newer_checkbutton")));
+       skip_newer = ! gtk_check_button_get_inconsistent (GTK_CHECK_BUTTON (GET_WIDGET 
("keep_newer_checkbutton"))) && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET 
("keep_newer_checkbutton")));
        junk_paths = ! gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET 
("keep_structure_checkbutton")));
 
-       if (! gtk_toggle_button_get_inconsistent (GTK_TOGGLE_BUTTON (GET_WIDGET ("keep_newer_checkbutton"))))
+       if (! gtk_check_button_get_inconsistent (GTK_CHECK_BUTTON (GET_WIDGET ("keep_newer_checkbutton"))))
                g_settings_set_boolean (data->settings, PREF_EXTRACT_SKIP_NEWER, skip_newer);
        g_settings_set_boolean (data->settings, PREF_EXTRACT_RECREATE_FOLDERS, ! junk_paths);
 
diff --git a/src/dlg-password.c b/src/dlg-password.c
index 1f9980b3..08a22327 100644
--- a/src/dlg-password.c
+++ b/src/dlg-password.c
@@ -114,7 +114,7 @@ dlg_password (GtkWidget *widget,
                                      fr_window_get_encrypt_header (window));
 
        if (! fr_archive_is_capable_of (window->archive, FR_ARCHIVE_CAN_ENCRYPT_HEADER)) {
-               gtk_toggle_button_set_inconsistent (GTK_TOGGLE_BUTTON (GET_WIDGET 
("encrypt_header_checkbutton")), TRUE);
+               gtk_check_button_set_inconsistent (GTK_CHECK_BUTTON (GET_WIDGET 
("encrypt_header_checkbutton")), TRUE);
                gtk_widget_set_sensitive (GET_WIDGET ("encrypt_header_checkbutton"), FALSE);
        }
 
diff --git a/src/fr-new-archive-dialog.c b/src/fr-new-archive-dialog.c
index 543b7aab..9739ea31 100644
--- a/src/fr-new-archive-dialog.c
+++ b/src/fr-new-archive-dialog.c
@@ -126,7 +126,7 @@ static void
 _fr_new_archive_dialog_update_sensitivity (FrNewArchiveDialog *self)
 {
        gtk_widget_set_sensitive (gtk_dialog_get_widget_for_response (GTK_DIALOG (self), GTK_RESPONSE_OK), ! 
_g_utf8_all_spaces (gtk_editable_get_text (GTK_EDITABLE (GET_WIDGET ("filename_entry")))));
-       gtk_toggle_button_set_inconsistent (GTK_TOGGLE_BUTTON (GET_WIDGET ("encrypt_header_checkbutton")), ! 
self->can_encrypt_header);
+       gtk_check_button_set_inconsistent (GTK_CHECK_BUTTON (GET_WIDGET ("encrypt_header_checkbutton")), ! 
self->can_encrypt_header);
        gtk_widget_set_sensitive (GET_WIDGET ("encrypt_header_checkbutton"), self->can_encrypt_header);
        gtk_widget_set_sensitive (GET_WIDGET ("volume_spinbutton"), ! self->can_create_volumes || 
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("volume_checkbutton"))));
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]