- Add upstream bug fix patches: + 0e5b4c34.patch general: Use GtkSwitch active property consistently. app-chooser sets the state instead of active property. Similar to d7af60161d30c885ebab69c58b346896f1565387, we really meant to set active (whether the switch is toggled) and not the state (i.e. the color of the switch). Use gtk_switch_set_active(). In properties we've already fixed this, but there's a lingering call to gtk_switch_get_state(). This is probably fine because state is in sync with active when the default handler is used, but let's get :active, to be consistent and safe. + 6e37d15f.patch window-slot: Manage search props set with action. Manages search property change through "search-visible" action. The action triggers other related functions that if not executed will causes buggy behavior. Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2875 OBS-URL: https://build.opensuse.org/request/show/1086647 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/nautilus?expand=0&rev=376
49 lines
2.1 KiB
Diff
49 lines
2.1 KiB
Diff
From 0e5b4c34960f3481d1e2e74a73f0f876bf49e354 Mon Sep 17 00:00:00 2001
|
|
From: Corey Berla <corey@berla.me>
|
|
Date: Mon, 24 Apr 2023 08:36:13 -0700
|
|
Subject: [PATCH] general: Use GtkSwitch active property consistently
|
|
|
|
app-chooser sets the state instead of active property. Similar to
|
|
d7af60161d30c885ebab69c58b346896f1565387, we really meant to set active
|
|
(whether the switch is toggled) and not the state (i.e. the color of the
|
|
switch). Use gtk_switch_set_active()
|
|
|
|
In properties we've already fixed this, but there's a lingering call
|
|
to gtk_switch_get_state(). This is probably fine because state is
|
|
in sync with active when the default handler is used, but let's get
|
|
:active, to be consistent and safe.
|
|
---
|
|
src/nautilus-app-chooser.c | 2 +-
|
|
src/nautilus-properties-window.c | 2 +-
|
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/nautilus-app-chooser.c b/src/nautilus-app-chooser.c
|
|
index 579ba1e1bc..9e4e1dcebb 100644
|
|
--- a/src/nautilus-app-chooser.c
|
|
+++ b/src/nautilus-app-chooser.c
|
|
@@ -105,7 +105,7 @@ on_application_selected (GtkAppChooserWidget *widget,
|
|
default_app = g_app_info_get_default_for_type (self->content_type, FALSE);
|
|
is_default = default_app != NULL && g_app_info_equal (info, default_app);
|
|
|
|
- gtk_switch_set_state (GTK_SWITCH (self->set_as_default_switch), is_default);
|
|
+ gtk_switch_set_active (GTK_SWITCH (self->set_as_default_switch), is_default);
|
|
gtk_widget_set_sensitive (GTK_WIDGET (self->set_as_default_switch), !is_default);
|
|
}
|
|
|
|
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
|
|
index 98fae514c8..529abfa1cb 100644
|
|
--- a/src/nautilus-properties-window.c
|
|
+++ b/src/nautilus-properties-window.c
|
|
@@ -2961,7 +2961,7 @@ execution_bit_changed (NautilusPropertiesWindow *self,
|
|
const FilterType filter_type = FILES_ONLY;
|
|
|
|
/* if activated from switch, switch state is already toggled, thus invert value via XOR. */
|
|
- gboolean active = gtk_switch_get_state (self->execution_switch) ^ GTK_IS_SWITCH (widget);
|
|
+ gboolean active = gtk_switch_get_active (self->execution_switch) ^ GTK_IS_SWITCH (widget);
|
|
gboolean set_executable = !active;
|
|
|
|
update_permissions (self,
|
|
--
|
|
GitLab
|
|
|