import gnome-control-center-40.0-21.el9

This commit is contained in:
CentOS Sources 2022-03-01 06:32:38 -05:00 committed by Stepan Oksanichenko
parent e8d5554e5f
commit 401caf0e40
5 changed files with 3798 additions and 6 deletions

View File

@ -0,0 +1,189 @@
From f6e0cba768d376a7f710dd8a69c17ec50c7a13a9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
Date: Fri, 4 Feb 2022 11:09:24 +0100
Subject: [PATCH] display: Only display configuration options if apply is
allowed
org.gnome.Mutter.DisplayConfig contains a new property that tells
whether apply will be allowed to be called or not. Whether it is true or
not depends on policy stored in any of its monitors.xml configuration
files.
In order to make it clearer that configuration is not possible, except
for night light, make sure to hide the unconfigurable parts, leaving
only night light.
---
.../display/cc-display-config-manager-dbus.c | 36 +++++++++++++++++++
panels/display/cc-display-config-manager.c | 6 ++++
panels/display/cc-display-config-manager.h | 3 ++
panels/display/cc-display-panel.c | 11 ++++++
panels/display/cc-display-panel.ui | 2 +-
5 files changed, 57 insertions(+), 1 deletion(-)
diff --git a/panels/display/cc-display-config-manager-dbus.c b/panels/display/cc-display-config-manager-dbus.c
index 653bea0b5..392140101 100644
--- a/panels/display/cc-display-config-manager-dbus.c
+++ b/panels/display/cc-display-config-manager-dbus.c
@@ -31,6 +31,8 @@ struct _CcDisplayConfigManagerDBus
guint monitors_changed_id;
GVariant *current_state;
+
+ gboolean apply_allowed;
};
G_DEFINE_TYPE (CcDisplayConfigManagerDBus,
@@ -118,6 +120,8 @@ bus_gotten (GObject *object,
CcDisplayConfigManagerDBus *self;
GDBusConnection *connection;
g_autoptr(GError) error = NULL;
+ g_autoptr(GDBusProxy) proxy = NULL;
+ g_autoptr(GVariant) variant = NULL;
connection = g_bus_get_finish (result, &error);
if (!connection)
@@ -143,12 +147,35 @@ bus_gotten (GObject *object,
monitors_changed,
self,
NULL);
+
+ proxy = g_dbus_proxy_new_sync (self->connection,
+ G_DBUS_PROXY_FLAGS_NONE,
+ NULL,
+ "org.gnome.Mutter.DisplayConfig",
+ "/org/gnome/Mutter/DisplayConfig",
+ "org.gnome.Mutter.DisplayConfig",
+ NULL,
+ &error);
+ if (!proxy)
+ {
+ g_warning ("Failed to create D-Bus proxy to \"org.gnome.Mutter.DisplayConfig\": %s",
+ error->message);
+ return;
+ }
+
+ variant = g_dbus_proxy_get_cached_property (proxy, "ApplyMonitorsConfigAllowed");
+ if (variant)
+ self->apply_allowed = g_variant_get_boolean (variant);
+ else
+ g_warning ("Missing property 'ApplyMonitorsConfigAllowed' on DisplayConfig API");
+
get_current_state (self);
}
static void
cc_display_config_manager_dbus_init (CcDisplayConfigManagerDBus *self)
{
+ self->apply_allowed = TRUE;
self->cancellable = g_cancellable_new ();
g_bus_get (G_BUS_TYPE_SESSION, self->cancellable, bus_gotten, self);
}
@@ -170,6 +197,14 @@ cc_display_config_manager_dbus_finalize (GObject *object)
G_OBJECT_CLASS (cc_display_config_manager_dbus_parent_class)->finalize (object);
}
+static gboolean
+cc_display_config_manager_dbus_get_apply_allowed (CcDisplayConfigManager *pself)
+{
+ CcDisplayConfigManagerDBus *self = CC_DISPLAY_CONFIG_MANAGER_DBUS (pself);
+
+ return self->apply_allowed;
+}
+
static void
cc_display_config_manager_dbus_class_init (CcDisplayConfigManagerDBusClass *klass)
{
@@ -179,6 +214,7 @@ cc_display_config_manager_dbus_class_init (CcDisplayConfigManagerDBusClass *klas
gobject_class->finalize = cc_display_config_manager_dbus_finalize;
parent_class->get_current = cc_display_config_manager_dbus_get_current;
+ parent_class->get_apply_allowed = cc_display_config_manager_dbus_get_apply_allowed;
}
CcDisplayConfigManager *
diff --git a/panels/display/cc-display-config-manager.c b/panels/display/cc-display-config-manager.c
index 0da298a29..3d683c53d 100644
--- a/panels/display/cc-display-config-manager.c
+++ b/panels/display/cc-display-config-manager.c
@@ -59,3 +59,9 @@ cc_display_config_manager_get_current (CcDisplayConfigManager *self)
{
return CC_DISPLAY_CONFIG_MANAGER_GET_CLASS (self)->get_current (self);
}
+
+gboolean
+cc_display_config_manager_get_apply_allowed (CcDisplayConfigManager *self)
+{
+ return CC_DISPLAY_CONFIG_MANAGER_GET_CLASS (self)->get_apply_allowed (self);
+}
diff --git a/panels/display/cc-display-config-manager.h b/panels/display/cc-display-config-manager.h
index 1e1b36373..64f0775e9 100644
--- a/panels/display/cc-display-config-manager.h
+++ b/panels/display/cc-display-config-manager.h
@@ -34,10 +34,13 @@ struct _CcDisplayConfigManagerClass
GObjectClass parent_class;
CcDisplayConfig * (*get_current) (CcDisplayConfigManager *self);
+ gboolean (* get_apply_allowed) (CcDisplayConfigManager *self);
};
CcDisplayConfig * cc_display_config_manager_get_current (CcDisplayConfigManager *self);
+gboolean cc_display_config_manager_get_apply_allowed (CcDisplayConfigManager *self);
+
void _cc_display_config_manager_emit_changed (CcDisplayConfigManager *self);
G_END_DECLS
diff --git a/panels/display/cc-display-panel.c b/panels/display/cc-display-panel.c
index 93c983f89..2cfd714d3 100644
--- a/panels/display/cc-display-panel.c
+++ b/panels/display/cc-display-panel.c
@@ -69,6 +69,8 @@ struct _CcDisplayPanel
gint rebuilding_counter;
+ GtkWidget *displays_page;
+
CcDisplayArrangement *arrangement;
CcDisplaySettings *settings;
@@ -691,6 +693,7 @@ cc_display_panel_class_init (CcDisplayPanelClass *klass)
gtk_widget_class_bind_template_child (widget_class, CcDisplayPanel, current_output_label);
gtk_widget_class_bind_template_child (widget_class, CcDisplayPanel, display_settings_frame);
gtk_widget_class_bind_template_child (widget_class, CcDisplayPanel, multi_selection_box);
+ gtk_widget_class_bind_template_child (widget_class, CcDisplayPanel, displays_page);
gtk_widget_class_bind_template_child (widget_class, CcDisplayPanel, night_light_page);
gtk_widget_class_bind_template_child (widget_class, CcDisplayPanel, output_enabled_switch);
gtk_widget_class_bind_template_child (widget_class, CcDisplayPanel, output_selection_combo);
@@ -779,8 +782,16 @@ rebuild_ui (CcDisplayPanel *panel)
GList *outputs, *l;
CcDisplayConfigType type;
+ if (!cc_display_config_manager_get_apply_allowed (panel->manager))
+ {
+ gtk_widget_set_visible (panel->displays_page, FALSE);
+ return;
+ }
+
panel->rebuilding_counter++;
+ gtk_widget_set_visible (panel->displays_page, TRUE);
+
g_list_store_remove_all (panel->primary_display_list);
gtk_list_store_clear (panel->output_selection_list);
diff --git a/panels/display/cc-display-panel.ui b/panels/display/cc-display-panel.ui
index 855b34814..80fd63ace 100644
--- a/panels/display/cc-display-panel.ui
+++ b/panels/display/cc-display-panel.ui
@@ -47,7 +47,7 @@
<!-- Displays page -->
<child>
- <object class="GtkScrolledWindow">
+ <object class="GtkScrolledWindow" id="displays_page">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hscrollbar_policy">never</property>
--
2.33.1

