[nautilus/wip/antoniof/switch-to-gtk4: 19/33] general: gtk_toggle_button_*() -> gtk_check_button_*()
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/switch-to-gtk4: 19/33] general: gtk_toggle_button_*() -> gtk_check_button_*()
- Date: Sun, 9 Jan 2022 00:09:35 +0000 (UTC)
commit ceb60fe103e54e270c8dda2a06e12121499a3268
Author: António Fernandes <antoniof gnome org>
Date: Fri Dec 24 01:03:45 2021 +0000
general: gtk_toggle_button_*() -> gtk_check_button_*()
Check button is not a subclass of toggle button anymore.
src/nautilus-batch-rename-dialog.c | 2 +-
src/nautilus-file-conflict-dialog.c | 6 +++---
src/nautilus-properties-window.c | 26 +++++++++++++-------------
src/nautilus-search-popover.c | 24 ++++++++++++------------
4 files changed, 29 insertions(+), 29 deletions(-)
---
diff --git a/src/nautilus-batch-rename-dialog.c b/src/nautilus-batch-rename-dialog.c
index 72344e56c..514be8879 100644
--- a/src/nautilus-batch-rename-dialog.c
+++ b/src/nautilus-batch-rename-dialog.c
@@ -1373,7 +1373,7 @@ update_display_text (NautilusBatchRenameDialog *dialog)
static void
batch_rename_dialog_mode_changed (NautilusBatchRenameDialog *dialog)
{
- if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->format_mode_button)))
+ if (gtk_check_button_get_active (GTK_CHECK_BUTTON (dialog->format_mode_button)))
{
gtk_stack_set_visible_child_name (GTK_STACK (dialog->mode_stack), "format");
diff --git a/src/nautilus-file-conflict-dialog.c b/src/nautilus-file-conflict-dialog.c
index adcecf5eb..816498611 100644
--- a/src/nautilus-file-conflict-dialog.c
+++ b/src/nautilus-file-conflict-dialog.c
@@ -198,10 +198,10 @@ on_expanded_notify (GtkExpander *w,
}
static void
-checkbox_toggled_cb (GtkToggleButton *t,
+checkbox_toggled_cb (GtkCheckButton *t,
NautilusFileConflictDialog *dialog)
{
- gtk_widget_set_sensitive (dialog->expander, !gtk_toggle_button_get_active (t));
+ gtk_widget_set_sensitive (dialog->expander, !gtk_check_button_get_active (t));
}
static void
@@ -294,7 +294,7 @@ nautilus_file_conflict_dialog_get_new_name (NautilusFileConflictDialog *dialog)
gboolean
nautilus_file_conflict_dialog_get_apply_to_all (NautilusFileConflictDialog *dialog)
{
- return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->checkbox));
+ return gtk_check_button_get_active (GTK_CHECK_BUTTON (dialog->checkbox));
}
NautilusFileConflictDialog *
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index 55427ea6a..9e82bb1b3 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -287,7 +287,7 @@ static void schedule_directory_contents_update (NautilusPropertiesWindow *self);
static void directory_contents_value_field_update (NautilusPropertiesWindow *self);
static void file_changed_callback (NautilusFile *file,
gpointer user_data);
-static void permission_button_update (GtkToggleButton *button,
+static void permission_button_update (GtkCheckButton *button,
NautilusPropertiesWindow *self);
static void permission_combo_update (GtkComboBox *combo,
NautilusPropertiesWindow *self);
@@ -3007,7 +3007,7 @@ initial_permission_state_consistent (NautilusPropertiesWindow *self,
}
static void
-permission_button_toggled (GtkToggleButton *button,
+permission_button_toggled (GtkCheckButton *button,
NautilusPropertiesWindow *self)
{
gboolean is_folder, is_special;
@@ -3022,8 +3022,8 @@ permission_button_toggled (GtkToggleButton *button,
is_special = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (button),
"is-special"));
- if (gtk_toggle_button_get_active (button)
- && !gtk_toggle_button_get_inconsistent (button))
+ if (gtk_check_button_get_active (button)
+ && !gtk_check_button_get_inconsistent (button))
{
/* Go to the initial state unless the initial state was
* consistent, or we support recursive apply */
@@ -3036,8 +3036,8 @@ permission_button_toggled (GtkToggleButton *button,
on = TRUE;
}
}
- else if (gtk_toggle_button_get_inconsistent (button)
- && !gtk_toggle_button_get_active (button))
+ else if (gtk_check_button_get_inconsistent (button)
+ && !gtk_check_button_get_active (button))
{
inconsistent = FALSE;
on = TRUE;
@@ -3052,8 +3052,8 @@ permission_button_toggled (GtkToggleButton *button,
G_CALLBACK (permission_button_toggled),
self);
- gtk_toggle_button_set_active (button, on);
- gtk_toggle_button_set_inconsistent (button, inconsistent);
+ gtk_check_button_set_active (button, on);
+ gtk_check_button_set_inconsistent (button, inconsistent);
g_signal_handlers_unblock_by_func (G_OBJECT (button),
G_CALLBACK (permission_button_toggled),
@@ -3068,7 +3068,7 @@ permission_button_toggled (GtkToggleButton *button,
}
static void
-permission_button_update (GtkToggleButton *button,
+permission_button_update (GtkCheckButton *button,
NautilusPropertiesWindow *self)
{
GList *l;
@@ -3140,12 +3140,12 @@ permission_button_update (GtkToggleButton *button,
G_CALLBACK (permission_button_toggled),
self);
- gtk_toggle_button_set_active (button, !all_unset);
+ gtk_check_button_set_active (button, !all_unset);
/* if actually inconsistent, or default value for file buttons
* if no files are selected. (useful for recursive apply) */
- gtk_toggle_button_set_inconsistent (button,
- (!all_unset && !all_set) ||
- (!is_folder && no_match));
+ gtk_check_button_set_inconsistent (button,
+ (!all_unset && !all_set) ||
+ (!is_folder && no_match));
gtk_widget_set_sensitive (GTK_WIDGET (button), sensitive);
g_signal_handlers_unblock_by_func (G_OBJECT (button),
diff --git a/src/nautilus-search-popover.c b/src/nautilus-search-popover.c
index e19dacda5..450af4ea6 100644
--- a/src/nautilus-search-popover.c
+++ b/src/nautilus-search-popover.c
@@ -342,16 +342,16 @@ types_listbox_row_activated (GtkListBox *listbox,
}
static void
-search_time_type_changed (GtkToggleButton *button,
+search_time_type_changed (GtkCheckButton *button,
NautilusSearchPopover *popover)
{
NautilusQuerySearchType type = -1;
- if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (popover->last_modified_button)))
+ if (gtk_check_button_get_active (GTK_CHECK_BUTTON (popover->last_modified_button)))
{
type = NAUTILUS_QUERY_SEARCH_TYPE_LAST_MODIFIED;
}
- else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (popover->last_used_button)))
+ else if (gtk_check_button_get_active (GTK_CHECK_BUTTON (popover->last_used_button)))
{
type = NAUTILUS_QUERY_SEARCH_TYPE_LAST_ACCESS;
}
@@ -925,21 +925,21 @@ nautilus_search_popover_init (NautilusSearchPopover *self)
filter_time_type = g_settings_get_enum (nautilus_preferences, "search-filter-time-type");
if (filter_time_type == NAUTILUS_QUERY_SEARCH_TYPE_LAST_MODIFIED)
{
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->last_modified_button), TRUE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->last_used_button), FALSE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->created_button), FALSE);
+ gtk_check_button_set_active (GTK_CHECK_BUTTON (self->last_modified_button), TRUE);
+ gtk_check_button_set_active (GTK_CHECK_BUTTON (self->last_used_button), FALSE);
+ gtk_check_button_set_active (GTK_CHECK_BUTTON (self->created_button), FALSE);
}
else if (filter_time_type == NAUTILUS_QUERY_SEARCH_TYPE_LAST_ACCESS)
{
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->last_modified_button), FALSE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->last_used_button), TRUE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->created_button), FALSE);
+ gtk_check_button_set_active (GTK_CHECK_BUTTON (self->last_modified_button), FALSE);
+ gtk_check_button_set_active (GTK_CHECK_BUTTON (self->last_used_button), TRUE);
+ gtk_check_button_set_active (GTK_CHECK_BUTTON (self->created_button), FALSE);
}
else
{
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->last_modified_button), FALSE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->last_used_button), FALSE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->created_button), TRUE);
+ gtk_check_button_set_active (GTK_CHECK_BUTTON (self->last_modified_button), FALSE);
+ gtk_check_button_set_active (GTK_CHECK_BUTTON (self->last_used_button), FALSE);
+ gtk_check_button_set_active (GTK_CHECK_BUTTON (self->created_button), TRUE);
}
self->fts_enabled = g_settings_get_boolean (nautilus_preferences,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]