Merged update from upstream sources

This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/gnome-control-center.git#beabe92180cc8581ee1c994fbeb5553fcfcf3115
This commit is contained in:
DistroBaker 2021-02-21 20:55:30 +00:00
parent b47b319d10
commit f9eb00642a
6 changed files with 56 additions and 221 deletions

1
.gitignore vendored
View File

@ -33,3 +33,4 @@
/gnome-control-center-3.38.2.tar.xz
/gnome-control-center-3.38.3.tar.xz
/gnome-control-center-3.38.4.tar.xz
/gnome-control-center-40.beta.tar.xz

View File

@ -1,71 +0,0 @@
From 27e1140c9d4ad852b4dc6a132a14cd5532d52997 Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Mon, 2 Nov 2020 11:07:10 +0100
Subject: [PATCH] search: Check for either tracker 2.x or 3.x schemas
The Tracker3 schema points to the same dconf path and is backwards
compatible with Tracker 2.x settings. Check for either here, with a
preference to Tracker 3.x.
Eventually, Tracker 2.x will be fully phased out, and this will not
be necessary.
Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1173
---
panels/search/cc-search-locations-dialog.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/panels/search/cc-search-locations-dialog.c b/panels/search/cc-search-locations-dialog.c
index 48749da5a..764016ffc 100644
--- a/panels/search/cc-search-locations-dialog.c
+++ b/panels/search/cc-search-locations-dialog.c
@@ -24,6 +24,7 @@
#include <glib/gi18n.h>
#define TRACKER_SCHEMA "org.freedesktop.Tracker.Miner.Files"
+#define TRACKER3_SCHEMA "org.freedesktop.Tracker3.Miner.Files"
#define TRACKER_KEY_RECURSIVE_DIRECTORIES "index-recursive-directories"
#define TRACKER_KEY_SINGLE_DIRECTORIES "index-single-directories"
@@ -670,12 +671,20 @@ CcSearchLocationsDialog *
cc_search_locations_dialog_new (CcSearchPanel *panel)
{
CcSearchLocationsDialog *self;
+ GSettingsSchemaSource *source;
+ g_autoptr(GSettingsSchema) schema = NULL;
self = g_object_new (CC_SEARCH_LOCATIONS_DIALOG_TYPE,
"use-header-bar", TRUE,
NULL);
- self->tracker_preferences = g_settings_new (TRACKER_SCHEMA);
+ source = g_settings_schema_source_get_default ();
+ schema = g_settings_schema_source_lookup (source, TRACKER3_SCHEMA, TRUE);
+ if (schema)
+ self->tracker_preferences = g_settings_new (TRACKER3_SCHEMA);
+ else
+ self->tracker_preferences = g_settings_new (TRACKER_SCHEMA);
+
populate_list_boxes (self);
gtk_list_box_set_sort_func (GTK_LIST_BOX (self->others_list),
@@ -702,8 +711,15 @@ cc_search_locations_dialog_is_available (void)
if (!source)
return FALSE;
+ schema = g_settings_schema_source_lookup (source, TRACKER3_SCHEMA, TRUE);
+ if (schema)
+ return TRUE;
+
schema = g_settings_schema_source_lookup (source, TRACKER_SCHEMA, TRUE);
- return schema != NULL;
+ if (schema)
+ return TRUE;
+
+ return FALSE;
}
static void
--
2.28.0

View File

@ -1,4 +1,4 @@
From dccda5d9604a39706a8708c9393d3d8f3ed2a00b Mon Sep 17 00:00:00 2001
From 649943e98848e8b4ee147c81cfdfda0f55c70420 Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@gnome.org>
Date: Mon, 16 Mar 2020 13:37:29 -0500
Subject: [PATCH] Replace GNOME logo with Fedora vertical logo
@ -17,11 +17,12 @@ https://pagure.io/fedora-workstation/issue/135
https://bugzilla.gnome.org/show_bug.cgi?id=695691
---
.../info-overview/GnomeLogoVerticalMedium.svg | 134 ------------------
.../info-overview/cc-info-overview-panel.ui | 2 +-
panels/info-overview/cc-info-overview-panel.c | 17 ---
.../info-overview/cc-info-overview-panel.ui | 1 +
panels/info-overview/fedora_vertical.png | Bin 0 -> 6979 bytes
.../info-overview/info-overview.gresource.xml | 2 +-
panels/info-overview/meson.build | 2 +-
5 files changed, 3 insertions(+), 137 deletions(-)
6 files changed, 3 insertions(+), 153 deletions(-)
delete mode 100644 panels/info-overview/GnomeLogoVerticalMedium.svg
create mode 100644 panels/info-overview/fedora_vertical.png
@ -165,15 +166,49 @@ index b697f06a5..000000000
- </g>
- </g>
-</svg>
diff --git a/panels/info-overview/cc-info-overview-panel.c b/panels/info-overview/cc-info-overview-panel.c
index bd0e07762..884e3da44 100644
--- a/panels/info-overview/cc-info-overview-panel.c
+++ b/panels/info-overview/cc-info-overview-panel.c
@@ -866,21 +866,6 @@ cc_info_panel_row_activated_cb (CcInfoOverviewPanel *self,
open_software_update (self);
}
-static void
-setup_os_logo (CcInfoOverviewPanel *panel)
-{
- g_autofree char *logo_name = g_get_os_info ("LOGO");
- if (logo_name != NULL)
- {
- gtk_image_set_from_icon_name (panel->os_logo, logo_name, GTK_ICON_SIZE_INVALID);
- gtk_image_set_pixel_size (panel->os_logo, 256);
- }
- else
- {
- gtk_image_set_from_resource (panel->os_logo, "/org/gnome/control-center/info-overview/GnomeLogoVerticalMedium.svg");
- }
-}
-
static void
cc_info_overview_panel_class_init (CcInfoOverviewPanelClass *klass)
{
@@ -929,8 +914,6 @@ cc_info_overview_panel_init (CcInfoOverviewPanel *self)
info_overview_panel_setup_overview (self);
info_overview_panel_setup_virt (self);
-
- setup_os_logo (self);
}
GtkWidget *
diff --git a/panels/info-overview/cc-info-overview-panel.ui b/panels/info-overview/cc-info-overview-panel.ui
index de377bb69..4fab10973 100644
index 2f5d3cf8b..d593729c7 100644
--- a/panels/info-overview/cc-info-overview-panel.ui
+++ b/panels/info-overview/cc-info-overview-panel.ui
@@ -30,7 +30,7 @@
<object class="GtkImage">
@@ -28,6 +28,7 @@
<object class="GtkImage" id="os_logo">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="resource">/org/gnome/control-center/info-overview/GnomeLogoVerticalMedium.svg</property>
+ <property name="resource">/org/gnome/control-center/info-overview/fedora_vertical.png</property>
</object>
<packing>
@ -334,10 +369,10 @@ index 83806e0ad..68cc49626 100644
</gresource>
</gresources>
diff --git a/panels/info-overview/meson.build b/panels/info-overview/meson.build
index abbaf3218..e5b18853d 100644
index 14663f24c..d10c29e78 100644
--- a/panels/info-overview/meson.build
+++ b/panels/info-overview/meson.build
@@ -29,7 +29,7 @@ sources = files(
@@ -28,7 +28,7 @@ sources = files(
)
resource_data = files(
@ -347,5 +382,5 @@ index abbaf3218..e5b18853d 100644
)
--
2.24.1
2.29.2

View File

@ -2,31 +2,27 @@
%define glib2_version 2.56.0
%define gnome_desktop_version 3.35.4
%define gsd_version 3.35.0
%define gsettings_desktop_schemas_version 3.31.0
%define gsettings_desktop_schemas_version 3.37.1
%define upower_version 0.99.8
%define gtk3_version 3.22.20
%define cheese_version 3.28.0
%define gnome_bluetooth_version 3.18.2
%define nm_version 1.24
%global tarball_version %%(echo %{version} | tr '~' '.')
Name: gnome-control-center
Version: 3.38.4
Version: 40~beta
Release: 1%{?dist}
Summary: Utilities to configure the GNOME desktop
License: GPLv2+ and CC-BY-SA
URL: http://www.gnome.org
Source0: https://download.gnome.org/sources/gnome-control-center/3.38/gnome-control-center-%{version}.tar.xz
Source0: https://download.gnome.org/sources/gnome-control-center/40/gnome-control-center-%{tarball_version}.tar.xz
# https://bugzilla.gnome.org/show_bug.cgi?id=695691
Patch0: distro-logo.patch
# https://teams.fedoraproject.org/project/silverblue/us/127
Patch1: info-model-for-lenovo.patch
# https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/875
Patch2: 0001-search-Check-for-either-tracker-2.x-or-3.x-schemas.patch
BuildRequires: chrpath
BuildRequires: cups-devel
BuildRequires: desktop-file-utils
@ -148,7 +144,7 @@ can install configuration files that are picked up by the control-center
utilities.
%prep
%autosetup -p1 -S git
%autosetup -p1 -S git -n gnome-control-center-%{tarball_version}
%build
%meson -Ddocumentation=true
@ -200,6 +196,9 @@ chrpath --delete $RPM_BUILD_ROOT%{_bindir}/gnome-control-center
%dir %{_datadir}/gnome/wm-properties
%changelog
* Sun Feb 21 2021 Kalev Lember <klember@redhat.com> - 40~beta-1
- Update to 40.beta
* Mon Feb 15 2021 Kalev Lember <klember@redhat.com> - 3.38.4-1
- Update to 3.38.4

View File

@ -1,129 +0,0 @@
From cb0c026adad0b3c892d3bb84366ed871d920e97d Mon Sep 17 00:00:00 2001
From: Felipe Borges <felipeborges@gnome.org>
Date: Tue, 28 Apr 2020 12:32:05 +0200
Subject: [PATCH] info: Add device "Model" row for Lenovo
Since we will be shipping Fedora 32 in some Lenovo devices[0], we
were asked to add an entry in Settings with a string identifying
the laptop model for users to look at while reporting issues[1].
Ideally this logic should live in systemd-hostnamed and be generic
enough to handle vendors and their particular ways of exposing this
info in userspace. Unfortunately the release is at the door now and
that work would require us some more time. Its development is ongoing
upstream[2] but won't likely be ready for the F32 that should happen
at any moment this week.
[0] https://fedoramagazine.org/coming-soon-fedora-on-lenovo-laptops
[1] https://teams.fedoraproject.org/project/silverblue/us/127
[2] https://github.com/systemd/systemd/issues/15493 and
https://github.com/systemd/systemd/pull/15531
---
panels/info-overview/cc-info-overview-panel.c | 42 +++++++++++++++++++
.../info-overview/cc-info-overview-panel.ui | 9 ++++
2 files changed, 51 insertions(+)
diff --git a/panels/info-overview/cc-info-overview-panel.c b/panels/info-overview/cc-info-overview-panel.c
index 98c77e97f..1b9916ac7 100644
--- a/panels/info-overview/cc-info-overview-panel.c
+++ b/panels/info-overview/cc-info-overview-panel.c
@@ -62,6 +62,7 @@ struct _CcInfoOverviewPanel
CcListRow *disk_row;
CcListRow *gnome_version_row;
CcListRow *graphics_row;
+ CcListRow *device_model_row;
GtkListBox *hardware_box;
GtkDialog *hostname_editor;
CcHostnameEntry *hostname_entry;
@@ -417,6 +418,41 @@ get_graphics_hardware_string (void)
return g_strdup (renderer);
}
+static gchar *
+get_device_model_string (void)
+{
+ g_autofree char *vendor = NULL;
+ g_autoptr(GError) error = NULL;
+ gchar *model = NULL;
+
+ if (g_file_get_contents ("/sys/class/dmi/id/sys_vendor", &vendor, NULL, &error))
+ {
+ if (g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT))
+ return NULL;
+
+ vendor = g_strchomp (vendor);
+ if ((g_strcmp0 (vendor, "LENOVO") != 0) && (g_strcmp0 (vendor, "lenovo") != 0))
+ return NULL;
+
+ if (g_file_get_contents ("/sys/class/dmi/id/product_version", &model, NULL, &error))
+ {
+ if (g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT))
+ return NULL;
+
+ model = g_strchomp (model);
+ if (g_strcmp0 (model, "") == 0) {
+ g_free (model);
+
+ return NULL;
+ }
+
+ return model;
+ }
+ }
+
+ return NULL;
+}
+
static char *
get_os_name (void)
{
@@ -692,6 +728,7 @@ info_overview_panel_setup_overview (CcInfoOverviewPanel *self)
g_autofree char *os_type_text = NULL;
g_autofree char *os_name_text = NULL;
g_autofree gchar *graphics_hardware_string = NULL;
+ g_autofree gchar *device_model_string = NULL;
if (load_gnome_version (&gnome_version, NULL, NULL))
cc_list_row_set_secondary_label (self->gnome_version_row, gnome_version);
@@ -717,6 +754,10 @@ info_overview_panel_setup_overview (CcInfoOverviewPanel *self)
graphics_hardware_string = get_graphics_hardware_string ();
cc_list_row_set_secondary_markup (self->graphics_row, graphics_hardware_string);
+
+ device_model_string = get_device_model_string ();
+ cc_list_row_set_secondary_markup (self->device_model_row, device_model_string);
+ gtk_widget_set_visible (GTK_WIDGET (self->device_model_row), (device_model_string != NULL));
}
static gboolean
@@ -819,6 +860,7 @@ cc_info_overview_panel_class_init (CcInfoOverviewPanelClass *klass)
gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, disk_row);
gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, gnome_version_row);
gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, graphics_row);
+ gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, device_model_row);
gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, hardware_box);
gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, hostname_editor);
gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, hostname_entry);
diff --git a/panels/info-overview/cc-info-overview-panel.ui b/panels/info-overview/cc-info-overview-panel.ui
index de377bb69..e2d18c48b 100644
--- a/panels/info-overview/cc-info-overview-panel.ui
+++ b/panels/info-overview/cc-info-overview-panel.ui
@@ -68,6 +68,15 @@
<class name="frame" />
</style>
+ <!-- Device Model -->
+ <child>
+ <object class="CcListRow" id="device_model_row">
+ <property name="visible">False</property>
+ <property name="activatable">False</property>
+ <property name="title" translatable="yes">Model</property>
+ </object>
+ </child>
+
<!-- Memory -->
<child>
<object class="CcListRow" id="memory_row">
--
2.26.1

View File

@ -1 +1 @@
SHA512 (gnome-control-center-3.38.4.tar.xz) = 9fa90b33af09fe5458c2db8782079d992f18bc36cdd6623239b48d6c8f242fa9b56275ee7c6920f313efcd2f8f1c65a43a8f3f1c100489a0bcade26d045eb3c7
SHA512 (gnome-control-center-40.beta.tar.xz) = d09239c21d5129b32297671c7636d0f82663bbf72395f827d13470108c66dd004527e25b788850714ce4f7a513cbe0032d10e06e36b8f16ba129bc4bbca0238b