!17 Udpate to 42.0

From: @zhang__3125 
Reviewed-by: @dwl301 
Signed-off-by: @dwl301
This commit is contained in:
openeuler-ci-bot 2022-06-14 05:41:20 +00:00 committed by Gitee
commit 0ebca4a38a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
12 changed files with 688 additions and 406 deletions

View File

@ -0,0 +1,32 @@
From 7fe322b9cedae313cd9af6f403eab9bfc6027674 Mon Sep 17 00:00:00 2001
From: Jan Tojnar <jtojnar@gmail.com>
Date: Mon, 28 Mar 2022 21:02:23 +0200
Subject: [PATCH] online-accounts: Fix goa-helper on X11
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The handle_str contains the “x11:” prefix so strtol would return 0.
We need to pass it the numeric substring.
Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1651
---
panels/online-accounts/gnome-control-center-goa-helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/panels/online-accounts/gnome-control-center-goa-helper.c b/panels/online-accounts/gnome-control-center-goa-helper.c
index 56513147e..533609cbc 100644
--- a/panels/online-accounts/gnome-control-center-goa-helper.c
+++ b/panels/online-accounts/gnome-control-center-goa-helper.c
@@ -129,7 +129,7 @@ set_external_parent_from_handle (GtkApplication *application,
int xid;
errno = 0;
- xid = strtol (handle_str, NULL, 16);
+ xid = strtol (handle_str + strlen (x11_prefix), NULL, 16);
if (errno != 0)
{
g_warning ("Failed to reference external X11 window, invalid XID %s", handle_str);
--
2.35.1

View File

@ -1,80 +0,0 @@
From 10b064844855a3d0ce4cefb5c8d02eab7e0d2d6a Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Thu, 4 Oct 2018 11:28:15 +0200
Subject: [PATCH] online-accounts: Track the lifecycle of CcGoaPanel across
async calls
Due to an API bug in GNOME Online Accounts, the asynchronous
goa_provider_get_all method doesn't accept a GCancellable argument.
This makes it difficult to cancel an ongoing call when the CcGoaPanel
gets destroyed.
Prior to commit c26f8ae018900a55, this was hacked around by taking a
reference on the panel for the duration of the call. Instead of
cancelling a pending call on destruction, it would keep the panel alive
until the call was over. However, that was lost during commit
c26f8ae018900a55.
One thing to bear in mind is that GtkWidgets, CcGoaPanel is one, can
be destroyed by a gtk_widget_destroy call, which is subtly different
than a simple sequence of g_object_unref calls. When gtk_widget_destroy
is used, it invokes the GObject::dispose virtual method of the widget.
It is expected this will cause anything holding a reference to this
widget to drop their references, leading to GObject::finalize being
called. However, there is no guarantee that this will happen in the
same iteration of the GMainLoop. Therefore, it is possible that when
the goa_provider_get_all call finishes, the CcGoaPanel might be in a
disposed, but not yet finalized state.
When a GObject is in a disposed-but-not-finalized state, only a very
limited number of operations can be performed on it. Its reference
count can be altered, the memory used by the instance struct can be
accessed, but none of the member GObjects can be assumed to be valid.
eg., it's definitely illegal to add new rows to the member GtkListBox.
Hence a boolean flag is used to mark the destroyed state of the panel.
This second part is a small improvement over the earlier hack.
https://gitlab.gnome.org/GNOME/gnome-control-center/issues/208
---
diff --git a/panels/online-accounts/cc-online-accounts-panel.c b/panels/online-accounts/cc-online-accounts-panel.c
index e6d6a3d..2afddeb 100644
--- a/panels/online-accounts/cc-online-accounts-panel.c
+++ b/panels/online-accounts/cc-online-accounts-panel.c
@@ -57,6 +57,7 @@ struct _CcGoaPanel
GoaObject *active_object;
GoaObject *removed_object;
+ gboolean destroyed;
guint remove_account_timeout_id;
};
@@ -399,6 +400,8 @@ cc_goa_panel_dispose (GObject *object)
/* Must be destroyed in dispose, not finalize. */
g_clear_pointer ((GtkWidget **) &panel->edit_account_dialog, gtk_widget_destroy);
+ panel->destroyed = TRUE;
+
G_OBJECT_CLASS (cc_goa_panel_parent_class)->dispose (object);
}
@@ -493,6 +496,8 @@ cc_goa_panel_init (CcGoaPanel *panel)
fill_accounts_listbox (panel);
+ goa_provider_get_all (get_all_providers_cb, g_object_ref_sink (panel));
+
gtk_widget_show (GTK_WIDGET (panel));
}
@@ -875,6 +880,9 @@ get_all_providers_cb (GObject *source,
return;
}
+ if (self->destroyed)
+ return;
+
for (l = providers; l != NULL; l = l->next)
{
GoaProvider *provider;

View File

@ -1,246 +0,0 @@
From d8a9c8c3526980e576e8d61d033cd983562b07d3 Mon Sep 17 00:00:00 2001
From: Benjamin Berg <bberg@redhat.com>
Date: Mon, 1 Oct 2018 20:36:05 +0200
Subject: [PATCH] background: Add queue to load 4 pictures at a time
We need to process the pictures sequentially rather than trying to
thumbnail all of them in parallel. This commit adds a simple task queue
from which 4 tasks at will be processed at the same time.
Fixes #191
---
diff --git a/panels/background/bg-pictures-source.c b/panels/background/bg-pictures-source.c
index 3a3027b..3b955bb 100644
--- a/panels/background/bg-pictures-source.c
+++ b/panels/background/bg-pictures-source.c
@@ -45,12 +45,26 @@ struct _BgPicturesSource
CcBackgroundGriloMiner *grl_miner;
+ GQueue add_queue;
+ gint adds_running;
+
GFileMonitor *picture_dir_monitor;
GFileMonitor *cache_dir_monitor;
GHashTable *known_items;
};
+#define MAX_PARALLEL_ADD 4
+
+typedef struct {
+ BgPicturesSource *bg_source;
+ GFile *file;
+ gchar *content_type;
+ guint64 mtime;
+ GtkTreeRowReference **ret_row_ref;
+ GCancellable *cancellable;
+} AddQueueData;
+
G_DEFINE_TYPE (BgPicturesSource, bg_pictures_source, BG_TYPE_SOURCE)
const char * const content_types[] = {
@@ -72,6 +86,86 @@ static char *bg_pictures_source_get_unique_filename (const char *uri);
static void picture_opened_for_read (GObject *source_object, GAsyncResult *res, gpointer user_data);
+static gboolean add_single_file_real (BgPicturesSource *bg_source,
+ GFile *file,
+ const gchar *content_type,
+ guint64 mtime,
+ GtkTreeRowReference **ret_row_ref);
+
+static void
+add_queue_data_free (AddQueueData *data)
+{
+ g_clear_object (&data->file);
+ g_clear_object (&data->cancellable);
+ g_free (data->content_type);
+ g_free (data);
+}
+
+static gboolean
+add_single_file_idle (gpointer user_data)
+{
+ AddQueueData *data = (AddQueueData*) user_data;
+
+ if (!g_cancellable_is_cancelled (data->cancellable))
+ add_single_file_real (data->bg_source, data->file, data->content_type,
+ data->mtime, data->ret_row_ref);
+ add_queue_data_free (data);
+
+ return FALSE;
+}
+
+static void
+ensure_add_processing (BgPicturesSource *bg_source)
+{
+ while (bg_source->adds_running < MAX_PARALLEL_ADD)
+ {
+ AddQueueData *data = g_queue_pop_head (&bg_source->add_queue);
+
+ /* Nothing left to process */
+ if (!data)
+ return;
+
+ g_idle_add (add_single_file_idle, data);
+
+ bg_source->adds_running += 1;
+ }
+}
+
+static void
+add_processing_finished (BgPicturesSource *bg_source)
+{
+ g_assert (bg_source->adds_running > 0);
+
+ bg_source->adds_running -= 1;
+
+ ensure_add_processing (bg_source);
+}
+
+static gboolean
+add_single_file (BgPicturesSource *bg_source,
+ GFile *file,
+ const gchar *content_type,
+ guint64 mtime,
+ GtkTreeRowReference **ret_row_ref)
+{
+ AddQueueData *data = g_new0 (AddQueueData, 1);
+
+ data->bg_source = bg_source;
+ data->file = g_object_ref (file);
+ data->content_type = g_strdup (content_type);
+ data->mtime = mtime;
+ data->ret_row_ref = ret_row_ref;
+ data->cancellable = g_object_ref (bg_source->cancellable);
+
+ g_queue_push_tail (&bg_source->add_queue, data);
+
+ ensure_add_processing (bg_source);
+
+ /* Just return TRUE. */
+ return TRUE;
+}
+
+
static void
bg_pictures_source_dispose (GObject *object)
{
@@ -83,6 +177,9 @@ bg_pictures_source_dispose (GObject *object)
g_clear_object (&source->cancellable);
}
+ g_queue_foreach (&source->add_queue, (GFunc) add_queue_data_free, NULL);
+ g_queue_clear (&source->add_queue);
+
g_clear_object (&source->grl_miner);
G_OBJECT_CLASS (bg_pictures_source_parent_class)->dispose (object);
@@ -206,6 +303,10 @@ picture_scaled (GObject *source_object,
{
g_warning ("Failed to load image: %s", error->message);
remove_placeholder (BG_PICTURES_SOURCE (user_data), item);
+
+ bg_source = BG_PICTURES_SOURCE (user_data);
+ add_processing_finished (bg_source);
+
}
return;
@@ -227,7 +328,9 @@ picture_scaled (GObject *source_object,
{
g_debug ("Ignored URL '%s' as it's a screenshot from gnome-screenshot", uri);
remove_placeholder (BG_PICTURES_SOURCE (user_data), item);
- return;
+
+ add_processing_finished (bg_source);
+ return;
}
/* Process embedded orientation */
@@ -262,6 +365,8 @@ picture_scaled (GObject *source_object,
GINT_TO_POINTER (TRUE));
g_clear_pointer (&surface, cairo_surface_destroy);
+
+ add_processing_finished (bg_source);
}
static void
@@ -286,6 +391,9 @@ picture_opened_for_read (GObject *source_object,
g_autofree gchar *filename = g_file_get_path (G_FILE (source_object));
g_warning ("Failed to load picture '%s': %s", filename, error->message);
remove_placeholder (BG_PICTURES_SOURCE (user_data), item);
+
+ bg_source = BG_PICTURES_SOURCE (user_data);
+ add_processing_finished (bg_source);
}
return;
@@ -339,6 +447,10 @@ picture_copied_for_read (GObject *source_object,
uri = g_file_get_uri (thumbnail_file);
g_warning ("Failed to download '%s': %s", uri, error->message);
+
+ bg_source = BG_PICTURES_SOURCE (user_data);
+ add_processing_finished (bg_source);
+
return;
}
}
@@ -378,10 +490,11 @@ bg_pictures_source_get_cache_file (void)
}
static gboolean
-add_single_file (BgPicturesSource *bg_source,
- GFile *file,
- const gchar *content_type,
- guint64 mtime)
+add_single_file_real (BgPicturesSource *bg_source,
+ GFile *file,
+ const gchar *content_type,
+ guint64 mtime,
+ GtkTreeRowReference **ret_row_ref)
{
g_autoptr(CcBackgroundItem) item = NULL;
CcBackgroundItemFlags flags = 0;
@@ -480,6 +593,11 @@ add_single_file (BgPicturesSource *bg_source,
retval = TRUE;
out:
+
+ /* Async processing is happening. */
+ if (!retval)
+ add_processing_finished (bg_source);
+
return retval;
}
@@ -493,7 +611,7 @@ add_single_file_from_info (BgPicturesSource *bg_source,
content_type = g_file_info_get_content_type (info);
mtime = g_file_info_get_attribute_uint64 (info, G_FILE_ATTRIBUTE_TIME_MODIFIED);
- return add_single_file (bg_source, file, content_type, mtime);
+ return add_single_file (bg_source, file, content_type, mtime, NULL);
}
static gboolean
@@ -518,7 +636,7 @@ add_single_file_from_media (BgPicturesSource *bg_source,
else
mtime_unix = g_get_real_time () / G_USEC_PER_SEC;
- return add_single_file (bg_source, file, content_type, (guint64) mtime_unix);
+ return add_single_file (bg_source, file, content_type, (guint64) mtime_unix, NULL);
}
gboolean
@@ -828,6 +946,8 @@ bg_pictures_source_init (BgPicturesSource *self)
(GDestroyNotify) g_free,
NULL);
+ g_queue_init (&self->add_queue);
+
pictures_path = g_get_user_special_dir (G_USER_DIRECTORY_PICTURES);
if (pictures_path == NULL)
pictures_path = g_get_home_dir ();

