Skip to content
Commits on Source (6)
From: Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
Date: Thu, 20 Jan 2022 18:55:03 -0300
Subject: applications: Properly protect against NULL app_id
The 'app_id' variable can be NULL, and g_str_has_prefix() does
not particularly enjoy that.
Origin: https://gitlab.gnome.org/GNOME/gnome-control-center/-/commit/00cb638
---
panels/applications/cc-applications-panel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/panels/applications/cc-applications-panel.c b/panels/applications/cc-applications-panel.c
index ab6ac68..815a31e 100644
--- a/panels/applications/cc-applications-panel.c
+++ b/panels/applications/cc-applications-panel.c
@@ -813,7 +813,7 @@ add_static_permissions (CcApplicationsPanel *self,
gint added = 0;
g_autofree gchar *text = NULL;
- if (!g_str_has_prefix (app_id, PORTAL_SNAP_PREFIX))
+ if (app_id && !g_str_has_prefix (app_id, PORTAL_SNAP_PREFIX))
keyfile = get_flatpak_metadata (app_id);
if (keyfile == NULL)
return FALSE;
From: Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
Date: Thu, 20 Jan 2022 18:55:44 -0300
Subject: applications: Switch to g_spawn_check_wait_status()
It's the undeprecated version of g_spawn_check_exit_status().
Origin: https://gitlab.gnome.org/GNOME/gnome-control-center/-/commit/77b182
---
panels/applications/utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/panels/applications/utils.c b/panels/applications/utils.c
index 96704a4..590bc3c 100644
--- a/panels/applications/utils.c
+++ b/panels/applications/utils.c
@@ -168,7 +168,7 @@ get_output_of (const gchar **argv)
&status, NULL))
return NULL;
- if (!g_spawn_check_exit_status (status, NULL))
+ if (!g_spawn_check_wait_status (status, NULL))
return NULL;
return g_steal_pointer (&output);
From: Bastien Nocera <hadess@hadess.net>
Date: Wed, 5 Jan 2022 11:00:11 +0100
Subject: build: Bump required gsettings-desktop-schemas version
For the colour scheme option.
Origin: https://gitlab.gnome.org/GNOME/gnome-control-center/-/commit/d8719a62
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 81dd56f..1715f06 100644
--- a/meson.build
+++ b/meson.build
@@ -125,7 +125,7 @@ glib_dep = dependency('glib-2.0', version: '>= 2.68.0')
gnome_desktop_dep = dependency('gnome-desktop-3.0', version: '>= 3.33.4')
gnome_settings_dep = dependency('gnome-settings-daemon', version: '>= 3.27.90')
goa_dep = dependency('goa-1.0', version: goa_req_version)
-gsettings_desktop_dep = dependency('gsettings-desktop-schemas', version: '>= 40.alpha')
+gsettings_desktop_dep = dependency('gsettings-desktop-schemas', version: '>= 42.alpha')
libxml_dep = dependency('libxml-2.0')
polkit_gobject_dep = dependency('polkit-gobject-1', version: '>= 0.114')
pulse_dep = dependency('libpulse', version: pulse_req_version)
From: Bastien Nocera <hadess@hadess.net>
Date: Thu, 18 Nov 2021 16:39:44 +0100
Subject: color: Remove profile upload feature
As it was already removed in colord itself:
https://github.com/hughsie/colord/commit/98f83acc910f527496fc149511c9dfa35f954be9#diff-cb19db05cc548372b27ebee7d47bc00b6788ad05da6f5d7fff107c45bbfba38f
This removes the only direct libsoup 2.x dependency in
gnome-control-center.
Origin: https://gitlab.gnome.org/GNOME/gnome-control-center/-/commit/a9c398
---
panels/color/cc-color-panel.c | 93 -----------------------------------------
panels/color/cc-color-panel.ui | 94 ------------------------------------------
panels/color/meson.build | 1 -
3 files changed, 188 deletions(-)
diff --git a/panels/color/cc-color-panel.c b/panels/color/cc-color-panel.c
index 603178e..a2f90b0 100644
--- a/panels/color/cc-color-panel.c
+++ b/panels/color/cc-color-panel.c
@@ -24,7 +24,6 @@
#include <colord.h>
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
-#include <libsoup/soup.h>
#include "list-box-helper.h"
#include "cc-color-calibrate.h"
@@ -59,13 +58,11 @@ struct _CcColorPanel
GtkWidget *button_assign_import;
GtkWidget *button_assign_ok;
GtkWidget *button_calib_export;
- GtkWidget *button_calib_upload;
GtkWidget *dialog_assign;
GtkWidget *entry_calib_title;
GtkWidget *frame_devices;
GtkWidget *label_assign_warning;
GtkWidget *label_calib_summary_message;
- GtkWidget *label_calib_upload_location;
GtkWidget *label_no_devices;
GtkTreeModel *liststore_assign;
GtkTreeModel *liststore_calib_kind;
@@ -311,7 +308,6 @@ gcm_prefs_calib_apply_cb (CcColorPanel *prefs)
GtkWindow *window = NULL;
/* setup the calibration object with items that can fail */
- gtk_widget_show (prefs->button_calib_upload);
ret = cc_color_calibrate_setup (prefs->calibrate,
&error);
if (!ret)
@@ -775,91 +771,6 @@ gcm_prefs_add_profiles_suitable_for_devices (CcColorPanel *prefs,
}
}
-static void
-gcm_prefs_calib_upload_cb (CcColorPanel *prefs)
-{
- CdProfile *profile;
- const gchar *uri;
- gboolean ret;
- g_autofree gchar *upload_uri = NULL;
- g_autofree gchar *msg_result = NULL;
- g_autofree gchar *data = NULL;
- g_autoptr(GError) error = NULL;
- gsize length;
- guint status_code;
- g_autoptr(SoupBuffer) buffer = NULL;
- g_autoptr(SoupMessage) msg = NULL;
- g_autoptr(SoupMultipart) multipart = NULL;
- g_autoptr(SoupSession) session = NULL;
-
- profile = cc_color_calibrate_get_profile (prefs->calibrate);
- ret = cd_profile_connect_sync (profile, NULL, &error);
- if (!ret)
- {
- g_warning ("Failed to get imported profile: %s", error->message);
- return;
- }
-
- /* read file */
- ret = g_file_get_contents (cd_profile_get_filename (profile),
- &data,
- &length,
- &error);
- if (!ret)
- {
- g_warning ("Failed to read file: %s", error->message);
- return;
- }
-
- /* setup the session */
- session = soup_session_new_with_options (SOUP_SESSION_USER_AGENT, "gnome-control-center",
- SOUP_SESSION_TIMEOUT, 5000,
- NULL);
- if (session == NULL)
- {
- g_warning ("Failed to setup networking");
- return;
- }
- soup_session_add_feature_by_type (session, SOUP_TYPE_PROXY_RESOLVER_DEFAULT);
-
- /* create multipart form and upload file */
- multipart = soup_multipart_new (SOUP_FORM_MIME_TYPE_MULTIPART);
- buffer = soup_buffer_new (SOUP_MEMORY_STATIC, data, length);
- soup_multipart_append_form_file (multipart,
- "upload",
- cd_profile_get_filename (profile),
- NULL,
- buffer);
- upload_uri = g_settings_get_string (prefs->settings_colord, "profile-upload-uri");
- msg = soup_form_request_new_from_multipart (upload_uri, multipart);
- status_code = soup_session_send_message (session, msg);
- if (status_code != 201)
- {
- /* TRANSLATORS: this is when the upload of the profile failed */
- msg_result = g_strdup_printf (_("Failed to upload file: %s"), msg->reason_phrase),
- gtk_label_set_label (GTK_LABEL (prefs->label_calib_upload_location), msg_result);
- gtk_widget_show (prefs->label_calib_upload_location);
- return;
- }
-
- /* show instructions to the user */
- uri = soup_message_headers_get_one (msg->response_headers, "Location");
- msg_result = g_strdup_printf ("%s %s\n\n• %s\n• %s\n• %s",
- /* TRANSLATORS: these are instructions on how to recover
- * the ICC profile on the native operating system and are
- * only shown when the user uses a LiveCD to calibrate */
- _("The profile has been uploaded to:"),
- uri,
- _("Write down this URL."),
- _("Restart this computer and boot your normal operating system."),
- _("Type the URL into your browser to download and install the profile.")),
- gtk_label_set_label (GTK_LABEL (prefs->label_calib_upload_location), msg_result);
- gtk_widget_show (prefs->label_calib_upload_location);
-
- /* hide the upload button as duplicate uploads will fail */
- gtk_widget_hide (prefs->button_calib_upload);
-}
-
static void
gcm_prefs_calib_export_cb (CcColorPanel *prefs)
{
@@ -1957,13 +1868,11 @@ cc_color_panel_class_init (CcColorPanelClass *klass)
gtk_widget_class_bind_template_child (widget_class, CcColorPanel, button_assign_import);
gtk_widget_class_bind_template_child (widget_class, CcColorPanel, button_assign_ok);
gtk_widget_class_bind_template_child (widget_class, CcColorPanel, button_calib_export);
- gtk_widget_class_bind_template_child (widget_class, CcColorPanel, button_calib_upload);
gtk_widget_class_bind_template_child (widget_class, CcColorPanel, dialog_assign);
gtk_widget_class_bind_template_child (widget_class, CcColorPanel, entry_calib_title);
gtk_widget_class_bind_template_child (widget_class, CcColorPanel, frame_devices);
gtk_widget_class_bind_template_child (widget_class, CcColorPanel, label_assign_warning);
gtk_widget_class_bind_template_child (widget_class, CcColorPanel, label_calib_summary_message);
- gtk_widget_class_bind_template_child (widget_class, CcColorPanel, label_calib_upload_location);
gtk_widget_class_bind_template_child (widget_class, CcColorPanel, label_no_devices);
gtk_widget_class_bind_template_child (widget_class, CcColorPanel, liststore_assign);
gtk_widget_class_bind_template_child (widget_class, CcColorPanel, liststore_calib_kind);
@@ -2272,8 +2181,6 @@ cc_color_panel_init (CcColorPanel *prefs)
gtk_widget_set_visible (prefs->box_calib_summary, prefs->is_live_cd);
g_signal_connect_object (prefs->button_calib_export, "clicked",
G_CALLBACK (gcm_prefs_calib_export_cb), prefs, G_CONNECT_SWAPPED);
- g_signal_connect_object (prefs->button_calib_upload, "clicked",
- G_CALLBACK (gcm_prefs_calib_upload_cb), prefs, G_CONNECT_SWAPPED);
g_signal_connect_object (prefs->label_calib_summary_message, "activate-link",
G_CALLBACK (gcm_prefs_calib_export_link_cb), prefs, G_CONNECT_SWAPPED);
diff --git a/panels/color/cc-color-panel.ui b/panels/color/cc-color-panel.ui
index 647e598..f1924d5 100644
--- a/panels/color/cc-color-panel.ui
+++ b/panels/color/cc-color-panel.ui
@@ -480,83 +480,6 @@
<property name="position">0</property>
</packing>
</child>
- <child>
- <object class="GtkButton" id="button_calib_upload">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="halign">start</property>
- <child>
- <object class="GtkBox" id="box4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
- <property name="spacing">9</property>
- <child>
- <object class="GtkImage" id="image3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="pixel_size">48</property>
- <property name="icon_name">preferences-system-sharing-symbolic</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="box5">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Upload profile</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Requires Internet connection</property>
- <attributes>
- <attribute name="style" value="italic"/>
- </attributes>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="padding">12</property>
- <property name="position">1</property>
- </packing>
- </child>
</object>
<packing>
<property name="expand">False</property>
@@ -565,23 +488,6 @@
<property name="position">1</property>
</packing>
</child>
- <child>
- <object class="GtkLabel" id="label_calib_upload_location">
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xpad">6</property>
- <property name="label">The profile has been uploaded to http://foo.bar/deadbeef.icc</property>
- <property name="selectable">True</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
<child>
<object class="GtkLabel" id="label_calib_summary_message">
<property name="visible">True</property>
diff --git a/panels/color/meson.build b/panels/color/meson.build
index bb038cd..a231ccd 100644
--- a/panels/color/meson.build
+++ b/panels/color/meson.build
@@ -43,7 +43,6 @@ deps = common_deps + [
gnome_desktop_dep,
m_dep,
dependency('colord-gtk', version: '>= 0.1.24'),
- dependency('libsoup-2.4')
]
panels_libs += static_library(
From: Victor Toso <victortoso@redhat.com>
Date: Tue, 12 Oct 2021 11:48:55 +0200
Subject: common: Fix leak of GUdevDevice
The add_device() check for g_udev_device_get_parent() was leaking (see
below). As this is actually used in create_device(), I'm passing it as
argument to avoid a second call to that function.
> 34,175 (1,080 direct, 33,095 indirect) bytes in 27 blocks are definitely lost in loss record 19,729 of 19,758
> at 0x4A7A337: g_type_create_instance (gtype.c:1907)
> by 0x4A61CAC: g_object_new_internal (gobject.c:1945)
> by 0x4A62C7C: g_object_new_with_properties (gobject.c:2114)
> by 0x4A63780: g_object_new (gobject.c:1785)
> by 0x5EA5A6A: _g_udev_device_new (gudevdevice.c:132)
> by 0x4B6D24: add_device (gsd-device-manager.c:447)
> by 0x4B6FBF: gsd_device_manager_init (gsd-device-manager.c:517)
> by 0x4A7A288: g_type_create_instance (gtype.c:1929)
> by 0x4A61CAC: g_object_new_internal (gobject.c:1945)
> by 0x4A62C7C: g_object_new_with_properties (gobject.c:2114)
> by 0x4A63780: g_object_new (gobject.c:1785)
> by 0x4B7075: gsd_device_manager_get (gsd-device-manager.c:533)
Origin: https://gitlab.gnome.org/GNOME/gnome-control-center/-/commit/dac8fd6
---
panels/common/gsd-device-manager.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/panels/common/gsd-device-manager.c b/panels/common/gsd-device-manager.c
index 9509b3f..91a250a 100644
--- a/panels/common/gsd-device-manager.c
+++ b/panels/common/gsd-device-manager.c
@@ -400,14 +400,10 @@ device_is_evdev (GUdevDevice *device)
}
static GsdDevice *
-create_device (GUdevDevice *udev_device)
+create_device (GUdevDevice *udev_device, GUdevDevice *parent)
{
const gchar *vendor, *product, *name, *group;
guint width, height;
- g_autoptr(GUdevDevice) parent = NULL;
-
- parent = g_udev_device_get_parent (udev_device);
- g_assert (parent != NULL);
name = g_udev_device_get_sysfs_attr (parent, "name");
vendor = g_udev_device_get_property (udev_device, "ID_VENDOR_ID");
@@ -440,7 +436,7 @@ add_device (GsdDeviceManager *manager,
GUdevDevice *udev_device)
{
GsdDeviceManagerPrivate *priv = gsd_device_manager_get_instance_private (manager);
- GUdevDevice *parent;
+ g_autoptr(GUdevDevice) parent = NULL;
GsdDevice *device;
const gchar *syspath;
@@ -449,7 +445,7 @@ add_device (GsdDeviceManager *manager,
if (!parent)
return;
- device = create_device (udev_device);
+ device = create_device (udev_device, parent);
syspath = g_udev_device_get_sysfs_path (udev_device);
g_hash_table_insert (priv->devices, g_strdup (syspath), device);
g_signal_emit_by_name (manager, "device-added", device);
From: Colin Watson <cjwatson@debian.org>
Date: Mon, 27 Sep 2021 22:21:40 +0100
Subject: datetime: Remove tzname_daylight
The code that set it could only ever have worked by luck in some
timezones on some systems, and there's no API to obtain the information
we were trying to store in it. Nothing uses it, so there's no point
trying to fix it.
tzname_normal is also unused, but slightly useful for debugging, so
rename it to tzname but otherwise keep it in place.
Origin: https://gitlab.gnome.org/GNOME/gnome-control-center/-/commit/1b874509
---
panels/datetime/tz.c | 16 +++-------------
panels/datetime/tz.h | 6 ++----
2 files changed, 5 insertions(+), 17 deletions(-)
diff --git a/panels/datetime/tz.c b/panels/datetime/tz.c
index 6e96dd4..5ef6676 100644
--- a/panels/datetime/tz.c
+++ b/panels/datetime/tz.c
@@ -215,19 +215,10 @@ tz_info_from_location (TzLocation *loc)
curzone = localtime (&curtime);
#ifndef __sun
- /* Currently this solution doesnt seem to work - I get that */
- /* America/Phoenix uses daylight savings, which is wrong */
- tzinfo->tzname_normal = g_strdup (curzone->tm_zone);
- if (curzone->tm_isdst)
- tzinfo->tzname_daylight =
- g_strdup (&curzone->tm_zone[curzone->tm_isdst]);
- else
- tzinfo->tzname_daylight = NULL;
-
+ tzinfo->tzname = g_strdup (curzone->tm_zone);
tzinfo->utc_offset = curzone->tm_gmtoff;
#else
- tzinfo->tzname_normal = NULL;
- tzinfo->tzname_daylight = NULL;
+ tzinfo->tzname = NULL;
tzinfo->utc_offset = 0;
#endif
@@ -247,8 +238,7 @@ tz_info_free (TzInfo *tzinfo)
{
g_return_if_fail (tzinfo != NULL);
- if (tzinfo->tzname_normal) g_free (tzinfo->tzname_normal);
- if (tzinfo->tzname_daylight) g_free (tzinfo->tzname_daylight);
+ if (tzinfo->tzname) g_free (tzinfo->tzname);
g_free (tzinfo);
}
diff --git a/panels/datetime/tz.h b/panels/datetime/tz.h
index a2376f8..b6b7ab9 100644
--- a/panels/datetime/tz.h
+++ b/panels/datetime/tz.h
@@ -56,15 +56,13 @@ struct _TzLocation
};
/* see the glibc info page information on time zone information */
-/* tzname_normal is the default name for the timezone */
-/* tzname_daylight is the name of the zone when in daylight savings */
+/* tzname is the default name for the timezone */
/* utc_offset is offset in seconds from utc */
/* daylight if non-zero then location obeys daylight savings */
struct _TzInfo
{
- gchar *tzname_normal;
- gchar *tzname_daylight;
+ gchar *tzname;
glong utc_offset;
gint daylight;
};
......@@ -5,19 +5,33 @@ Subject: Debian's adduser doesn't allow uppercase letters by default.
Forwarded: not-needed, Debian-specific
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=910141
---
panels/user-accounts/cc-add-user-dialog.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
panels/user-accounts/cc-add-user-dialog.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/panels/user-accounts/cc-add-user-dialog.c b/panels/user-accounts/cc-add-user-dialog.c
index 3d1daa4..eaa6930 100644
index 3d1daa4..c9d52bf 100644
--- a/panels/user-accounts/cc-add-user-dialog.c
+++ b/panels/user-accounts/cc-add-user-dialog.c
@@ -232,7 +232,7 @@ local_create_user (CcAddUserDialog *self)
@@ -217,6 +217,7 @@ create_user_done (ActUserManager *manager,
static void
local_create_user (CcAddUserDialog *self)
{
+ g_autofree char *debian_username = NULL;
ActUserManager *manager;
const gchar *username;
const gchar *name;
@@ -228,11 +229,12 @@ local_create_user (CcAddUserDialog *self)
username = gtk_combo_box_text_get_active_text (self->local_username_combo);
account_type = (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (self->local_account_type_standard)) ? ACT_USER_ACCOUNT_TYPE_STANDARD : ACT_USER_ACCOUNT_TYPE_ADMINISTRATOR);
- g_debug ("Creating local user: %s", username);
+ debian_username = g_ascii_strdown (username, -1);
+ g_debug ("Creating local user: %s", debian_username);
manager = act_user_manager_get_default ();
act_user_manager_create_user_async (manager,
- username,
+ g_ascii_strdown (username, -1),
+ debian_username,
name,
account_type,
self->cancellable,
......@@ -8,12 +8,12 @@ This reverts commit 9ebcd17236a54daa0927a22d973d0309dfb4c8df.
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 81dd56f..ceee1b6 100644
index 1715f06..cde84d9 100644
--- a/meson.build
+++ b/meson.build
@@ -127,7 +127,7 @@ gnome_settings_dep = dependency('gnome-settings-daemon', version: '>= 3.27.90')
goa_dep = dependency('goa-1.0', version: goa_req_version)
gsettings_desktop_dep = dependency('gsettings-desktop-schemas', version: '>= 40.alpha')
gsettings_desktop_dep = dependency('gsettings-desktop-schemas', version: '>= 42.alpha')
libxml_dep = dependency('libxml-2.0')
-polkit_gobject_dep = dependency('polkit-gobject-1', version: '>= 0.114')
+polkit_gobject_dep = dependency('polkit-gobject-1', version: '>= 0.103')
......
......@@ -17,10 +17,10 @@ Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/base-files/+bug/1931582
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/panels/info-overview/cc-info-overview-panel.c b/panels/info-overview/cc-info-overview-panel.c
index 6e832eb..13a262d 100644
index 35969b8..b755cc5 100644
--- a/panels/info-overview/cc-info-overview-panel.c
+++ b/panels/info-overview/cc-info-overview-panel.c
@@ -919,7 +919,8 @@ setup_os_logo (CcInfoOverviewPanel *panel)
@@ -956,7 +956,8 @@ setup_os_logo (CcInfoOverviewPanel *panel)
g_ptr_array_add (array, (gpointer) g_strdup_printf ("%s", logo_name));
icon = g_themed_icon_new_from_names ((char **) array->pdata, array->len);
......
From: Robert Mader <robert.mader@posteo.de>
Date: Thu, 6 Jan 2022 22:00:52 +0100
Subject: display: Always show refresh rate
Refresh rates are an important information for users, even if they
can't change them.
This is especially true for cases where knowledge of the refresh
rate may influence the decission about the resolution to use.
Consider the example where a display may support `3840x2160@60Hz`
and `2560x1440@144Hz`. When choosing `3840x2160` as resolution,
the refresh rate will likely get hidden, making the user unaware
of the fact that they will maybe not get what they want (potentially
144Hz).
So follow the example of e.g. the sound panel where input and output
devices are listed in dropdowns, even if they are the only options
selectable.
Note: while this is a design change, for a big group of users this
won't actually change the default experience as Mutter until recently
had a bug to duplicate 60Hz modes in many cases. So most laptop users
already saw the refresh rate panel in previous Gnome versions,
dispite it having little use.
See also:
https://gitlab.gnome.org/GNOME/mutter/-/commit/fb9564b87b9fe8ebc5a19c20dbfe036995d0dbad
Origin: https://gitlab.gnome.org/GNOME/gnome-control-center/-/commit/375bbc3
---
panels/display/cc-display-settings.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/panels/display/cc-display-settings.c b/panels/display/cc-display-settings.c
index a4f914e..90420d2 100644
--- a/panels/display/cc-display-settings.c
+++ b/panels/display/cc-display-settings.c
@@ -336,9 +336,7 @@ cc_display_settings_rebuild_ui (CcDisplaySettings *self)
hdy_combo_row_set_selected_index (HDY_COMBO_ROW (self->refresh_rate_row), new);
}
- /* Show if we have more than one frequency to choose from. */
- gtk_widget_set_visible (self->refresh_rate_row,
- g_list_model_get_n_items (G_LIST_MODEL (self->refresh_rate_list)) > 1);
+ gtk_widget_set_visible (self->refresh_rate_row, TRUE);
}
else
{
From: =?utf-8?q?Jonas_=C3=85dahl?= <jadahl@gmail.com>
Date: Thu, 20 Jan 2022 10:58:23 +0100
Subject: 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.
Origin: https://gitlab.gnome.org/GNOME/gnome-control-center/-/commit/21862c3
---
panels/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 | 14 ++++++++++
panels/display/cc-display-panel.ui | 15 ++++++++++-
5 files changed, 73 insertions(+), 1 deletion(-)
diff --git a/panels/display/cc-display-config-manager-dbus.c b/panels/display/cc-display-config-manager-dbus.c
index 653bea0..3921401 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 0da298a..3d683c5 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 1e1b363..64f0775 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 f9d4ae0..5220804 100644
--- a/panels/display/cc-display-panel.c
+++ b/panels/display/cc-display-panel.c
@@ -90,6 +90,8 @@ struct _CcDisplayPanel
GListStore *primary_display_list;
GtkListStore *output_selection_list;
+ GtkWidget *output_frame;
+ GtkWidget *display_settings_disabled_group;
GtkWidget *arrangement_frame;
GtkAlignment *arrangement_bin;
@@ -693,8 +695,10 @@ cc_display_panel_class_init (CcDisplayPanelClass *klass)
gtk_widget_class_bind_template_child (widget_class, CcDisplayPanel, config_type_single);
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, display_settings_disabled_group);
gtk_widget_class_bind_template_child (widget_class, CcDisplayPanel, multi_selection_box);
gtk_widget_class_bind_template_child (widget_class, CcDisplayPanel, night_light_page);
+ gtk_widget_class_bind_template_child (widget_class, CcDisplayPanel, output_frame);
gtk_widget_class_bind_template_child (widget_class, CcDisplayPanel, output_enabled_switch);
gtk_widget_class_bind_template_child (widget_class, CcDisplayPanel, output_selection_combo);
gtk_widget_class_bind_template_child (widget_class, CcDisplayPanel, output_selection_stack);
@@ -782,6 +786,14 @@ rebuild_ui (CcDisplayPanel *panel)
GList *outputs, *l;
CcDisplayConfigType type;
+ if (!cc_display_config_manager_get_apply_allowed (panel->manager))
+ {
+ gtk_widget_set_visible (panel->display_settings_disabled_group, TRUE);
+ gtk_widget_set_visible (panel->config_type_switcher_frame, FALSE);
+ gtk_widget_set_visible (panel->arrangement_frame, FALSE);
+ return;
+ }
+
panel->rebuilding_counter++;
g_list_store_remove_all (panel->primary_display_list);
@@ -793,6 +805,8 @@ rebuild_ui (CcDisplayPanel *panel)
return;
}
+ gtk_widget_set_visible (panel->display_settings_disabled_group, FALSE);
+
n_active_outputs = 0;
n_usable_outputs = 0;
outputs = cc_display_config_get_ui_sorted_monitors (panel->current_config);
diff --git a/panels/display/cc-display-panel.ui b/panels/display/cc-display-panel.ui
index 855b348..b51612e 100644
--- a/panels/display/cc-display-panel.ui
+++ b/panels/display/cc-display-panel.ui
@@ -72,6 +72,19 @@
<property name="hexpand">True</property>
<property name="orientation">vertical</property>
<property name="spacing">32</property>
+ <child>
+ <object class="HdyPreferencesGroup" id="display_settings_disabled_group">
+ <property name="visible">False</property>
+ <child>
+ <object class="HdyStatusPage">
+ <property name="visible">True</property>
+ <property name="vexpand">True</property>
+ <property name="icon-name">computer-symbolic</property>
+ <property name="title" translatable="yes">Display Settings Disabled</property>
+ </object>
+ </child>
+ </object>
+ </child>
<child>
<object class="GtkFrame" id="config_type_switcher_frame">
<property name="visible">True</property>
@@ -258,7 +271,7 @@
</packing>
</child>
<child>
- <object class="GtkFrame">
+ <object class="GtkFrame" id="output_frame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
From 43bb1d9200554527cefaa2ce969bebc80d781c73 Mon Sep 17 00:00:00 2001
From: Ana Cabral <acabral@redhat.com>
Date: Mon, 21 Feb 2022 21:49:29 +0100
Subject: [PATCH] network: Fix OWE settings
......@@ -17,14 +16,14 @@ OWE is not treated anymore in the same case as None.
https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1521
---
.../connection-editor/ce-page-security.c | 23 +++++++++++++++----
.../network/connection-editor/ce-page-security.c | 23 ++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
Index: gnome-control-center/panels/network/connection-editor/ce-page-security.c
===================================================================
--- gnome-control-center.orig/panels/network/connection-editor/ce-page-security.c
+++ gnome-control-center/panels/network/connection-editor/ce-page-security.c
@@ -465,10 +465,25 @@ ce_page_security_validate (CEPage
diff --git a/panels/network/connection-editor/ce-page-security.c b/panels/network/connection-editor/ce-page-security.c
index f640cbe..6969715 100644
--- a/panels/network/connection-editor/ce-page-security.c
+++ b/panels/network/connection-editor/ce-page-security.c
@@ -465,10 +465,25 @@ ce_page_security_validate (CEPage *page,
}
}
} else {
......
From: Bastien Nocera <hadess@hadess.net>
Date: Tue, 25 Jan 2022 23:12:58 +0100
Subject: info: Use udev to get the hardware RAM size
libgtop gets the RAM size as is visible to the OS, so the physical RAM
size minus all the reserved areas listed at the top of your usual Linux
dmesg output.
Use systemd 248's MEMORY_ARRAY_* properties attached to the pseudo-DMI
device to get the size of the RAM sticks/chips as the user expects.
Closes: #1540
Origin: https://gitlab.gnome.org/GNOME/gnome-control-center/-/commit/25518a6
---
panels/info-overview/cc-info-overview-panel.c | 41 +++++++++++++++++++++++++--
panels/info-overview/meson.build | 3 +-
2 files changed, 41 insertions(+), 3 deletions(-)
diff --git a/panels/info-overview/cc-info-overview-panel.c b/panels/info-overview/cc-info-overview-panel.c
index 6e832eb..35969b8 100644
--- a/panels/info-overview/cc-info-overview-panel.c
+++ b/panels/info-overview/cc-info-overview-panel.c
@@ -38,6 +38,7 @@
#include <glibtop/mem.h>
#include <glibtop/sysinfo.h>
#include <udisks/udisks.h>
+#include <gudev/gudev.h>
#include <gdk/gdk.h>
@@ -726,6 +727,39 @@ get_windowing_system (void)
return C_("Windowing system (Wayland, X11, or Unknown)", "Unknown");
}
+static guint64
+get_ram_size_libgtop (void)
+{
+ glibtop_mem mem;
+
+ glibtop_get_mem (&mem);
+ return mem.total;
+}
+
+static guint64
+get_ram_size_dmi (void)
+{
+ g_autoptr(GUdevClient) client = NULL;
+ g_autoptr(GUdevDevice) dmi = NULL;
+ const gchar * const subsystems[] = {"dmi", NULL };
+ guint64 ram_total = 0;
+ guint64 num_ram;
+ guint i;
+
+ client = g_udev_client_new (subsystems);
+ dmi = g_udev_client_query_by_sysfs_path (client, "/sys/devices/virtual/dmi/id");
+ if (!dmi)
+ return 0;
+ num_ram = g_udev_device_get_property_as_uint64 (dmi, "MEMORY_ARRAY_NUM_DEVICES");
+ for (i = 0; i < num_ram ; i++) {
+ g_autofree char *prop = NULL;
+
+ prop = g_strdup_printf ("MEMORY_DEVICE_%d_SIZE", i);
+ ram_total += g_udev_device_get_property_as_uint64 (dmi, prop);
+ }
+ return ram_total;
+}
+
static void
info_overview_panel_setup_overview (CcInfoOverviewPanel *self)
{
@@ -737,6 +771,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;
+ guint64 ram_size;
if (load_gnome_version (&gnome_version, NULL, NULL))
cc_list_row_set_secondary_label (self->gnome_version_row, gnome_version);
@@ -745,8 +780,10 @@ info_overview_panel_setup_overview (CcInfoOverviewPanel *self)
get_hardware_model (self);
- glibtop_get_mem (&mem);
- memory_text = g_format_size_full (mem.total, G_FORMAT_SIZE_IEC_UNITS);
+ ram_size = get_ram_size_dmi ();
+ if (ram_size == 0)
+ ram_size = get_ram_size_libgtop ();
+ memory_text = g_format_size_full (ram_size, G_FORMAT_SIZE_IEC_UNITS);
cc_list_row_set_secondary_label (self->memory_row, memory_text);
info = glibtop_get_sysinfo ();
diff --git a/panels/info-overview/meson.build b/panels/info-overview/meson.build
index aa81c48..256d73c 100644
--- a/panels/info-overview/meson.build
+++ b/panels/info-overview/meson.build
@@ -40,7 +40,8 @@ sources += gnome.compile_resources(
deps = common_deps + [
dependency('udisks2', version: '>= 2.8.2'),
- dependency('libgtop-2.0')
+ dependency('libgtop-2.0'),
+ gudev_dep,
]
info_panel_lib = static_library(
From: Victor Toso <victortoso@redhat.com>
Date: Tue, 12 Oct 2021 14:02:06 +0200
Subject: keyboard-item: fix leak on unused CcKeyCombo
==31571== 288 bytes in 24 blocks are definitely lost in loss record 18,138 of 19,290
==31571== at 0x484086F: malloc (vg_replace_malloc.c:380)
==31571== by 0x4AF77A8: g_malloc (gmem.c:106)
==31571== by 0x4A4119: variant_get_key_combos (cc-keyboard-item.c:475)
==31571== by 0x4A41FD: settings_get_key_combos (cc-keyboard-item.c:498)
==31571== by 0x4A46BE: cc_keyboard_item_load_from_gsettings (cc-keyboard-item.c:574)
==31571== by 0x4A5BBB: append_section (cc-keyboard-manager.c:315)
==31571== by 0x4A605D: append_sections_from_file (cc-keyboard-manager.c:431)
==31571== by 0x4A6766: reload_sections (cc-keyboard-manager.c:568)
==31571== by 0x4A6D68: cc_keyboard_manager_load_shortcuts (cc-keyboard-manager.c:707)
==31571== by 0x4A2FA4: cc_keyboard_shortcut_dialog_init (cc-keyboard-shortcut-dialog.c:841)
==31571== by 0x4A7A288: g_type_create_instance (gtype.c:1929)
==31571== by 0x4A61CAC: g_object_new_internal (gobject.c:1945)
Origin: https://gitlab.gnome.org/GNOME/gnome-control-center/-/commit/365fb19957
---
panels/keyboard/cc-keyboard-item.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/panels/keyboard/cc-keyboard-item.c b/panels/keyboard/cc-keyboard-item.c
index 2f7cdf7..1d17b10 100644
--- a/panels/keyboard/cc-keyboard-item.c
+++ b/panels/keyboard/cc-keyboard-item.c
@@ -472,12 +472,12 @@ variant_get_key_combos (GVariant *variant)
for (str = bindings; *str; str++)
{
- CcKeyCombo *combo = g_new (CcKeyCombo, 1);
+ g_autofree CcKeyCombo *combo = g_new (CcKeyCombo, 1);
binding_from_string (*str, combo);
if (combo->keyval != 0 || combo->keycode != 0 || combo->mask != 0)
- combos = g_list_prepend (combos, combo);
+ combos = g_list_prepend (combos, g_steal_pointer (&combo));
}
return g_list_reverse (combos);
From: Victor Toso <victortoso@redhat.com>
Date: Tue, 12 Oct 2021 12:36:14 +0200
Subject: keyboard-manager: fix leak of section list store
==25729== 1,058 (40 direct, 1,018 indirect) bytes in 1 blocks are definitely lost in loss record 20,104 of 20,657
==25729== at 0x484086F: malloc (vg_replace_malloc.c:380)
==25729== by 0x4AF77A8: g_malloc (gmem.c:106)
==25729== by 0x4B0F1E4: g_slice_alloc (gslice.c:1072)
==25729== by 0x4B09060: UnknownInlinedFun (gsequence.c:1609)
==25729== by 0x4B09060: g_sequence_insert_before (gsequence.c:527)
==25729== by 0x4ED2FE7: gtk_list_store_insert (gtkliststore.c:1271)
==25729== by 0x4A5DCE: append_section (cc-keyboard-manager.c:363)
==25729== by 0x4A605D: append_sections_from_file (cc-keyboard-manager.c:431)
==25729== by 0x4A6766: reload_sections (cc-keyboard-manager.c:568)
==25729== by 0x4A6D33: cc_keyboard_manager_load_shortcuts (cc-keyboard-manager.c:706)
==25729== by 0x4A2FA4: cc_keyboard_shortcut_dialog_init (cc-keyboard-shortcut-dialog.c:841)
==25729== by 0x4A7A288: g_type_create_instance (gtype.c:1929)
==25729== by 0x4A61CAC: g_object_new_internal (gobject.c:1945)
Origin: https://gitlab.gnome.org/GNOME/gnome-control-center/-/commit/7741dc1ab
---
panels/keyboard/cc-keyboard-manager.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/panels/keyboard/cc-keyboard-manager.c b/panels/keyboard/cc-keyboard-manager.c
index 4d633c2..ad50632 100644
--- a/panels/keyboard/cc-keyboard-manager.c
+++ b/panels/keyboard/cc-keyboard-manager.c
@@ -596,6 +596,7 @@ cc_keyboard_manager_finalize (GObject *object)
g_clear_pointer (&self->kb_apps_sections, g_hash_table_destroy);
g_clear_pointer (&self->kb_user_sections, g_hash_table_destroy);
g_clear_object (&self->binding_settings);
+ g_clear_object (&self->sections_store);
g_clear_pointer (&self->wm_changed_id, wm_common_unregister_window_manager_change);
From: Victor Toso <victortoso@redhat.com>
Date: Tue, 12 Oct 2021 14:09:45 +0200
Subject: keyboard-shortcut-editor: fix leak of accel string
==31571== 120 bytes in 8 blocks are definitely lost in loss record 17,034 of 19,290
==31571== at 0x484086F: malloc (vg_replace_malloc.c:380)
==31571== by 0x4AF77A8: g_malloc (gmem.c:106)
==31571== by 0x4D9816A: gtk_accelerator_name (gtkaccelgroup.c:1577)
==31571== by 0x4A82D1: setup_custom_shortcut (cc-keyboard-shortcut-editor.c:364)
==31571== by 0x4A92DF: cc_keyboard_shortcut_editor_key_press_event (cc-keyboard-shortcut-editor.c:745)
Origin: https://gitlab.gnome.org/GNOME/gnome-control-center/-/commit/8355404e
---
panels/keyboard/cc-keyboard-shortcut-editor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/panels/keyboard/cc-keyboard-shortcut-editor.c b/panels/keyboard/cc-keyboard-shortcut-editor.c
index 6b42763..4e93a1c 100644
--- a/panels/keyboard/cc-keyboard-shortcut-editor.c
+++ b/panels/keyboard/cc-keyboard-shortcut-editor.c
@@ -308,7 +308,7 @@ setup_custom_shortcut (CcKeyboardShortcutEditor *self)
HeaderMode mode;
gboolean is_custom, is_accel_empty;
gboolean valid, accel_valid;
- gchar *accel;
+ g_autofree char *accel = NULL;
is_custom = is_custom_shortcut (self);
accel_valid = is_valid_binding (self->custom_combo) &&
From: Benjamin Berg <bberg@redhat.com>
Date: Thu, 9 Dec 2021 17:59:59 +0100
Subject: network: Fix saving passwords for non-wifi connections
When validating security settings for non-wifi connections, we
temporarily create a wireless connection. Unfortunately, when this
connection is destroyed, it'll clear the stored password from the 802.1x
settings object.
Avoid this by removing the setting before the temporary connection is
destroyed.
Closes: #337
Origin: https://gitlab.gnome.org/GNOME/gnome-control-center/-/commit/6f825c
---
panels/network/connection-editor/ce-page-8021x-security.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/panels/network/connection-editor/ce-page-8021x-security.c b/panels/network/connection-editor/ce-page-8021x-security.c
index 1e4f146..cb60ca9 100644
--- a/panels/network/connection-editor/ce-page-8021x-security.c
+++ b/panels/network/connection-editor/ce-page-8021x-security.c
@@ -125,22 +125,18 @@ ce_page_8021x_security_validate (CEPage *cepage, NMConnection *connection, GErro
valid = wireless_security_validate (WIRELESS_SECURITY (self->security), error);
if (valid) {
g_autoptr(NMConnection) tmp_connection = NULL;
- NMSetting *s_con;
/* Here's a nice hack to work around the fact that ws_802_1x_fill_connection needs wireless setting. */
- tmp_connection = nm_simple_connection_new ();
+ tmp_connection = nm_simple_connection_new_clone (connection);
nm_connection_add_setting (tmp_connection, nm_setting_wireless_new ());
- /* temp connection needs a 'connection' setting too, since most of
- * the EAP methods need the UUID for CA cert ignore stuff.
- */
- s_con = nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
- nm_connection_add_setting (tmp_connection, nm_setting_duplicate (s_con));
-
ws_wpa_eap_fill_connection (self->security, tmp_connection);
+ /* NOTE: It is important we create a copy of the settings, as the
+ * secrets might be cleared otherwise.
+ */
s_8021x = nm_connection_get_setting (tmp_connection, NM_TYPE_SETTING_802_1X);
- nm_connection_add_setting (connection, NM_SETTING (g_object_ref (s_8021x)));
+ nm_connection_add_setting (connection, nm_setting_duplicate (NM_SETTING (s_8021x)));
}
} else {
nm_connection_remove_setting (connection, NM_TYPE_SETTING_802_1X);
From: Michael Catanzaro <mcatanzaro@redhat.com>
Date: Fri, 5 Nov 2021 16:25:58 -0500
Subject: network: fix critical when opening VPN details page
I was seeing this critical when opening the VPN details page:
(gnome-control-center:78888): nm-CRITICAL **: 16:26:21.689: ((src/libnm-client-impl/nm-device.c:1299)): assertion '<dropped>' failed
It probably broke in 551d72280bbc9479a81697e2d888a77a64538b27. The code
above and below expects self->device may be NULL, so let's add a
NULL check here.
Origin: https://gitlab.gnome.org/GNOME/gnome-control-center/-/commit/c180aa66
---
panels/network/connection-editor/ce-page-details.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/panels/network/connection-editor/ce-page-details.c b/panels/network/connection-editor/ce-page-details.c
index 3908515..7826179 100644
--- a/panels/network/connection-editor/ce-page-details.c
+++ b/panels/network/connection-editor/ce-page-details.c
@@ -297,7 +297,9 @@ connect_details_page (CEPageDetails *self)
gtk_widget_set_visible (GTK_WIDGET (self->speed_heading_label), speed_label != NULL);
gtk_widget_set_visible (GTK_WIDGET (self->speed_label), speed_label != NULL);
- hw_address = nm_device_get_hw_address (self->device);
+ if (self->device)
+ hw_address = nm_device_get_hw_address (self->device);
+
gtk_label_set_label (self->mac_label, hw_address);
gtk_widget_set_visible (GTK_WIDGET (self->mac_heading_label), hw_address != NULL);
gtk_widget_set_visible (GTK_WIDGET (self->mac_label), hw_address != NULL);
From: Sebastian Keller <skeller@gnome.org>
Date: Wed, 22 Dec 2021 23:24:57 +0100
Subject: search-provider: Don't escape result description as markup
Only the shell can know how the description string will be used and if
or when it should be escaped. Previously the shell did not escape the
description before displaying it with markup to highlight search hits,
but now it does. For gnome-control-center this however means without
this change the string will be escaped twice causing markup to show up
in the description text.
Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2033
Origin: https://gitlab.gnome.org/GNOME/gnome-control-center/-/commit/dfc5044
---
search-provider/cc-search-provider.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/search-provider/cc-search-provider.c b/search-provider/cc-search-provider.c
index 49df7f4..8a8981a 100644
--- a/search-provider/cc-search-provider.c
+++ b/search-provider/cc-search-provider.c
@@ -210,7 +210,6 @@ handle_get_result_metas (CcShellSearchProvider2 *skeleton,
for (i = 0; results[i]; i++)
{
- g_autofree gchar *escaped_description = NULL;
g_autofree gchar *description = NULL;
g_autofree gchar *name = NULL;
g_autoptr(GAppInfo) app = NULL;
@@ -227,7 +226,6 @@ handle_get_result_metas (CcShellSearchProvider2 *skeleton,
COL_DESCRIPTION, &description,
-1);
id = g_app_info_get_id (app);
- escaped_description = g_markup_escape_text (description, -1);
g_variant_builder_open (&builder, G_VARIANT_TYPE ("a{sv}"));
g_variant_builder_add (&builder, "{sv}",
@@ -237,7 +235,7 @@ handle_get_result_metas (CcShellSearchProvider2 *skeleton,
g_variant_builder_add (&builder, "{sv}",
"icon", g_icon_serialize (icon));
g_variant_builder_add (&builder, "{sv}",
- "description", g_variant_new_string (escaped_description));
+ "description", g_variant_new_string (description));
g_variant_builder_close (&builder);
}
git_owe_settings.patch
wacom-Print-errors-for-libwacom_new_from_-calls.patch
wacom-Split-off-notebook-switching-for-detected-stylus.patch
wacom-Add-a-fake-stylus-when-mocking-a-tablet.patch
wacom-Add-scenario-tester.patch
color-Remove-profile-upload-feature.patch
network-fix-critical-when-opening-VPN-details-page.patch
common-Fix-leak-of-GUdevDevice.patch
keyboard-manager-fix-leak-of-section-list-store.patch
keyboard-item-fix-leak-on-unused-CcKeyCombo.patch
keyboard-shortcut-editor-fix-leak-of-accel-string.patch
datetime-Remove-tzname_daylight.patch
ua-Use-the-new-high-contrast-key.patch
search-provider-Don-t-escape-result-description-as-markup.patch
build-Bump-required-gsettings-desktop-schemas-version.patch
network-Fix-saving-passwords-for-non-wifi-connections.patch
display-Always-show-refresh-rate.patch
applications-Properly-protect-against-NULL-app_id.patch
applications-Switch-to-g_spawn_check_wait_status.patch
wwan-Make-sure-secrets-are-set-when-querying-connection-A.patch
display-Only-display-configuration-options-if-apply-is-al.patch
info-Use-udev-to-get-the-hardware-RAM-size.patch
wacom-Allow-NULL-monitors-in-calibration.patch
wacom-Explicitly-discard-input-from-touchscreens.patch
keyboard-Allow-disabling-alternate-characters-key.patch
keyboard-For-xkb-options-have-Layout-default-toggle-and-N.patch
keyboard-Avoid-modifying-xkb-options-when-user-changes-n.patch
......