View File

@ -0,0 +1,42 @@
From 0e2562c2c5ff081561424c625b090f089ef45fe7 Mon Sep 17 00:00:00 2001
From: Felipe Borges <felipeborges@gnome.org>
Date: Fri, 14 Jan 2022 13:28:24 +0100
Subject: [PATCH] applications: Set the Icon key in desktop file to a icon that
exists
While we dynamically append --symbolic to the icons while creating
the sidebar model in
https://gitlab.gnome.org/GNOME/gnome-control-center/-/blob/master/shell/cc-shell-model.c#L270
There are automation tools (such as rpmdiff) that parse desktop files
and verify whether their Icon= matches to an existing file in the
icon theme package.
preferences-desktop-apps doesn't exist in adwaita-icon-theme but
preferences-desktop-apps-symbolic does.
---
panels/applications/gnome-applications-panel.desktop.in.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/panels/applications/gnome-applications-panel.desktop.in.in b/panels/applications/gnome-applications-panel.desktop.in.in
index 86e816645..83616c89e 100644
--- a/panels/applications/gnome-applications-panel.desktop.in.in
+++ b/panels/applications/gnome-applications-panel.desktop.in.in
@@ -4,7 +4,7 @@ Comment=Control various application permissions and settings
Exec=gnome-control-center applications
# FIXME
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
-Icon=preferences-desktop-apps
+Icon=preferences-desktop-apps-symbolic
Terminal=false
Type=Application
NoDisplay=true
@@ -13,4 +13,4 @@ Categories=GNOME;GTK;Settings;DesktopSettings;X-GNOME-Settings-Panel;X-GNOME-Acc
OnlyShowIn=GNOME;Unity;
# Translators: Search terms to find the Privacy panel. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
Keywords=application;flatpak;permission;setting;
-X-GNOME-ControlCenter-HasSidebar=true
\ No newline at end of file
+X-GNOME-ControlCenter-HasSidebar=true
--
2.33.1

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,64 @@
diff -up gnome-control-center-40.0/panels/bluetooth/gnome-bluetooth-panel.desktop.in.in.rpminspect-desktop-fixes gnome-control-center-40.0/panels/bluetooth/gnome-bluetooth-panel.desktop.in.in
--- gnome-control-center-40.0/panels/bluetooth/gnome-bluetooth-panel.desktop.in.in.rpminspect-desktop-fixes 2022-02-02 14:10:24.722557740 +0100
+++ gnome-control-center-40.0/panels/bluetooth/gnome-bluetooth-panel.desktop.in.in 2022-02-02 14:10:41.756366100 +0100
@@ -2,7 +2,7 @@
Name=Bluetooth
Comment=Turn Bluetooth on and off and connect your devices
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
-Icon=bluetooth
+Icon=bluetooth-symbolic
Exec=gnome-control-center bluetooth
Terminal=false
Type=Application
diff -up gnome-control-center-40.0/panels/location/gnome-location-panel.desktop.in.in.rpminspect-desktop-fixes gnome-control-center-40.0/panels/location/gnome-location-panel.desktop.in.in
--- gnome-control-center-40.0/panels/location/gnome-location-panel.desktop.in.in.rpminspect-desktop-fixes 2022-02-02 14:11:08.849061293 +0100
+++ gnome-control-center-40.0/panels/location/gnome-location-panel.desktop.in.in 2022-02-02 14:11:20.606929011 +0100
@@ -4,7 +4,7 @@ Comment=Protect your location informatio
Exec=gnome-control-center location
# FIXME
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
-Icon=location-services-active
+Icon=location-services-active-symbolic
Terminal=false
Type=Application
NoDisplay=true
diff -up gnome-control-center-40.0/panels/microphone/gnome-microphone-panel.desktop.in.in.rpminspect-desktop-fixes gnome-control-center-40.0/panels/microphone/gnome-microphone-panel.desktop.in.in
--- gnome-control-center-40.0/panels/microphone/gnome-microphone-panel.desktop.in.in.rpminspect-desktop-fixes 2022-02-02 14:12:15.652309721 +0100
+++ gnome-control-center-40.0/panels/microphone/gnome-microphone-panel.desktop.in.in 2022-02-02 14:12:28.849161249 +0100
@@ -4,7 +4,7 @@ Comment=Protect your conversations
Exec=gnome-control-center microphone
# FIXME
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
-Icon=audio-input-microphone
+Icon=audio-input-microphone-symbolic
Terminal=false
Type=Application
NoDisplay=true
diff -up gnome-control-center-40.0/panels/thunderbolt/gnome-thunderbolt-panel.desktop.in.in.rpminspect-desktop-fixes gnome-control-center-40.0/panels/thunderbolt/gnome-thunderbolt-panel.desktop.in.in
--- gnome-control-center-40.0/panels/thunderbolt/gnome-thunderbolt-panel.desktop.in.in.rpminspect-desktop-fixes 2022-02-02 14:12:50.891913256 +0100
+++ gnome-control-center-40.0/panels/thunderbolt/gnome-thunderbolt-panel.desktop.in.in 2022-02-02 14:12:59.811812903 +0100
@@ -3,7 +3,7 @@ Name=Thunderbolt
Comment=Manage Thunderbolt devices
Exec=gnome-control-center thunderbolt
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
-Icon=thunderbolt
+Icon=thunderbolt-symbolic
Terminal=false
Type=Application
NoDisplay=true
diff -up gnome-control-center-40.0/panels/wwan/gnome-wwan-panel.desktop.in.in.rpminspect-desktop-fixes gnome-control-center-40.0/panels/wwan/gnome-wwan-panel.desktop.in.in
--- gnome-control-center-40.0/panels/wwan/gnome-wwan-panel.desktop.in.in.rpminspect-desktop-fixes 2022-02-02 14:09:27.862197449 +0100
+++ gnome-control-center-40.0/panels/wwan/gnome-wwan-panel.desktop.in.in 2022-02-02 14:13:34.301424876 +0100
@@ -4,11 +4,10 @@ Comment=Configure Telephony and mobile d
Exec=gnome-control-center wwan
# FIXME
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
-Icon=network-cellular-signal-excellent
+Icon=network-cellular-signal-excellent-symbolic
Terminal=false
Type=Application
NoDisplay=true
-StartupNotify=true
Categories=GNOME;GTK;Settings;X-GNOME-NetworkSettings;HardwareSettings;X-GNOME-Settings-Panel;X-GNOME-ConnectivitySettings;
OnlyShowIn=GNOME;Unity;
StartupNotify=true

