Skip to content
Commits on Source (29)
================
Version 3.38.2
================
- Updated translations
Applications:
- Fix NULL hash table being unreffed.
Keyboard:
- fix gtk_widget_get_can_default assertion error.
Network:
- Correctly detect when ethernet devices are hotplugged.
Printers:
- Make printers panel have a smaller minimum width.
- Fix leak of printer name in callbacks.
Sharing:
- Disable Tracker 3.
Sound:
- Update libgvc to add support for recent UCM related changes in ALSA and
PulseAudio.
Users:
- Fix free of const string.
Wacom:
- Fix a critical warning if loading a cursor fails.
================
Version 3.38.1
================
......
gnome-control-center (1:3.38.2-1ubuntu1) hirsute; urgency=medium
* New upstream version based on Debian
* debian/patches/gitlab_ucm_mixer_control_select.patch:
- remove change included in the new version
-- Sebastien Bacher <seb128@debian.org> Mon, 23 Nov 2020 21:03:57 +0100
gnome-control-center (1:3.38.2-1) unstable; urgency=medium
* Team upload
* New upstream release
- Applications: Fix a NULL pointer dereference
- Keyboard: Fix an assertion failure
- Network: Correctly detect when Ethernet devices are hotplugged
- Printers: Fix memory leaks
- Printers: Reduce panel's minimum width
- Sharing: When disabling Tracker, also disable Tracker 3
- Sound: Update libgvc to support UCM in recent ALSA and PulseAudio
- Users: Avoid freeing a const string
- Wacom: Fix a critical warning if loading a cursor fails
* Bump libpulse-dev dependency according to meson.build
* Preferentially build-depend on libgdk-pixbuf-2.0-dev.
We don't need the deprecated Xlib integration that is also pulled in
by the older libgdk-pixbuf2.0-dev package (see #974870).
-- Simon McVittie <smcv@debian.org> Mon, 23 Nov 2020 10:14:09 +0000
gnome-control-center (1:3.38.1-1ubuntu1) groovy; urgency=medium
* New upstream version based on Debian
......@@ -64,9 +92,6 @@ gnome-control-center (1:3.37.92-1) experimental; urgency=medium
* Depend on gnome-settings-daemon 3.37.x.
The core components of the GNOME desktop should be upgraded as a group,
and mismatched combinations will not have been tested in practice.
-- Simon McVittie <smcv@debian.org> Mon, 07 Sep 2020 18:24:55 +0100²
gnome-control-center (1:3.37.90-1) experimental; urgency=medium
* New upstream release
......
......@@ -22,7 +22,7 @@ Build-Depends: debhelper-compat (= 12),
libcolord-dev (>= 0.1.29),
libcolord-gtk-dev (>= 0.1.24),
libcups2-dev,
libgdk-pixbuf2.0-dev (>= 2.23.0),
libgdk-pixbuf-2.0-dev (>= 2.23.0) | libgdk-pixbuf2.0-dev (>= 2.23.0),
libgirepository1.0-dev,
libglib2.0-dev (>= 2.56.0),
libgnome-desktop-3-dev (>= 3.32.2-2ubuntu2),
......@@ -41,7 +41,7 @@ Build-Depends: debhelper-compat (= 12),
libnma-dev (>= 1.8.0) [linux-any],
libmm-glib-dev [linux-any],
libpolkit-gobject-1-dev (>= 0.103),
libpulse-dev,
libpulse-dev (>= 13.0~),
libpwquality-dev,
libsecret-1-dev,
libsmbclient-dev (>= 2:3.6.12-1~),
......
......@@ -18,7 +18,7 @@ Build-Depends: debhelper-compat (= 12),
libcolord-dev (>= 0.1.29),
libcolord-gtk-dev (>= 0.1.24),
libcups2-dev,
libgdk-pixbuf2.0-dev (>= 2.23.0),
libgdk-pixbuf-2.0-dev (>= 2.23.0) | libgdk-pixbuf2.0-dev (>= 2.23.0),
libgirepository1.0-dev,
libglib2.0-dev (>= 2.56.0),
libgnome-desktop-3-dev (>= 3.32.2-2ubuntu2),
......@@ -37,7 +37,7 @@ Build-Depends: debhelper-compat (= 12),
libnma-dev (>= 1.8.0) [linux-any],
libmm-glib-dev [linux-any],
libpolkit-gobject-1-dev (>= 0.103),
libpulse-dev,
libpulse-dev (>= 13.0~),
libpwquality-dev,
libsecret-1-dev,
libsmbclient-dev (>= 2:3.6.12-1~),
......
From 81899262bee17c66dc993065fd77307f00e0b265 Mon Sep 17 00:00:00 2001
From: Daniel van Vugt <daniel.van.vugt@canonical.com>
Date: Fri, 16 Mar 2018 13:53:10 -0400
Subject: [PATCH 01/22] Expose touchpad settings if synaptics is in use
......@@ -20,11 +19,11 @@ https://gitlab.gnome.org/GNOME/mutter/merge_requests/37
panels/mouse/cc-mouse-panel.c | 16 +++++++++-------
2 files changed, 16 insertions(+), 7 deletions(-)
Index: gnome-control-center/panels/mouse/cc-mouse-caps-helper.c
===================================================================
--- gnome-control-center.orig/panels/mouse/cc-mouse-caps-helper.c
+++ gnome-control-center/panels/mouse/cc-mouse-caps-helper.c
@@ -38,6 +38,13 @@ touchpad_check_capabilities_x11 (gboolea
diff --git a/panels/mouse/cc-mouse-caps-helper.c b/panels/mouse/cc-mouse-caps-helper.c
index 69546b2..39534b9 100644
--- a/panels/mouse/cc-mouse-caps-helper.c
+++ b/panels/mouse/cc-mouse-caps-helper.c
@@ -38,6 +38,13 @@ touchpad_check_capabilities_x11 (gboolean *have_two_finger_scrolling,
unsigned long nitems, bytes_after;
unsigned char *data;
......@@ -38,10 +37,10 @@ Index: gnome-control-center/panels/mouse/cc-mouse-caps-helper.c
gdisplay = gdk_display_get_default ();
display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
prop_scroll_methods = XInternAtom (display, "libinput Scroll Methods Available", False);
Index: gnome-control-center/panels/mouse/cc-mouse-panel.c
===================================================================
--- gnome-control-center.orig/panels/mouse/cc-mouse-panel.c
+++ gnome-control-center/panels/mouse/cc-mouse-panel.c
diff --git a/panels/mouse/cc-mouse-panel.c b/panels/mouse/cc-mouse-panel.c
index a7f018b..08304bf 100644
--- a/panels/mouse/cc-mouse-panel.c
+++ b/panels/mouse/cc-mouse-panel.c
@@ -68,7 +68,6 @@ struct _CcMousePanel
gboolean have_mouse;
gboolean have_touchpad;
......@@ -50,7 +49,7 @@ Index: gnome-control-center/panels/mouse/cc-mouse-panel.c
gboolean left_handed;
GtkGesture *left_gesture;
@@ -86,7 +85,7 @@ setup_touchpad_options (CcMousePanel *se
@@ -86,7 +85,7 @@ setup_touchpad_options (CcMousePanel *self)
gboolean have_edge_scrolling;
gboolean have_tap_to_click;
......
......@@ -13,10 +13,10 @@ See https://bugzilla.gnome.org/show_bug.cgi?id=695691
panels/info-overview/cc-info-overview-panel.ui | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: gnome-control-center/panels/info-overview/cc-info-overview-panel.ui
===================================================================
--- gnome-control-center.orig/panels/info-overview/cc-info-overview-panel.ui
+++ gnome-control-center/panels/info-overview/cc-info-overview-panel.ui
diff --git a/panels/info-overview/cc-info-overview-panel.ui b/panels/info-overview/cc-info-overview-panel.ui
index 98cb85d..cac8567 100644
--- a/panels/info-overview/cc-info-overview-panel.ui
+++ b/panels/info-overview/cc-info-overview-panel.ui
@@ -28,7 +28,8 @@
<object class="GtkImage">
<property name="visible">True</property>
......
From: Jeremy Bicha <jbicha@debian.org>
Date: Sat, 9 Feb 2019 16:32:03 -0500
Subject: [PATCH 07/26] sound: Allow volume to be set above 100%.
Some systems have low maximum volume set (like x220), allow, from an option
in gnome-control-center to set it above that 100% limit from g-s-d
(keyboard) and gnome-shell.
Only show the above 100% volume option if:
1. you are in an ubuntu session
2. the selected output supports amplified volume. If so:
present the settings to google that on and off. It will enable
GNOME Shell and media keys to set the sound above 100%. If not
enabled, volume and sliders are all capped to 100%. (LP: #1706524)
Modified from original patch in unity-control-center from Lars Uebernickel.
Adapted for Ubuntu gnome-control-center by Didier Roche
Updated for GNOME 3.32 by Jeremy Bicha
Origin: ubuntu
Bug-Ubuntu: https://launchpad.net/bugs/1706524
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=710424
---
panels/sound/cc-sound-panel.c | 20 +++++++++
panels/sound/cc-sound-panel.ui | 92 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 112 insertions(+)
Index: gnome-control-center/panels/sound/cc-sound-panel.c
===================================================================
--- gnome-control-center.orig/panels/sound/cc-sound-panel.c
+++ gnome-control-center/panels/sound/cc-sound-panel.c
@@ -65,6 +65,9 @@ struct _CcSoundPanel
CcProfileComboBox *output_profile_combo_box;
GtkListBoxRow *output_profile_row;
CcVolumeSlider *output_volume_slider;
+ CcVolumeSlider *output_volume_slider_ubuntu;
+ GtkWidget *allow_amplify_switch;
+ GtkWidget *ubuntu_output_frame;
CcStreamListBox *stream_list_box;
GtkListBoxRow *subwoofer_row;
CcSubwooferSlider *subwoofer_slider;
@@ -88,6 +91,8 @@ allow_amplified_changed_cb (CcSoundPanel
{
cc_volume_slider_set_is_amplified (self->output_volume_slider,
g_settings_get_boolean (self->sound_settings, "allow-volume-above-100-percent"));
+ cc_volume_slider_set_is_amplified (self->output_volume_slider_ubuntu,
+ g_settings_get_boolean (self->sound_settings, "allow-volume-above-100-percent"));
}
static void
@@ -107,6 +112,7 @@ output_device_changed_cb (CcSoundPanel *
stream = gvc_mixer_control_get_stream_from_device (self->mixer_control, device);
cc_volume_slider_set_stream (self->output_volume_slider, stream, CC_STREAM_TYPE_OUTPUT);
+ cc_volume_slider_set_stream (self->output_volume_slider_ubuntu, stream, CC_STREAM_TYPE_OUTPUT);
cc_level_bar_set_stream (self->output_level_bar, stream, CC_STREAM_TYPE_OUTPUT);
if (stream != NULL)
@@ -210,6 +216,9 @@ cc_sound_panel_class_init (CcSoundPanelC
gtk_widget_class_bind_template_child (widget_class, CcSoundPanel, output_profile_combo_box);
gtk_widget_class_bind_template_child (widget_class, CcSoundPanel, output_profile_row);
gtk_widget_class_bind_template_child (widget_class, CcSoundPanel, output_volume_slider);
+ gtk_widget_class_bind_template_child (widget_class, CcSoundPanel, output_volume_slider_ubuntu);
+ gtk_widget_class_bind_template_child (widget_class, CcSoundPanel, allow_amplify_switch);
+ gtk_widget_class_bind_template_child (widget_class, CcSoundPanel, ubuntu_output_frame);
gtk_widget_class_bind_template_child (widget_class, CcSoundPanel, stream_list_box);
gtk_widget_class_bind_template_child (widget_class, CcSoundPanel, subwoofer_row);
gtk_widget_class_bind_template_child (widget_class, CcSoundPanel, subwoofer_slider);
@@ -254,12 +263,23 @@ cc_sound_panel_init (CcSoundPanel *self)
G_CONNECT_SWAPPED);
allow_amplified_changed_cb (self);
+ if (strstr (g_getenv("XDG_CURRENT_DESKTOP"), "ubuntu") != NULL) {
+ gtk_widget_set_visible(self->ubuntu_output_frame, TRUE);
+ gtk_widget_set_visible(GTK_WIDGET (self->output_volume_slider), FALSE);
+ g_settings_bind (self->sound_settings, "allow-volume-above-100-percent",
+ self->allow_amplify_switch, "active", G_SETTINGS_BIND_DEFAULT);
+ } else {
+ gtk_widget_set_visible(self->ubuntu_output_frame, FALSE);
+ gtk_widget_set_visible(GTK_WIDGET (self->output_volume_slider), TRUE);
+ }
+
self->mixer_control = gvc_mixer_control_new ("GNOME Settings");
gvc_mixer_control_open (self->mixer_control);
cc_stream_list_box_set_mixer_control (self->stream_list_box, self->mixer_control);
cc_volume_slider_set_mixer_control (self->input_volume_slider, self->mixer_control);
cc_volume_slider_set_mixer_control (self->output_volume_slider, self->mixer_control);
+ cc_volume_slider_set_mixer_control (self->output_volume_slider_ubuntu, self->mixer_control);
cc_subwoofer_slider_set_mixer_control (self->subwoofer_slider, self->mixer_control);
cc_device_combo_box_set_mixer_control (self->input_device_combo_box, self->mixer_control, FALSE);
cc_device_combo_box_set_mixer_control (self->output_device_combo_box, self->mixer_control, TRUE);
Index: gnome-control-center/panels/sound/cc-sound-panel.ui
===================================================================
--- gnome-control-center.orig/panels/sound/cc-sound-panel.ui
+++ gnome-control-center/panels/sound/cc-sound-panel.ui
@@ -36,6 +36,98 @@
</object>
</child>
<child>
+ <object class="GtkFrame" id="ubuntu_output_frame">
+ <property name="visible">False</property>
+ <child>
+ <object class="GtkListBox" id="ubuntu_output_box">
+ <property name="visible">True</property>
+ <property name="selection_mode">none</property>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="width_request">100</property>
+ <property name="height_request">80</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <child>
+ <object class="CcVolumeSlider" id="output_volume_slider_ubuntu">
+ <property name="visible">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="width_request">100</property>
+ <property name="height_request">80</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <child>
+ <object class="GtkGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_left">20</property>
+ <property name="margin_right">20</property>
+ <property name="margin_top">10</property>
+ <property name="margin_bottom">10</property>
+ <property name="row_spacing">2</property>
+ <property name="column_spacing">16</property>
+ <child>
+ <object class="GtkLabel" id="allow_amplify_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="valign">center</property>
+ <property name="label" translatable="yes">Over-Amplification</property>
+ <property name="mnemonic-widget">allow_amplify_switch</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSwitch" id="allow_amplify_switch">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="height">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="allow_amplify_desc">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Allows raising the volume above 100%. This can result in a loss of audio quality; it is better to increase application volume settings, if possible.</property>
+ <property name="wrap">True</property>
+ <attributes>
+ <attribute name="scale" value="0.9"/>
+ </attributes>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
......@@ -7,11 +7,11 @@ This reverts commit 9ebcd17236a54daa0927a22d973d0309dfb4c8df.
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: gnome-control-center/meson.build
===================================================================
--- gnome-control-center.orig/meson.build
+++ gnome-control-center/meson.build
@@ -127,7 +127,7 @@ gnome_settings_dep = dependency('gnome-s
diff --git a/meson.build b/meson.build
index a8984fd..d2e15ed 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: '>= 3.37.1')
libxml_dep = dependency('libxml-2.0')
......
From 8489e800b478f2093056de0f0f5a1c0c0c063896 Mon Sep 17 00:00:00 2001
From: Hui Wang <hui.wang@canonical.com>
Date: Mon, 2 Dec 2019 13:55:28 +0800
Subject: [PATCH 1/2] mixer-control: consolidate port finding and setting
with/without ucm
Recently Intel added a new audio driver in the Linux kernel, it is
called sof driver. This driver is needed on the laptops which
connect the digital mic to the PCH instead of the codec. To make the
sof driver work with pulseaudio, the ucm is mandatory.
With the ucm, the multi-function audio jack has different port names
in the pulseaudio from the one without ucm, these are the port names
with the ucm:
[In] Mic1: Digital Microphone
[In] Mic2: Headphones Stereo Microphone
[In] Headset: Headset Mono Microphone
[Out] Headphones: Headphones
[Out] Speaker: Speaker
To make the audio device selection work on the machines using the ucm,
the pulseaudio introduce a change to add 2 new memebers in the device
port structure from the PA_PROTOCOL_VERSION=34, with these 2 members'
help, we could consolidate the port finding and setting for both with
ucm and without ucm.
And this patch maintains the backward compatibility with the
PA_PROTOCOL_VERSION<=33,
https://gitlab.gnome.org/GNOME/libgnome-volume-control/-/merge_requests/10
---
subprojects/gvc/gvc-mixer-control.c | 120 +++++++++++++++++++++++++++++++++++++++++---
1 file changed, 114 insertions(+), 6 deletions(-)
Index: gnome-control-center-3.36.4/subprojects/gvc/gvc-mixer-control.c
===================================================================
--- gnome-control-center-3.36.4.orig/subprojects/gvc/gvc-mixer-control.c
+++ gnome-control-center-3.36.4/subprojects/gvc/gvc-mixer-control.c
@@ -104,6 +104,11 @@ struct GvcMixerControlPrivate
gboolean has_headsetmic;
gboolean has_headphonemic;
gboolean headset_plugged_in;
+ char *headphones_name;
+ char *headsetmic_name;
+ char *headphonemic_name;
+ char *internalspk_name;
+ char *internalmic_name;
#endif /* HAVE_ALSA */
GvcMixerControlState state;
@@ -2155,6 +2160,18 @@ source_info_cb (pa_context *c,
s = data->port_name_to_set;
+ for (j = 0; j < i->n_ports; j++)
+ if (strcmp (i->ports[j]->name, s) == 0) {
+ o = pa_context_set_default_source (c,
+ i->name,
+ NULL,
+ NULL);
+ if (o == NULL) {
+ g_warning ("pa_context_set_default_source() failed");
+ return;
+ }
+ }
+
if (i->active_port && strcmp (i->active_port->name, s) == 0)
return;
@@ -2199,6 +2216,7 @@ gvc_mixer_control_set_headset_port (GvcM
g_return_if_fail (GVC_IS_MIXER_CONTROL (control));
#ifdef HAVE_ALSA
+#if (PA_PROTOCOL_VERSION <= 33)
switch (choice) {
case GVC_HEADSET_PORT_CHOICE_HEADPHONES:
gvc_mixer_control_set_port_status_for_headset (control, id, "analog-output-headphones", TRUE);
@@ -2216,6 +2234,30 @@ gvc_mixer_control_set_headset_port (GvcM
g_assert_not_reached ();
}
#else
+ switch (choice) {
+ case GVC_HEADSET_PORT_CHOICE_HEADPHONES:
+ if (control->priv->headphones_name)
+ gvc_mixer_control_set_port_status_for_headset (control, id, control->priv->headphones_name, TRUE);
+ if (control->priv->internalmic_name)
+ gvc_mixer_control_set_port_status_for_headset (control, id, control->priv->internalmic_name, FALSE);
+ break;
+ case GVC_HEADSET_PORT_CHOICE_HEADSET:
+ if (control->priv->headphones_name)
+ gvc_mixer_control_set_port_status_for_headset (control, id, control->priv->headphones_name, TRUE);
+ if (control->priv->headsetmic_name)
+ gvc_mixer_control_set_port_status_for_headset (control, id, control->priv->headsetmic_name, FALSE);
+ break;
+ case GVC_HEADSET_PORT_CHOICE_MIC:
+ if (control->priv->internalspk_name)
+ gvc_mixer_control_set_port_status_for_headset (control, id, control->priv->internalspk_name, TRUE);
+ if (control->priv->headphonemic_name)
+ gvc_mixer_control_set_port_status_for_headset (control, id, control->priv->headphonemic_name, FALSE);
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+#endif
+#else
g_warning ("BUG: libgnome-volume-control compiled without ALSA support");
#endif /* HAVE_ALSA */
}
@@ -2225,12 +2267,12 @@ typedef struct {
const pa_card_port_info *headphones;
const pa_card_port_info *headsetmic;
const pa_card_port_info *headphonemic;
+ const pa_card_port_info *internalmic;
+ const pa_card_port_info *internalspk;
} headset_ports;
/*
- TODO: Check if we still need this with the changed PA port names
-
- In PulseAudio ports will show up with the following names:
+ In PulseAudio without ucm, ports will show up with the following names:
Headphones - analog-output-headphones
Headset mic - analog-input-headset-mic (was: analog-input-microphone-headset)
Jack in mic-in mode - analog-input-headphone-mic (was: analog-input-microphone)
@@ -2249,8 +2291,19 @@ typedef struct {
Headset Mic Jack - indicates headset jack where hardware can distinguish
between headphones and headsets. There is no use popping up a dialog in
this case, unless we already need to do this for the mic-in mode.
+
+ From the PA_PROCOTOL_VERSION=34, The device_port structure adds 2 members
+ available_group and type, with the help of these 2 members, we could
+ consolidate the port checking and port setting for non-ucm and with-ucm
+ cases.
*/
+#define HEADSET_PORT_SET(dst, src) \
+ do { \
+ if (!(dst) || (dst)->priority < (src)->priority) \
+ dst = src; \
+ } while (0)
+
static headset_ports *
get_headset_ports (const pa_card_info *c)
{
@@ -2261,17 +2314,48 @@ get_headset_ports (const pa_card_info *c
for (i = 0; i < c->n_ports; i++) {
pa_card_port_info *p = c->ports[i];
-
+#if (PA_PROTOCOL_VERSION <= 33)
if (strcmp (p->name, "analog-output-headphones") == 0)
h->headphones = p;
else if (strcmp (p->name, "analog-input-headset-mic") == 0)
h->headsetmic = p;
else if (strcmp(p->name, "analog-input-headphone-mic") == 0)
h->headphonemic = p;
+#else
+ /* in the first loop, set only headphones */
+ /* the microphone ports are assigned in the second loop */
+ if (p->type == PA_DEVICE_PORT_TYPE_HEADPHONES) {
+ if (p->available_group)
+ HEADSET_PORT_SET(h->headphones, p);
+ } else if (p->type == PA_DEVICE_PORT_TYPE_SPEAKER) {
+ HEADSET_PORT_SET(h->internalspk, p);
+ } else if (p->type == PA_DEVICE_PORT_TYPE_MIC) {
+ if (!p->available_group)
+ HEADSET_PORT_SET(h->internalmic, p);
+ }
+#endif
+ }
+
+#if (PA_PROTOCOL_VERSION > 33)
+ if (h->headphones) {
+ for (i = 0; i < c->n_ports; i++) {
+ pa_card_port_info *p = c->ports[i];
+ if (g_strcmp0(h->headphones->available_group, p->available_group))
+ continue;
+ if (p->direction != PA_DIRECTION_INPUT)
+ continue;
+ if (p->type == PA_DEVICE_PORT_TYPE_HEADSET)
+ HEADSET_PORT_SET(h->headsetmic, p);
+ else if (p->type == PA_DEVICE_PORT_TYPE_MIC)
+ HEADSET_PORT_SET(h->headphonemic, p);
+ }
}
+#endif
+
return h;
}
+#if (PA_PROTOCOL_VERSION <= 33)
static gboolean
verify_alsa_card (int cardindex,
gboolean *headsetmic,
@@ -2324,6 +2408,32 @@ verify_alsa_card (int cardindex,
snd_hctl_close (hctl);
return *headsetmic || *headphonemic;
}
+#endif
+
+static void
+free_priv_port_names(GvcMixerControl *control)
+{
+ if (control->priv->headphones_name != NULL) {
+ g_free (control->priv->headphones_name);
+ control->priv->headphones_name = NULL;
+ }
+ if (control->priv->headsetmic_name != NULL) {
+ g_free (control->priv->headsetmic_name);
+ control->priv->headsetmic_name = NULL;
+ }
+ if (control->priv->headphonemic_name != NULL) {
+ g_free (control->priv->headphonemic_name);
+ control->priv->headphonemic_name = NULL;
+ }
+ if (control->priv->internalspk_name != NULL) {
+ g_free (control->priv->internalspk_name);
+ control->priv->internalspk_name = NULL;
+ }
+ if (control->priv->internalmic_name != NULL) {
+ g_free (control->priv->internalmic_name);
+ control->priv->internalmic_name = NULL;
+ }
+}
static void
check_audio_device_selection_needed (GvcMixerControl *control,
@@ -2344,7 +2454,7 @@ check_audio_device_selection_needed (Gvc
if (control->priv->headset_card != (int) info->index) {
int cardindex;
- gboolean hsmic, hpmic;
+ gboolean hsmic = TRUE, hpmic = TRUE;
const char *s;
s = pa_proplist_gets (info->proplist, "alsa.card");
@@ -2355,9 +2465,10 @@ check_audio_device_selection_needed (Gvc
if (cardindex == 0 && strcmp(s, "0") != 0)
goto out;
+#if (PA_PROTOCOL_VERSION <= 33)
if (!verify_alsa_card(cardindex, &hsmic, &hpmic))
goto out;
-
+#endif
control->priv->headset_card = info->index;
control->priv->has_headsetmic = hsmic && h->headsetmic;
control->priv->has_headphonemic = hpmic && h->headphonemic;
@@ -2367,6 +2478,12 @@ check_audio_device_selection_needed (Gvc
}
control->priv->headset_plugged_in = h->headphones->available != PA_PORT_AVAILABLE_NO;
+ free_priv_port_names(control);
+ control->priv->headphones_name = h->headphones ? g_strdup(h->headphones->name) : NULL;
+ control->priv->headsetmic_name = h->headsetmic ? g_strdup(h->headsetmic->name) : NULL;
+ control->priv->headphonemic_name = h->headphonemic ? g_strdup(h->headphonemic->name) : NULL;
+ control->priv->internalspk_name = h->internalspk ? g_strdup(h->internalspk->name) : NULL;
+ control->priv->internalmic_name = h->internalmic ? g_strdup(h->internalmic->name) : NULL;
if (!start_dialog &&
!stop_dialog)
@@ -3483,7 +3600,9 @@ gvc_mixer_control_dispose (GObject *obje
g_hash_table_destroy (control->priv->ui_inputs);
control->priv->ui_inputs = NULL;
}
-
+#ifdef HAVE_ALSA
+ free_priv_port_names(control);
+#endif
G_OBJECT_CLASS (gvc_mixer_control_parent_class)->dispose (object);
}
@@ -3719,7 +3838,6 @@ static void
gvc_mixer_control_finalize (GObject *object)
{
GvcMixerControl *mixer_control;
-
g_return_if_fail (object != NULL);
g_return_if_fail (GVC_IS_MIXER_CONTROL (object));
......@@ -31,6 +31,3 @@
0030-temporarily-revert-alt-char-key.patch
0032-online-accounts-maybe-leak-a-reference-to-the-panel.patch
ubuntu_restore_sharing.patch
gitlab_ucm_mixer_control_select.patch
project(
'gnome-control-center', 'c',
version : '3.38.1',
version : '3.38.2',
license : 'GPL2+',
meson_version : '>= 0.51.0'
)
......
......@@ -1871,10 +1871,10 @@ cc_applications_panel_finalize (GObject *object)
g_clear_object (&self->privacy_settings);
g_clear_object (&self->search_settings);
g_free (self->current_app_id);
g_free (self->current_portal_app_id);
g_hash_table_unref (self->globs);
g_hash_table_unref (self->search_providers);
g_clear_pointer (&self->current_app_id, g_free);
g_clear_pointer (&self->current_portal_app_id, g_free);
g_clear_pointer (&self->globs, g_hash_table_unref);
g_clear_pointer (&self->search_providers, g_hash_table_unref);
G_OBJECT_CLASS (cc_applications_panel_parent_class)->finalize (object);
}
......
......@@ -311,6 +311,7 @@
<property name="label" translatable="yes">Replace</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="replace_button_clicked_cb" object="CcKeyboardShortcutEditor" swapped="yes" />
</object>
......
......@@ -391,9 +391,6 @@ panel_add_device (CcNetworkPanel *self, NMDevice *device)
NetDeviceBluetooth *device_bluetooth;
g_autoptr(GDBusObject) modem_object = NULL;
if (!nm_device_get_managed (device))
return;
/* does already exist */
if (g_hash_table_lookup (self->nm_device_to_device, device) != NULL)
return;
......@@ -517,19 +514,36 @@ active_connections_changed (CcNetworkPanel *self)
}
static void
device_added_cb (CcNetworkPanel *self, NMDevice *device)
device_managed_cb (CcNetworkPanel *self, GParamSpec *pspec, NMDevice *device)
{
g_debug ("New device added");
if (!nm_device_get_managed (device))
return;
panel_add_device (self, device);
panel_refresh_device_titles (self);
}
static void
device_added_cb (CcNetworkPanel *self, NMDevice *device)
{
g_debug ("New device added");
if (nm_device_get_managed (device))
device_managed_cb (self, NULL, device);
else
g_signal_connect_object (device, "notify::managed", G_CALLBACK (device_managed_cb), self, G_CONNECT_SWAPPED);
}
static void
device_removed_cb (CcNetworkPanel *self, NMDevice *device)
{
g_debug ("Device removed");
panel_remove_device (self, device);
panel_refresh_device_titles (self);
g_signal_handlers_disconnect_by_func (device,
G_CALLBACK (device_managed_cb),
self);
}
static void
......@@ -537,7 +551,6 @@ manager_running (CcNetworkPanel *self)
{
const GPtrArray *devices;
int i;
NMDevice *device_tmp;
/* clear all devices we added */
if (!nm_client_get_nm_running (self->client)) {
......@@ -552,8 +565,8 @@ manager_running (CcNetworkPanel *self)
return;
}
for (i = 0; i < devices->len; i++) {
device_tmp = g_ptr_array_index (devices, i);
panel_add_device (self, device_tmp);
NMDevice *device = g_ptr_array_index (devices, i);
device_added_cb (self, device);
}
out:
panel_refresh_device_titles (self);
......
......@@ -94,7 +94,7 @@ ppd_names_free (gpointer user_data)
}
}
static void set_ppd_cb (gchar *printer_name, gboolean success, gpointer user_data);
static void set_ppd_cb (const gchar *printer_name, gboolean success, gpointer user_data);
static void
get_ppd_names_cb (PPDName **names,
......@@ -139,7 +139,7 @@ search_for_drivers (PpDetailsDialog *self)
}
static void
set_ppd_cb (gchar *printer_name,
set_ppd_cb (const gchar *printer_name,
gboolean success,
gpointer user_data)
{
......
......@@ -1448,7 +1448,7 @@ printer_set_ppd_async_dbus_cb (GObject *source_object,
/* Don't call callback if cancelled */
if (!data->cancellable ||
!g_cancellable_is_cancelled (data->cancellable))
data->callback (g_strdup (data->printer_name),
data->callback (data->printer_name,
result,
data->user_data);
......@@ -1521,7 +1521,7 @@ printer_set_ppd_async (const gchar *printer_name,
return;
out:
callback (g_strdup (printer_name), FALSE, user_data);
callback (printer_name, FALSE, user_data);
if (data->cancellable)
g_object_unref (data->cancellable);
......@@ -1578,7 +1578,7 @@ printer_set_ppd_file_async_scb (GObject *source_object,
return;
out:
data->callback (g_strdup (data->printer_name), FALSE, data->user_data);
data->callback (data->printer_name, FALSE, data->user_data);
if (data->cancellable)
g_object_unref (data->cancellable);
......@@ -1640,7 +1640,7 @@ printer_set_ppd_file_async (const gchar *printer_name,
return;
out:
callback (g_strdup (printer_name), FALSE, user_data);
callback (printer_name, FALSE, user_data);
if (data->cancellable)
g_object_unref (data->cancellable);
......
......@@ -133,7 +133,7 @@ gchar *printer_get_hostname (cups_ptype_t printer_type,
const gchar *device_uri,
const gchar *printer_uri);
typedef void (*PSPCallback) (gchar *printer_name,
typedef void (*PSPCallback) (const gchar *printer_name,
gboolean success,
gpointer user_data);
......
......@@ -278,6 +278,7 @@
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
<property name="width">2</property>
</packing>
</child>
......
......@@ -106,6 +106,7 @@ cc_media_sharing_set_preferences (gchar **folders)
g_key_file_set_boolean (file, "general", "upnp-enabled", TRUE);
g_key_file_set_boolean (file, "Tracker", "enabled", FALSE);
g_key_file_set_boolean (file, "Tracker3", "enabled", FALSE);
g_key_file_set_boolean (file, "MediaExport", "enabled", TRUE);
str_list = folders;
......
......@@ -839,7 +839,7 @@ get_enrollment_string (CcFingerprintDialog *self,
if (have_multiple_devices (self))
device_name = cc_fprintd_device_get_name (self->device);
ret = TR (finger_str_to_msg (finger_id, device_name, is_swipe));
ret = finger_str_to_msg (finger_id, device_name, is_swipe);
if (ret)
return ret;
......@@ -852,8 +852,8 @@ enroll_finger (CcFingerprintDialog *self,
const char *finger_id)
{
g_auto(GStrv) tmp_finger_name = NULL;
g_autofree char *enroll_message = NULL;
g_autofree char *finger_name = NULL;
g_autofree char *enroll_message = NULL;
g_return_if_fail (finger_id);
......@@ -863,7 +863,7 @@ enroll_finger (CcFingerprintDialog *self,
g_debug ("Enrolling finger %s", finger_id);
enroll_message = TR (get_enrollment_string (self, finger_id));
enroll_message = get_enrollment_string (self, finger_id);
tmp_finger_name = g_strsplit (get_finger_name (finger_id), "_", -1);
finger_name = g_strjoinv ("", tmp_finger_name);
......