View File

@ -1,17 +1,17 @@
diff --git a/panels/user-accounts/run-passwd.c b/panels/user-accounts/run-passwd.c
index 56eea9f..1abefcd 100644
index 86f53d4..14230c8 100644
--- a/panels/user-accounts/run-passwd.c
+++ b/panels/user-accounts/run-passwd.c
@@ -471,7 +471,7 @@ io_watch_stdout (GIOChannel *source, GIOCondition condition, PasswdHandler *pass
@@ -458,7 +458,7 @@ io_watch_stdout (GIOChannel *source, GIOCondition condition, PasswdHandler *pass
"different",
"wrapped",
"recovered",
- "recent",
+ "already used",
+ "already used",
"unchanged",
"match",
"1 numeric or special",
@@ -514,9 +514,9 @@ io_watch_stdout (GIOChannel *source, GIOCondition condition, PasswdHandler *pass
@@ -502,9 +502,9 @@ io_watch_stdout (GIOChannel *source, GIOCondition condition, PasswdHandler *pass
strstr (str->str, "wrapped") != NULL) {
error = g_error_new (PASSWD_ERROR, PASSWD_ERROR_REJECTED,
_("The old and new passwords are too similar"));
@ -24,17 +24,17 @@ index 56eea9f..1abefcd 100644
error = g_error_new (PASSWD_ERROR, PASSWD_ERROR_REJECTED,
_("The new password must contain numeric or special characters"));
diff --git a/po/zh_CN.po b/po/zh_CN.po
index ba8a7a8..03540dd 100644
index f811497..1e1984e 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -7642,8 +7642,8 @@ msgstr "新密码和旧密码太相似"
@@ -7738,8 +7738,8 @@ msgstr "新密码和旧密码太相似"
#: panels/user-accounts/run-passwd.c:519
#: panels/user-accounts/run-passwd.c:507
#, c-format
-msgid "The new password has already been used recently."
-msgstr "新的密码最近已使用过。"
+msgid "Password has been already used. Choose another."
+msgstr "新密码在最近已经使用过。请选用其他密码"
#: panels/user-accounts/run-passwd.c:522
#: panels/user-accounts/run-passwd.c:510
#, c-format

96
distro-logo.patch Normal file
View File

@ -0,0 +1,96 @@
From c8d7a25d5c8d216e78f4148ad041532ead5ec458 Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@gnome.org>
Date: Tue, 9 Mar 2021 14:51:54 -0600
Subject: [PATCH] info-overview: add build option to control distributor logo
Currently, we display a 256x256 version of the OS icon from
/etc/os-release. This is too big for my taste, and it's also not
sufficient for distros that want to display a logo that is not an icon.
For instance, because we no longer display the operating system name
immediately beneath the logo, it may be desirable to use a logo variant
that includes text. This patch adds a meson build option that
distributions can use to override the logo, and a second build option to
specify a different logo for use in dark mode.
---
meson.build | 11 +++++++++++
meson_options.txt | 2 ++
panels/info-overview/cc-info-overview-panel.c | 14 ++++++++++++++
3 files changed, 27 insertions(+)
diff --git a/meson.build b/meson.build
index b8b450046..b234810cb 100644
--- a/meson.build
+++ b/meson.build
@@ -50,6 +50,17 @@ foreach define: set_defines
config_h.set_quoted(define[0], define[1])
endforeach
+distributor_logo = get_option('distributor_logo')
+if (distributor_logo != '')
+ config_h.set_quoted('DISTRIBUTOR_LOGO', distributor_logo,
+ description: 'Define to absolute path of distributor logo')
+ dark_mode_distributor_logo = get_option('dark_mode_distributor_logo')
+ if (dark_mode_distributor_logo != '')
+ config_h.set_quoted('DARK_MODE_DISTRIBUTOR_LOGO', dark_mode_distributor_logo,
+ description: 'Define to absolute path of distributor logo for use in dark mode')
+ endif
+endif
+
# meson does not support octal values, so it must be handled as a
# string. See: https://github.com/mesonbuild/meson/issues/2047
config_h.set('USER_DIR_MODE', '0700',
diff --git a/meson_options.txt b/meson_options.txt
index dbca72387..461ae34e7 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -7,3 +7,5 @@ option('tracing', type: 'boolean', value: false, description: 'add extra debuggi
option('wayland', type: 'boolean', value: true, description: 'build with Wayland support')
option('profile', type: 'combo', choices: ['default','development'], value: 'default')
option('malcontent', type: 'boolean', value: false, description: 'build with malcontent support')
+option('distributor_logo', type: 'string', description: 'absolute path to distributor logo for the About panel')
+option('dark_mode_distributor_logo', type: 'string', description: 'absolute path to distributor logo dark mode variant')
diff --git a/panels/info-overview/cc-info-overview-panel.c b/panels/info-overview/cc-info-overview-panel.c
index 274a3c644..f0d0f4636 100644
--- a/panels/info-overview/cc-info-overview-panel.c
+++ b/panels/info-overview/cc-info-overview-panel.c
@@ -924,6 +924,7 @@ cc_info_panel_row_activated_cb (CcInfoOverviewPanel *self,
open_software_update (self);
}
+#if !defined(DISTRIBUTOR_LOGO) || defined(DARK_MODE_DISTRIBUTOR_LOGO)
static gboolean
use_dark_theme (CcInfoOverviewPanel *panel)
{
@@ -931,10 +932,22 @@ use_dark_theme (CcInfoOverviewPanel *panel)
return adw_style_manager_get_dark (style_manager);
}
+#endif
static void
setup_os_logo (CcInfoOverviewPanel *panel)
{
+#ifdef DISTRIBUTOR_LOGO
+#ifdef DARK_MODE_DISTRIBUTOR_LOGO
+ if (use_dark_theme (panel))
+ {
+ gtk_picture_set_filename (panel->os_logo, DARK_MODE_DISTRIBUTOR_LOGO);
+ return;
+ }
+#endif
+ gtk_picture_set_filename (panel->os_logo, DISTRIBUTOR_LOGO);
+ return;
+#else
GtkIconTheme *icon_theme;
g_autofree char *logo_name = g_get_os_info ("LOGO");
g_autoptr(GtkIconPaintable) icon_paintable = NULL;
@@ -962,6 +975,7 @@ setup_os_logo (CcInfoOverviewPanel *panel)
gtk_widget_get_direction (GTK_WIDGET (panel)),
0);
gtk_picture_set_paintable (panel->os_logo, GDK_PAINTABLE (icon_paintable));
+#endif
}
static void
--
GitLab

Binary file not shown.

Binary file not shown.

View File

@ -1,5 +1,5 @@
diff --git a/panels/user-accounts/pw-utils.c b/panels/user-accounts/pw-utils.c
index 0f4dfd8..617e0d7 100644
index 0f4dfd8..700a5a4 100644
--- a/panels/user-accounts/pw-utils.c
+++ b/panels/user-accounts/pw-utils.c
@@ -127,7 +127,7 @@ pw_error_hint (gint error)
@ -7,15 +7,15 @@ index 0f4dfd8..617e0d7 100644
return C_("Password hint", "Password needs to be longer. Try to add more letters, numbers and punctuation.");
case PWQ_ERROR_EMPTY_PASSWORD:
- return C_("Password hint", "Mix uppercase and lowercase and try to use a number or two.");
+ return C_("Password hint", "Mix at least three types of these: lower and upper case letters, digits and any of characters.");
+ return C_("Password hint", "Mix at least three types of these: lower and upper case letters, digits and any of characters.");
default:
return C_("Password hint", "Adding more letters, numbers and punctuation will make the password stronger.");
}
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 03540dd..34e1624 100644
index 1e1984e..bab9794 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -7612,8 +7612,8 @@ msgstr "需要更长的密码。请试着加入更多的字母、数字和标点
@@ -7708,8 +7708,8 @@ msgstr "需要更长的密码。请试着加入更多的字母、数字和标点
#: panels/user-accounts/pw-utils.c:130
msgctxt "Password hint"

View File

@ -1,10 +1,3 @@
From 758b69f9834d24120a7e5f1c20cf5b63c67a4aca Mon Sep 17 00:00:00 2001
Date: Fri, 14 Feb 2020 18:14:33 +0800
Subject: [PATCH] control-center: remove country in the name of timezone
Change-Id: I794c649d35e498bdd4273062b982c04ebe953e6c
---
diff --git a/panels/datetime/backward b/panels/datetime/backward
index 8594be6..3fe71fc 100644
--- a/panels/datetime/backward
@ -25,10 +18,10 @@ index 8594be6..3fe71fc 100644
\ No newline at end of file
+Link Etc/UTC Zulu
diff --git a/panels/datetime/cc-datetime-panel.c b/panels/datetime/cc-datetime-panel.c
index eb7e78b..3a58d93 100644
index c1e6aaa..f562556 100644
--- a/panels/datetime/cc-datetime-panel.c
+++ b/panels/datetime/cc-datetime-panel.c
@@ -414,7 +414,6 @@ translated_city_name (TzLocation *loc)
@@ -405,7 +405,6 @@ translated_city_name (TzLocation *loc)
{
g_autofree gchar *zone_translated = NULL;
g_auto(GStrv) split_translated = NULL;
@ -36,7 +29,7 @@ index eb7e78b..3a58d93 100644
gchar *name;
gint length;
@@ -427,11 +426,10 @@ translated_city_name (TzLocation *loc)
@@ -418,11 +417,9 @@ translated_city_name (TzLocation *loc)
length = g_strv_length (split_translated);
@ -48,7 +41,6 @@ index eb7e78b..3a58d93 100644
+ /* Translators: "city" */
+ name = g_strdup_printf (C_("timezone loc", "%s"),
+ split_translated[length-1]);
+
return name;
}

View File

@ -1,42 +1,75 @@
%define gnome_online_accounts_version 3.25.3
%define glib2_version 2.68.0
%define gnome_desktop_version 42.0
%define gsd_version 41.0
%define gsettings_desktop_schemas_version 42.0
%define upower_version 0.99.8
%define gtk4_version 4.4
%define gnome_bluetooth_version 42.0
%define libadwaita_version 1.1.0
%define nm_version 1.24
Name: gnome-control-center
Version: 3.38.6
Release: 2
Version: 42.0
Release: 1
Summary: GNOME Settings is GNOME's main interface for configuration of various aspects of your desktop.
License: GPLv2+ and CC-BY-SA
License: GPLv2+
URL: http://www.gnome.org
Source0: https://download.gnome.org/sources/gnome-control-center/3.38/%{name}-%{version}.tar.xz
BuildRequires: chrpath cups-devel desktop-file-utils docbook-style-xsl gettext gcc git libudisks2-devel
BuildRequires: libxslt meson accountsservice-devel cheese-libs-devel clutter-gtk-devel colord-devel
BuildRequires: colord-gtk-devel gdk-pixbuf2-devel gtk3-devel glib2-devel pulseaudio-libs-devel
BuildRequires: gnome-desktop3-devel gnome-settings-daemon-devel gnome-online-accounts-devel
BuildRequires: grilo-devel gsettings-desktop-schemas-devel gtk3-devel libgudev-devel ibus-devel
BuildRequires: libcanberra-devel libgtop2-devel NetworkManager-libnm-devel libnma-devel
BuildRequires: libsecret-devel libsoup-devel libxml2-devel ModemManager-glib-devel polkit-devel
BuildRequires: libpwquality-devel libsmbclient-devel upower-devel libX11-devel libXi-devel
BuildRequires: gnome-bluetooth-libs-devel libwacom-devel gsound-devel
BuildRequires: pkgconfig(libhandy-1)
Requires: accountsservice alsa-lib bolt colord cups-pk-helper dbus-x11 glx-utils iso-codes
Requires: nm-connection-editor switcheroo-control /usr/bin/gkbd-keyboard-display
Requires: gnome-bluetooth >= 1:3.18.2 %{name}-filesystem = %{version}-%{release}
Requires: upower >= 0.99.6 cheese-libs >= 3.28.0 glib2 >= 2.53.0 gtk3 >= 3.22.20
Requires: gnome-online-accounts >= 3.25.3 gnome-settings-daemon >= 3.25.90
Requires: gsettings-desktop-schemas >= 3.27.2 gnome-desktop3 >= 3.27.90
Recommends: NetworkManager-wifi vino
Provides: control-center = 1:%{version}-%{release}
Provides: control-center%{?_isa} = 1:%{version}-%{release}
Obsoletes: control-center < 1:%{version}-%{release}
Patch1: 0001-online-accounts-Track-the-lifecycle-of-CcGoaPanel-ac.patch
Patch2: 0002-background-Add-queue-to-load-4-pictures-at-a-time.patch
Source0: https://download.gnome.org/sources/gnome-control-center/42/%{name}-%{version}.tar.xz
Patch0: distro-logo.patch
Patch1: prettify-info.patch
Patch2: 0001-online-accounts-Fix-goa-helper-on-X11.patch
Patch9001: bugfix-fix_used_passwd_error_capture.patch
Patch9002: bugfix-gnome-control-center-fix-repetitivewallpapers.patch
Patch9003: gnome-control-center-change-translation-when-changing-password.patch
Patch9004: gnome-control-center-remove-country-in-the-name-of-timezone.patch
BuildRequires: chrpath gcc meson gettext cups-devel desktop-file-utils docbook-style-xsl libxslt
BuildRequires: accountsservice-devel clutter-gtk-devel colord-devel
BuildRequires: gcr-devel gdk-pixbuf2-devel gtk3-devel gnome-online-accounts-devel
BuildRequires: gsound-devel libgudev-devel ibus-devel libgtop2-devel
BuildRequires: pulseaudio-libs-devel libsecret-devel libxml2-devel ModemManager-glib-devel
BuildRequires: pkgconfig(polkit-gobject-1) pkgconfig(pwquality) pkgconfig(smbclient)
BuildRequires: pkgconfig(libwacom) pkgconfig(colord-gtk4) pkgconfig(libnma-gtk4)
BuildRequires: pkgconfig(x11) pkgconfig(xi) pkgconfig(udisks2)
BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version}
BuildRequires: pkgconfig(gnome-desktop-4) >= %{gnome_desktop_version}
BuildRequires: pkgconfig(gnome-settings-daemon) >= %{gsd_version}
BuildRequires: pkgconfig(goa-1.0) >= %{gnome_online_accounts_version}
BuildRequires: pkgconfig(libadwaita-1) >= %{libadwaita_version}
BuildRequires: pkgconfig(gsettings-desktop-schemas) >= %{gsettings_desktop_schemas_version}
BuildRequires: pkgconfig(libnm) >= %{nm_version}
BuildRequires: pkgconfig(gtk4) >= %{gtk4_version}
BuildRequires: pkgconfig(upower-glib) >= %{upower_version}
BuildRequires: pkgconfig(gnome-bluetooth-3.0) >= %{gnome_bluetooth_version}
Requires: libadwaita%{?_isa} >= %{libadwaita_version}
Requires: glib2%{?_isa} >= %{glib2_version}
Requires: gnome-desktop3%{?_isa} >= %{gnome_desktop_version}
Requires: gnome-online-accounts%{?_isa} >= %{gnome_online_accounts_version}
Requires: gnome-settings-daemon%{?_isa} >= %{gsd_version}
Requires: gsettings-desktop-schemas%{?_isa} >= %{gsettings_desktop_schemas_version}
Requires: gtk4%{?_isa} >= %{gtk4_version}
Requires: upower%{?_isa} >= %{upower_version}
Requires: gnome-bluetooth%{?_isa} >= 1:%{gnome_bluetooth_version}
Requires: %{name}-filesystem = %{version}-%{release}
Requires: accountsservice alsa-lib colord cups-pk-helper dbus glx-utils iso-codes
Requires: libgnomekbd
Recommends: bolt
Recommends: NetworkManager-wifi
Recommends: nm-connection-editor
Recommends: gnome-color-manager
Recommends: gnome-remote-desktop
Recommends: rygel
Recommends: switcheroo-control
Recommends: power-profiles-daemon
Provides: control-center = 1:%{version}-%{release}
Provides: control-center%{?_isa} = 1:%{version}-%{release}
Obsoletes: control-center < 1:%{version}-%{release}
%description
Gnome-control-center is a graphical user interface to configure
various aspects of GNOME.
@ -44,10 +77,10 @@ The configuration files that are picked up by the control-center
utilities are installed in directories contained by this package
%package filesystem
Summary: Directories for %{name}
BuildArch: noarch
Provides: control-center-filesystem = 1:%{version}-%{release}
Obsoletes: control-center-filesystem < 1:%{version}-%{release}
Summary: Directories for %{name}
BuildArch: noarch
Provides: control-center-filesystem = 1:%{version}-%{release}
Obsoletes: control-center-filesystem < 1:%{version}-%{release}
%description filesystem
The %{name}-filesystem contains directories where applications can
@ -60,47 +93,55 @@ utilities in this package.
%autosetup -n %{name}-%{version} -p1
%build
%meson -Ddocumentation=true
%meson \
-Ddocumentation=true
%meson_build
%install
%meson_install
mkdir -p %{buildroot}%{_datadir}/gnome/wm-properties
mkdir -p $RPM_BUILD_ROOT%{_datadir}/gnome/wm-properties
%find_lang %{name} --all-name --with-gnome
chrpath --delete %{buildroot}%{_bindir}/gnome-control-center
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/gnome-control-center
%files -f %{name}.lang
%license COPYING
%{_bindir}/gnome-control-center
%{_libexecdir}/gnome-control-center-search-provider
%{_libexecdir}/cc-remote-login-helper
%{_libexecdir}/gnome-control-center-print-renderer
%{_datadir}/sounds/gnome/default/alerts/*.ogg
%{_datadir}/polkit-1/actions/*.policy
%{_datadir}/polkit-1/rules.d/gnome-control-center.rules
%{_datadir}/pixmaps/faces/
%{_datadir}/pkgconfig/*.pc
%{_datadir}/icons/hicolor/*
%{_datadir}/metainfo/*.xml
%{_datadir}/gnome-control-center/*
%{_datadir}/gnome-shell/search-providers/*.ini
%{_datadir}/glib-2.0/schemas/*.xml
%{_datadir}/gettext/its/*
%{_datadir}/dbus-1/services/*.service
%{_datadir}/bash-completion/completions/gnome-control-center
%{_datadir}/applications/*.desktop
%{_datadir}/bash-completion/completions/gnome-control-center
%{_datadir}/dbus-1/services/org.gnome.Settings.SearchProvider.service
%{_datadir}/dbus-1/services/org.gnome.Settings.service
%{_datadir}/gettext/
%{_datadir}/glib-2.0/schemas/org.gnome.Settings.gschema.xml
%{_datadir}/gnome-control-center/keybindings/*.xml
%{_datadir}/gnome-control-center/pixmaps
%{_datadir}/gnome-shell/search-providers/org.gnome.Settings.search-provider.ini
%{_datadir}/icons/gnome-logo-text*.svg
%{_datadir}/icons/hicolor/*/*/*
%{_metainfodir}/org.gnome.Settings.appdata.xml
%{_datadir}/pixmaps/faces
%{_datadir}/pkgconfig/gnome-keybindings.pc
%{_datadir}/polkit-1/actions/org.gnome.controlcenter.*.policy
%{_datadir}/polkit-1/rules.d/gnome-control-center.rules
%{_datadir}/sounds/gnome/default/*/*.ogg
%{_libexecdir}/cc-remote-login-helper
%{_libexecdir}/gnome-control-center-goa-helper
%{_libexecdir}/gnome-control-center-search-provider
%{_libexecdir}/gnome-control-center-print-renderer
%files filesystem
%dir %{_datadir}/gnome/wm-properties
%dir %{_datadir}/gnome-control-center/
%dir %{_datadir}/gnome-control-center
%dir %{_datadir}/gnome-control-center/keybindings
%dir %{_datadir}/gnome/wm-properties
%files help
%doc NEWS README.md
%{_mandir}/man1/*.gz
%{_datadir}/man/man1/gnome-control-center.1*
%changelog
* Mon Mar 28 2022 lin zhang <lin.zhang@turbolinux.com.cn> - 42.0-1
- Udpate to 42.0
* Wed Aug 04 2021 chenyanpanHW <chenyanpan@huawei.com> - 3.38.6-2
- DESC: delete BuildRequires gdb

View File

@ -1,4 +1,4 @@
version_control: github
src_repo: GNOME/gnome-control-center
tag_prefix: "^"
seperator: "."
separator: "."

447
prettify-info.patch Normal file
View File

@ -0,0 +1,447 @@
From f64df4e31d0ff714516552fcf647e773fa00ffd2 Mon Sep 17 00:00:00 2001
From: Norbert Pfeiler <norbert.pfeiler+git@gmail.com>
Date: Sat, 29 Jan 2022 08:01:08 +0100
Subject: [PATCH 01/10] =?UTF-8?q?info-overview:=20There=20is=20no=20?=
=?UTF-8?q?=E2=80=9CAMD=C2=AE=E2=80=9D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
AMD doesnt have a registered trademark for the string only.
---
panels/info-overview/info-cleanup.c | 1 -
tests/info/info-cleanup-test.txt | 10 +++++-----
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/panels/info-overview/info-cleanup.c b/panels/info-overview/info-cleanup.c
index 5a7392722..b30bf4acc 100644
--- a/panels/info-overview/info-cleanup.c
+++ b/panels/info-overview/info-cleanup.c
@@ -43,7 +43,6 @@ prettify_info (const char *info)
{ "Gallium .* on (AMD .*)", "\\1"},
{ "(AMD .*) [(].*", "\\1"},
{ "(AMD [A-Z])(.*)", "\\1\\L\\2\\E"},
- { "AMD", "AMD\302\256"},
{ "Graphics Controller", "Graphics"},
};
diff --git a/tests/info/info-cleanup-test.txt b/tests/info/info-cleanup-test.txt
index 6dc72a56e..dd0ea8954 100644
--- a/tests/info/info-cleanup-test.txt
+++ b/tests/info/info-cleanup-test.txt
@@ -1,8 +1,8 @@
Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz Intel® Core™ i5-4590T CPU @ 2.00GHz
Intel(R) Ivybridge Mobile Intel® Ivybridge Mobile
Intel(R) Ivybridge Mobile Intel® Ivybridge Mobile
-Gallium 0.4 on AMD KAVERI AMD® Kaveri
-AMD KAVERI (DRM 2.48.0 / 4.9.0-0.rc4.git2.2.fc26.x86_64, LLVM3) AMD® Kaveri
-AMD KAVERI (DRM 2.48.0 / 4.9.0-0.rc4.git2.2.fc26.x86_64, LLVM3 AMD® Kaveri
-Gallium 0.4 on AMD KAVERI (DRM 2.48.0 / 4.9.0-0.rc4.git2.2.fc26.x86_64, LLVM3) AMD® Kaveri
-Gallium 0.4 on AMD KAVERI (DRM 2.48.0 / 4.9.0-0.rc4.git2.2.fc26.x86_64, LLVM3 AMD® Kaveri
+Gallium 0.4 on AMD KAVERI AMD Kaveri
+AMD KAVERI (DRM 2.48.0 / 4.9.0-0.rc4.git2.2.fc26.x86_64, LLVM3) AMD Kaveri
+AMD KAVERI (DRM 2.48.0 / 4.9.0-0.rc4.git2.2.fc26.x86_64, LLVM3 AMD Kaveri
+Gallium 0.4 on AMD KAVERI (DRM 2.48.0 / 4.9.0-0.rc4.git2.2.fc26.x86_64, LLVM3) AMD Kaveri
+Gallium 0.4 on AMD KAVERI (DRM 2.48.0 / 4.9.0-0.rc4.git2.2.fc26.x86_64, LLVM3 AMD Kaveri
--
2.35.1
From 3851a5ca92633d8bf790116bf57143ba9eb85b2b Mon Sep 17 00:00:00 2001
From: Norbert Pfeiler <norbert.pfeiler+git@gmail.com>
Date: Sat, 29 Jan 2022 08:03:51 +0100
Subject: [PATCH 02/10] info-overview: If names are all caps, leave them be
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This made everything AMD lower case after the second word
and is likely unintentional for something like EPYC™.
e.g. was
AMD Ryzen threadripper 1950x 16-core processor
AMD Radeon rx 580 series
---
panels/info-overview/info-cleanup.c | 1 -
tests/info/info-cleanup-test.txt | 13 ++++++++-----
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/panels/info-overview/info-cleanup.c b/panels/info-overview/info-cleanup.c
index b30bf4acc..f723de6f4 100644
--- a/panels/info-overview/info-cleanup.c
+++ b/panels/info-overview/info-cleanup.c
@@ -42,7 +42,6 @@ prettify_info (const char *info)
{ "Atom[(]TM[)]", "Atom\342\204\242"},
{ "Gallium .* on (AMD .*)", "\\1"},
{ "(AMD .*) [(].*", "\\1"},
- { "(AMD [A-Z])(.*)", "\\1\\L\\2\\E"},
{ "Graphics Controller", "Graphics"},
};
diff --git a/tests/info/info-cleanup-test.txt b/tests/info/info-cleanup-test.txt
index dd0ea8954..c074fb6f5 100644
--- a/tests/info/info-cleanup-test.txt
+++ b/tests/info/info-cleanup-test.txt
@@ -1,8 +1,11 @@
Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz Intel® Core™ i5-4590T CPU @ 2.00GHz
Intel(R) Ivybridge Mobile Intel® Ivybridge Mobile
Intel(R) Ivybridge Mobile Intel® Ivybridge Mobile
-Gallium 0.4 on AMD KAVERI AMD Kaveri
-AMD KAVERI (DRM 2.48.0 / 4.9.0-0.rc4.git2.2.fc26.x86_64, LLVM3) AMD Kaveri
-AMD KAVERI (DRM 2.48.0 / 4.9.0-0.rc4.git2.2.fc26.x86_64, LLVM3 AMD Kaveri
-Gallium 0.4 on AMD KAVERI (DRM 2.48.0 / 4.9.0-0.rc4.git2.2.fc26.x86_64, LLVM3) AMD Kaveri
-Gallium 0.4 on AMD KAVERI (DRM 2.48.0 / 4.9.0-0.rc4.git2.2.fc26.x86_64, LLVM3 AMD Kaveri
+Gallium 0.4 on AMD KAVERI AMD KAVERI
+AMD KAVERI (DRM 2.48.0 / 4.9.0-0.rc4.git2.2.fc26.x86_64, LLVM3) AMD KAVERI
+AMD KAVERI (DRM 2.48.0 / 4.9.0-0.rc4.git2.2.fc26.x86_64, LLVM3 AMD KAVERI
+Gallium 0.4 on AMD KAVERI (DRM 2.48.0 / 4.9.0-0.rc4.git2.2.fc26.x86_64, LLVM3) AMD KAVERI
+Gallium 0.4 on AMD KAVERI (DRM 2.48.0 / 4.9.0-0.rc4.git2.2.fc26.x86_64, LLVM3 AMD KAVERI
+AMD Ryzen Threadripper 1950X 16-Core Processor AMD Ryzen Threadripper 1950X 16-Core Processor
+AMD Radeon RX 580 Series (POLARIS10, DRM 3.42.0, 5.15.13-1-ck-generic-v3, LLVM 13.0.0) AMD Radeon RX 580 Series
+AMD EPYC 7251 8-Core Processor AMD EPYC 7251 8-Core Processor
--
2.35.1
From 8d44e51983e002c1cac3a9b84e8ba8b6158c1dde Mon Sep 17 00:00:00 2001
From: Norbert Pfeiler <norbert.pfeiler+git@gmail.com>
Date: Sat, 29 Jan 2022 08:06:49 +0100
Subject: [PATCH 03/10] info-overview: Always omit Gallium, not just for AMD
---
panels/info-overview/info-cleanup.c | 2 +-
tests/info/info-cleanup-test.txt | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/panels/info-overview/info-cleanup.c b/panels/info-overview/info-cleanup.c
index f723de6f4..a444389c7 100644
--- a/panels/info-overview/info-cleanup.c
+++ b/panels/info-overview/info-cleanup.c
@@ -40,7 +40,7 @@ prettify_info (const char *info)
{ "Intel[(]R[)]", "Intel\302\256"},
{ "Core[(]TM[)]", "Core\342\204\242"},
{ "Atom[(]TM[)]", "Atom\342\204\242"},
- { "Gallium .* on (AMD .*)", "\\1"},
+ { "Gallium \\d+\\.\\d+ on (.*)", "\\1"},
{ "(AMD .*) [(].*", "\\1"},
{ "Graphics Controller", "Graphics"},
};
diff --git a/tests/info/info-cleanup-test.txt b/tests/info/info-cleanup-test.txt
index c074fb6f5..637da42ab 100644
--- a/tests/info/info-cleanup-test.txt
+++ b/tests/info/info-cleanup-test.txt
@@ -9,3 +9,5 @@ Gallium 0.4 on AMD KAVERI (DRM 2.48.0 / 4.9.0-0.rc4.git2.2.fc26.x86_64, LLVM3 AM
AMD Ryzen Threadripper 1950X 16-Core Processor AMD Ryzen Threadripper 1950X 16-Core Processor
AMD Radeon RX 580 Series (POLARIS10, DRM 3.42.0, 5.15.13-1-ck-generic-v3, LLVM 13.0.0) AMD Radeon RX 580 Series
AMD EPYC 7251 8-Core Processor AMD EPYC 7251 8-Core Processor
+Gallium 0.4 on SVGA3D SVGA3D
+Gallium 0.4 on llvmpipe (LLVM 3.4, 128 bits) llvmpipe (LLVM 3.4, 128 bits)
--
2.35.1
From 3cf413e65a3c30f514e5dd4f9d09e9b1aab7f4cb Mon Sep 17 00:00:00 2001
From: Norbert Pfeiler <norbert.pfeiler+git@gmail.com>
Date: Sat, 29 Jan 2022 08:25:21 +0100
Subject: [PATCH 04/10] info-overview: Use a more generic regex to match the
Mesa infos
---
panels/info-overview/info-cleanup.c | 2 +-
tests/info/info-cleanup-test.txt | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/panels/info-overview/info-cleanup.c b/panels/info-overview/info-cleanup.c
index a444389c7..10418a5ec 100644
--- a/panels/info-overview/info-cleanup.c
+++ b/panels/info-overview/info-cleanup.c
@@ -41,7 +41,7 @@ prettify_info (const char *info)
{ "Core[(]TM[)]", "Core\342\204\242"},
{ "Atom[(]TM[)]", "Atom\342\204\242"},
{ "Gallium \\d+\\.\\d+ on (.*)", "\\1"},
- { "(AMD .*) [(].*", "\\1"},
+ { " [(][^)]*(DRM|MESA|LLVM)[^)]*[)]?", ""},
{ "Graphics Controller", "Graphics"},
};
diff --git a/tests/info/info-cleanup-test.txt b/tests/info/info-cleanup-test.txt
index 637da42ab..2f4327977 100644
--- a/tests/info/info-cleanup-test.txt
+++ b/tests/info/info-cleanup-test.txt
@@ -10,4 +10,4 @@ AMD Ryzen Threadripper 1950X 16-Core Processor AMD Ryzen Threadripper 1950X 16-C
AMD Radeon RX 580 Series (POLARIS10, DRM 3.42.0, 5.15.13-1-ck-generic-v3, LLVM 13.0.0) AMD Radeon RX 580 Series
AMD EPYC 7251 8-Core Processor AMD EPYC 7251 8-Core Processor
Gallium 0.4 on SVGA3D SVGA3D
-Gallium 0.4 on llvmpipe (LLVM 3.4, 128 bits) llvmpipe (LLVM 3.4, 128 bits)
+Gallium 0.4 on llvmpipe (LLVM 3.4, 128 bits) llvmpipe
--
2.35.1
From 71ecb8b1293e868ac1fb19eb6655436d71f445d3 Mon Sep 17 00:00:00 2001
From: Norbert Pfeiler <norbert.pfeiler+git@gmail.com>
Date: Sat, 29 Jan 2022 08:09:46 +0100
Subject: [PATCH 05/10] info-overview: Replace the trademark symbols in a more
generic way
---
panels/info-overview/info-cleanup.c | 5 ++---
tests/info/info-cleanup-test.txt | 2 ++
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/panels/info-overview/info-cleanup.c b/panels/info-overview/info-cleanup.c
index 10418a5ec..25d957a1d 100644
--- a/panels/info-overview/info-cleanup.c
+++ b/panels/info-overview/info-cleanup.c
@@ -37,9 +37,8 @@ prettify_info (const char *info)
int i;
static const ReplaceStrings rs[] = {
{ "Mesa DRI ", ""},
- { "Intel[(]R[)]", "Intel\302\256"},
- { "Core[(]TM[)]", "Core\342\204\242"},
- { "Atom[(]TM[)]", "Atom\342\204\242"},
+ { "[(]R[)]", "\302\256"},
+ { "[(](tm|TM)[)]", "\342\204\242"},
{ "Gallium \\d+\\.\\d+ on (.*)", "\\1"},
{ " [(][^)]*(DRM|MESA|LLVM)[^)]*[)]?", ""},
{ "Graphics Controller", "Graphics"},
diff --git a/tests/info/info-cleanup-test.txt b/tests/info/info-cleanup-test.txt
index 2f4327977..e8ca5da0f 100644
--- a/tests/info/info-cleanup-test.txt
+++ b/tests/info/info-cleanup-test.txt
@@ -11,3 +11,5 @@ AMD Radeon RX 580 Series (POLARIS10, DRM 3.42.0, 5.15.13-1-ck-generic-v3, LLVM 1
AMD EPYC 7251 8-Core Processor AMD EPYC 7251 8-Core Processor
Gallium 0.4 on SVGA3D SVGA3D
Gallium 0.4 on llvmpipe (LLVM 3.4, 128 bits) llvmpipe
+AMD FX(tm)-8350 Eight-Core Processor AMD FX™-8350 Eight-Core Processor
+AMD Athlon(tm) II X3 435 Processor AMD Athlon™ II X3 435 Processor
--
2.35.1
From 307b420c90763d03e8a32d74dc5cf23d39d1b689 Mon Sep 17 00:00:00 2001
From: Norbert Pfeiler <norbert.pfeiler+git@gmail.com>
Date: Sat, 29 Jan 2022 10:58:55 +0100
Subject: [PATCH 06/10] info-overview: Remove some junk info, like PCIe and SSE
---
panels/info-overview/info-cleanup.c | 1 +
tests/info/info-cleanup-test.txt | 2 ++
2 files changed, 3 insertions(+)
diff --git a/panels/info-overview/info-cleanup.c b/panels/info-overview/info-cleanup.c
index 25d957a1d..f0e8cc772 100644
--- a/panels/info-overview/info-cleanup.c
+++ b/panels/info-overview/info-cleanup.c
@@ -40,6 +40,7 @@ prettify_info (const char *info)
{ "[(]R[)]", "\302\256"},
{ "[(](tm|TM)[)]", "\342\204\242"},
{ "Gallium \\d+\\.\\d+ on (.*)", "\\1"},
+ { " x86|/MMX|/SSE2|/PCIe", ""},
{ " [(][^)]*(DRM|MESA|LLVM)[^)]*[)]?", ""},
{ "Graphics Controller", "Graphics"},
};
diff --git a/tests/info/info-cleanup-test.txt b/tests/info/info-cleanup-test.txt
index e8ca5da0f..ce8084305 100644
--- a/tests/info/info-cleanup-test.txt
+++ b/tests/info/info-cleanup-test.txt
@@ -13,3 +13,5 @@ Gallium 0.4 on SVGA3D SVGA3D
Gallium 0.4 on llvmpipe (LLVM 3.4, 128 bits) llvmpipe
AMD FX(tm)-8350 Eight-Core Processor AMD FX™-8350 Eight-Core Processor
AMD Athlon(tm) II X3 435 Processor AMD Athlon™ II X3 435 Processor
+NVIDIA GeForce GT 710/PCIe/SSE2 NVIDIA GeForce GT 710
+Mesa DRI Intel(R) 965GM x86/MMX/SSE2 Intel® 965GM
--
2.35.1
From da98faf10360d8a278e672a44858c1c249101d53 Mon Sep 17 00:00:00 2001
From: Norbert Pfeiler <norbert.pfeiler+git@gmail.com>
Date: Sat, 29 Jan 2022 10:31:17 +0100
Subject: [PATCH 07/10] info-overview: Remove redundant/elaborate info
Remove redundant/elaborate in strings like CPU, Core and Processor.
---
panels/info-overview/info-cleanup.c | 1 +
tests/info/info-cleanup-test.txt | 10 +++++-----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/panels/info-overview/info-cleanup.c b/panels/info-overview/info-cleanup.c
index f0e8cc772..21ea83dd3 100644
--- a/panels/info-overview/info-cleanup.c
+++ b/panels/info-overview/info-cleanup.c
@@ -40,6 +40,7 @@ prettify_info (const char *info)
{ "[(]R[)]", "\302\256"},
{ "[(](tm|TM)[)]", "\342\204\242"},
{ "Gallium \\d+\\.\\d+ on (.*)", "\\1"},
+ { " CPU| Processor| \\S+-Core", ""},
{ " x86|/MMX|/SSE2|/PCIe", ""},
{ " [(][^)]*(DRM|MESA|LLVM)[^)]*[)]?", ""},
{ "Graphics Controller", "Graphics"},
diff --git a/tests/info/info-cleanup-test.txt b/tests/info/info-cleanup-test.txt
index ce8084305..6de8e0bc5 100644
--- a/tests/info/info-cleanup-test.txt
+++ b/tests/info/info-cleanup-test.txt
@@ -1,4 +1,4 @@
-Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz Intel® Core™ i5-4590T CPU @ 2.00GHz
+Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz Intel® Core™ i5-4590T @ 2.00GHz
Intel(R) Ivybridge Mobile Intel® Ivybridge Mobile
Intel(R) Ivybridge Mobile Intel® Ivybridge Mobile
Gallium 0.4 on AMD KAVERI AMD KAVERI
@@ -6,12 +6,12 @@ AMD KAVERI (DRM 2.48.0 / 4.9.0-0.rc4.git2.2.fc26.x86_64, LLVM3) AMD KAVERI
AMD KAVERI (DRM 2.48.0 / 4.9.0-0.rc4.git2.2.fc26.x86_64, LLVM3 AMD KAVERI
Gallium 0.4 on AMD KAVERI (DRM 2.48.0 / 4.9.0-0.rc4.git2.2.fc26.x86_64, LLVM3) AMD KAVERI
Gallium 0.4 on AMD KAVERI (DRM 2.48.0 / 4.9.0-0.rc4.git2.2.fc26.x86_64, LLVM3 AMD KAVERI
-AMD Ryzen Threadripper 1950X 16-Core Processor AMD Ryzen Threadripper 1950X 16-Core Processor
+AMD Ryzen Threadripper 1950X 16-Core Processor AMD Ryzen Threadripper 1950X
AMD Radeon RX 580 Series (POLARIS10, DRM 3.42.0, 5.15.13-1-ck-generic-v3, LLVM 13.0.0) AMD Radeon RX 580 Series
-AMD EPYC 7251 8-Core Processor AMD EPYC 7251 8-Core Processor
+AMD EPYC 7251 8-Core Processor AMD EPYC 7251
Gallium 0.4 on SVGA3D SVGA3D
Gallium 0.4 on llvmpipe (LLVM 3.4, 128 bits) llvmpipe
-AMD FX(tm)-8350 Eight-Core Processor AMD FX™-8350 Eight-Core Processor
-AMD Athlon(tm) II X3 435 Processor AMD Athlon™ II X3 435 Processor
+AMD FX(tm)-8350 Eight-Core Processor AMD FX™-8350
+AMD Athlon(tm) II X3 435 Processor AMD Athlon™ II X3 435
NVIDIA GeForce GT 710/PCIe/SSE2 NVIDIA GeForce GT 710
Mesa DRI Intel(R) 965GM x86/MMX/SSE2 Intel® 965GM
--
2.35.1
From 4132e8856c8c1b6dfc64745e17d64078b4aa05cc Mon Sep 17 00:00:00 2001
From: Norbert Pfeiler <norbert.pfeiler+git@gmail.com>
Date: Sat, 29 Jan 2022 10:29:15 +0100
Subject: [PATCH 08/10] info-overview: Remove some rare @ x.yz GHz
specification
---
panels/info-overview/info-cleanup.c | 2 +-
tests/info/info-cleanup-test.txt | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/panels/info-overview/info-cleanup.c b/panels/info-overview/info-cleanup.c
index 21ea83dd3..7d640bb64 100644
--- a/panels/info-overview/info-cleanup.c
+++ b/panels/info-overview/info-cleanup.c
@@ -40,7 +40,7 @@ prettify_info (const char *info)
{ "[(]R[)]", "\302\256"},
{ "[(](tm|TM)[)]", "\342\204\242"},
{ "Gallium \\d+\\.\\d+ on (.*)", "\\1"},
- { " CPU| Processor| \\S+-Core", ""},
+ { " CPU| Processor| \\S+-Core| @ \\d+\\.\\d+GHz", ""},
{ " x86|/MMX|/SSE2|/PCIe", ""},
{ " [(][^)]*(DRM|MESA|LLVM)[^)]*[)]?", ""},
{ "Graphics Controller", "Graphics"},
diff --git a/tests/info/info-cleanup-test.txt b/tests/info/info-cleanup-test.txt
index 6de8e0bc5..72b92071a 100644
--- a/tests/info/info-cleanup-test.txt
+++ b/tests/info/info-cleanup-test.txt
@@ -1,4 +1,4 @@
-Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz Intel® Core™ i5-4590T @ 2.00GHz
+Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz Intel® Core™ i5-4590T
Intel(R) Ivybridge Mobile Intel® Ivybridge Mobile
Intel(R) Ivybridge Mobile Intel® Ivybridge Mobile
Gallium 0.4 on AMD KAVERI AMD KAVERI
--
2.35.1
From ad01dc194e5e1e9876da611e70ac451af9bd1442 Mon Sep 17 00:00:00 2001
From: Norbert Pfeiler <norbert.pfeiler+git@gmail.com>
Date: Sat, 29 Jan 2022 11:10:04 +0100
Subject: [PATCH 09/10] info-overview: Add some commonly used trademarks
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Those are not always present in the device string.
Guidance was taken from the usage on vendor websites.
NVIDIA actually has the rights to GTX™ but doesnt seem to use it,
in contrast to RTX™.
---
panels/info-overview/info-cleanup.c | 1 +
tests/info/info-cleanup-test.txt | 7 ++++---
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/panels/info-overview/info-cleanup.c b/panels/info-overview/info-cleanup.c
index 7d640bb64..ceeb61025 100644
--- a/panels/info-overview/info-cleanup.c
+++ b/panels/info-overview/info-cleanup.c
@@ -39,6 +39,7 @@ prettify_info (const char *info)
{ "Mesa DRI ", ""},
{ "[(]R[)]", "\302\256"},
{ "[(](tm|TM)[)]", "\342\204\242"},
+ { "(ATI|EPYC|AMD FX|Radeon|Ryzen|Threadripper|GeForce RTX) ", "\\1\342\204\242 "},
{ "Gallium \\d+\\.\\d+ on (.*)", "\\1"},
{ " CPU| Processor| \\S+-Core| @ \\d+\\.\\d+GHz", ""},
{ " x86|/MMX|/SSE2|/PCIe", ""},
diff --git a/tests/info/info-cleanup-test.txt b/tests/info/info-cleanup-test.txt
index 72b92071a..80be85135 100644
--- a/tests/info/info-cleanup-test.txt
+++ b/tests/info/info-cleanup-test.txt
@@ -6,12 +6,13 @@ AMD KAVERI (DRM 2.48.0 / 4.9.0-0.rc4.git2.2.fc26.x86_64, LLVM3) AMD KAVERI
AMD KAVERI (DRM 2.48.0 / 4.9.0-0.rc4.git2.2.fc26.x86_64, LLVM3 AMD KAVERI
Gallium 0.4 on AMD KAVERI (DRM 2.48.0 / 4.9.0-0.rc4.git2.2.fc26.x86_64, LLVM3) AMD KAVERI
Gallium 0.4 on AMD KAVERI (DRM 2.48.0 / 4.9.0-0.rc4.git2.2.fc26.x86_64, LLVM3 AMD KAVERI
-AMD Ryzen Threadripper 1950X 16-Core Processor AMD Ryzen Threadripper 1950X
-AMD Radeon RX 580 Series (POLARIS10, DRM 3.42.0, 5.15.13-1-ck-generic-v3, LLVM 13.0.0) AMD Radeon RX 580 Series
-AMD EPYC 7251 8-Core Processor AMD EPYC 7251
+AMD Ryzen Threadripper 1950X 16-Core Processor AMD Ryzen™ Threadripper™ 1950X
+AMD Radeon RX 580 Series (POLARIS10, DRM 3.42.0, 5.15.13-1-ck-generic-v3, LLVM 13.0.0) AMD Radeon™ RX 580 Series
+AMD EPYC 7251 8-Core Processor AMD EPYC™ 7251
Gallium 0.4 on SVGA3D SVGA3D
Gallium 0.4 on llvmpipe (LLVM 3.4, 128 bits) llvmpipe
AMD FX(tm)-8350 Eight-Core Processor AMD FX™-8350
AMD Athlon(tm) II X3 435 Processor AMD Athlon™ II X3 435
NVIDIA GeForce GT 710/PCIe/SSE2 NVIDIA GeForce GT 710
Mesa DRI Intel(R) 965GM x86/MMX/SSE2 Intel® 965GM
+NVIDIA GeForce RTX 3090/PCIe/SSE2 NVIDIA GeForce RTX™ 3090
--
2.35.1
From 160fbfe8aa0cb396c1a0c31e1199f32da0c4c79e Mon Sep 17 00:00:00 2001
From: Norbert Pfeiler <norbert.pfeiler+git@gmail.com>
Date: Sat, 29 Jan 2022 10:56:33 +0100
Subject: [PATCH 10/10] =?UTF-8?q?info-overview:=20Replace=20llvmpipe=20wit?=
=?UTF-8?q?h=20=E2=80=9CSoftware=20Rendering=E2=80=9D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
panels/info-overview/info-cleanup.c | 1 +
tests/info/info-cleanup-test.txt | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/panels/info-overview/info-cleanup.c b/panels/info-overview/info-cleanup.c
index ceeb61025..5c3480ca7 100644
--- a/panels/info-overview/info-cleanup.c
+++ b/panels/info-overview/info-cleanup.c
@@ -45,6 +45,7 @@ prettify_info (const char *info)
{ " x86|/MMX|/SSE2|/PCIe", ""},
{ " [(][^)]*(DRM|MESA|LLVM)[^)]*[)]?", ""},
{ "Graphics Controller", "Graphics"},
+ { ".*llvmpipe.*", "Software Rendering"},
};
if (*info == '\0')
diff --git a/tests/info/info-cleanup-test.txt b/tests/info/info-cleanup-test.txt
index 80be85135..a0e25fbd0 100644
--- a/tests/info/info-cleanup-test.txt
+++ b/tests/info/info-cleanup-test.txt
@@ -10,7 +10,8 @@ AMD Ryzen Threadripper 1950X 16-Core Processor AMD Ryzen™ Threadripper™ 1950
AMD Radeon RX 580 Series (POLARIS10, DRM 3.42.0, 5.15.13-1-ck-generic-v3, LLVM 13.0.0) AMD Radeon™ RX 580 Series
AMD EPYC 7251 8-Core Processor AMD EPYC™ 7251
Gallium 0.4 on SVGA3D SVGA3D
-Gallium 0.4 on llvmpipe (LLVM 3.4, 128 bits) llvmpipe
+Gallium 0.4 on llvmpipe (LLVM 3.4, 128 bits) Software Rendering
+llvmpipe (LLVM 12.0.1, 256 bits) Software Rendering
AMD FX(tm)-8350 Eight-Core Processor AMD FX™-8350
AMD Athlon(tm) II X3 435 Processor AMD Athlon™ II X3 435
NVIDIA GeForce GT 710/PCIe/SSE2 NVIDIA GeForce GT 710
--
2.35.1