View File

@ -14,7 +14,7 @@
Name: gnome-control-center Name: gnome-control-center
Version: 40.0 Version: 40.0
Release: 16%{?dist}.1 Release: 21%{?dist}
Summary: Utilities to configure the GNOME desktop Summary: Utilities to configure the GNOME desktop
License: GPLv2+ and CC-BY-SA License: GPLv2+ and CC-BY-SA
@ -31,6 +31,12 @@ Patch1: gnome-control-center-Drop-the-unused-build-dependency-on-Grilo.p
Patch2: power-profiles-backport.patch Patch2: power-profiles-backport.patch
Patch3: wwan-backport-gnome-40.patch Patch3: wwan-backport-gnome-40.patch
Patch4: subscription-manager-support.patch Patch4: subscription-manager-support.patch
Patch5: application-use-icon-name-that-exists.patch
Patch6: backport-multitasking-panel.patch
Patch7: rpminspect-desktop-fixes.patch
# Backport monitor config policy (#2046159)
Patch8: 0001-display-Only-display-configuration-options-if-apply-.patch
BuildRequires: chrpath BuildRequires: chrpath
BuildRequires: cups-devel BuildRequires: cups-devel
@ -220,17 +226,33 @@ chrpath --delete $RPM_BUILD_ROOT%{_bindir}/gnome-control-center
%dir %{_datadir}/gnome/wm-properties %dir %{_datadir}/gnome/wm-properties
%changelog %changelog
* Wed Sep 15 2021 Kalev Lember <klember@redhat.com> - 40.0-16.1 * Fri Feb 04 2022 Jonas Ådahl <tpopela@redhat.com> - 40.0-21
- Rebuilt - Backport monitor config policy
- Related: #2002166 Resolves: #2046159
* Wed Feb 02 2022 Tomas Popela <tpopela@redhat.com> - 40.0-20
- Fix rpminspect desktop files warnings
- Resolves: #2041348
* Fri Jan 28 2022 Felipe Borges <feborges@redhat.com> - 40.0-19
- Backport Multitasking panel
- Resolves: #2047723
* Thu Jan 20 2022 Felipe Borges <feborges@redhat.com> - 40.0-18
- Fix typo in the previous patch
- Resolves: #2041348
* Fri Jan 14 2022 Felipe Borges <feborges@redhat.com> - 40.0-17
- Set an existing Icon name in the Applications' panel desktop file
- Resolves: #2041348
* Tue Sep 07 2021 Kalev Lember <klember@redhat.com> - 40.0-16 * Tue Sep 07 2021 Kalev Lember <klember@redhat.com> - 40.0-16
- Add desktop file keywords for subscription support - Add desktop file keywords for subscription support
- Resolves: #2002166 - Resolves: #1937113
* Thu Sep 02 2021 Kalev Lember <klember@redhat.com> - 40.0-15 * Thu Sep 02 2021 Kalev Lember <klember@redhat.com> - 40.0-15
- Forward port subscription manager support from RHEL 8 - Forward port subscription manager support from RHEL 8
- Resolves: #2002166 - Resolves: #1937113
* Wed Aug 25 2021 Carlos Garnacho <cgarnach@redhat.com> - 40.0-14 * Wed Aug 25 2021 Carlos Garnacho <cgarnach@redhat.com> - 40.0-14
- Backport WWAN panel - Backport WWAN panel