Merge lp:~diwic/gnome-control-center/fixes-2012-12-07 into lp:~ubuntu-desktop/gnome-control-center/ubuntu

Proposed by David Henningsson
Status: Merged
Merged at revision: 533
Proposed branch: lp:~diwic/gnome-control-center/fixes-2012-12-07
Merge into: lp:~ubuntu-desktop/gnome-control-center/ubuntu
Diff against target: 286 lines (+83/-38)
3 files modified
debian/patches/git-sound-fix-port-handling.patch (+24/-0)
debian/patches/series (+1/-0)
debian/patches/sound_nua_panel.patch (+58/-38)
To merge this branch: bzr merge lp:~diwic/gnome-control-center/fixes-2012-12-07
Reviewer Review Type Date Requested Status
Sebastien Bacher Approve
Review via email: mp+138744@code.launchpad.net

Description of the change

Two fixes:

The first one is a preparation for PulseAudio 3.

The second one is another attempt to upstream an old bug.

To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :

@David: thanks for the work, I was sort of waiting on an upstream review before commiting, any chance you could ping Bastien to get the patch reviewed?

Otherwise, are you confident that the fix is right? Your upstream comment "In short; is the attached patch helping?" is a bit confusing in that regard, do you need testing/confirmation that it works before having it commited?

Revision history for this message
David Henningsson (diwic) wrote :

So; I know the patch was helping bug 1060143, but the question was if the upstream bug was the same bug (and helped by the same fix), or if the upstream bug and bug 1060143 are different ones. Is that clarifying things?

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks David, that looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'debian/patches/git-sound-fix-port-handling.patch'
2--- debian/patches/git-sound-fix-port-handling.patch 1970-01-01 00:00:00 +0000
3+++ debian/patches/git-sound-fix-port-handling.patch 2012-12-07 14:54:24 +0000
4@@ -0,0 +1,24 @@
5+commit 10a0c18b8e3058144586880019b68ab4ea40ce78
6+Author: David Henningsson <david.henningsson@canonical.com>
7+Date: Fri Dec 7 16:22:09 2012 +0530
8+
9+ sound: Fix port handling for the unknown availability case
10+
11+ The current code assumes that port availability transitions will be
12+ between YES and NO, and doesn't account for the fact that it may also be
13+ UNKNOWN. This causes spurious entries if the port availability
14+ transitions between YES and UNKNOWN.
15+
16+diff --git a/panels/sound/gvc-mixer-control.c b/panels/sound/gvc-mixer-control.c
17+index 34ddc0c..2f6cf34 100644
18+--- a/panels/sound/gvc-mixer-control.c
19++++ b/panels/sound/gvc-mixer-control.c
20+@@ -2138,7 +2138,7 @@ update_card (GvcMixerControl *control,
21+ else {
22+ for (i = 0; i < info->n_ports; i++) {
23+ if (g_strcmp0 (card_port->port, info->ports[i]->name) == 0) {
24+- if (card_port->available != info->ports[i]->available) {
25++ if ((card_port->available == PA_PORT_AVAILABLE_NO) != (info->ports[i]->available == PA_PORT_AVAILABLE_NO)) {
26+ card_port->available = info->ports[i]->available;
27+ g_debug ("sync port availability on card %i, card port name '%s', new available value %i",
28+ gvc_mixer_card_get_index (card),
29
30=== modified file 'debian/patches/series'
31--- debian/patches/series 2012-11-24 19:01:24 +0000
32+++ debian/patches/series 2012-12-07 14:54:24 +0000
33@@ -30,3 +30,4 @@
34 accounts_fix_unsetting_icon.patch
35 sound_nua_panel.patch
36 git_set_a11y_wm_theme.patch
37+git-sound-fix-port-handling.patch
38
39=== modified file 'debian/patches/sound_nua_panel.patch'
40--- debian/patches/sound_nua_panel.patch 2012-11-13 15:53:30 +0000
41+++ debian/patches/sound_nua_panel.patch 2012-12-07 14:54:24 +0000
42@@ -2,11 +2,11 @@
43 # Most of the code has now been upstreamed to Gnome, but they wanted
44 # to keep their old design, so about 25% of the original patch remains.
45 === modified file 'configure.ac'
46-Index: gnome-control-center-3.6.2/configure.ac
47+Index: gnome-control-center-3.6.3/configure.ac
48 ===================================================================
49---- gnome-control-center-3.6.2.orig/configure.ac 2012-11-13 16:25:40.665717988 +0100
50-+++ gnome-control-center-3.6.2/configure.ac 2012-11-13 16:25:40.773717987 +0100
51-@@ -435,6 +435,9 @@
52+--- gnome-control-center-3.6.3.orig/configure.ac 2012-12-07 14:27:22.997580116 +0100
53++++ gnome-control-center-3.6.3/configure.ac 2012-12-07 14:27:28.297580038 +0100
54+@@ -416,6 +416,9 @@
55 panels/online-accounts/icons/32x32/Makefile
56 panels/online-accounts/icons/48x48/Makefile
57 panels/online-accounts/icons/256x256/Makefile
58@@ -16,10 +16,10 @@
59 panels/sound/Makefile
60 panels/sound/data/Makefile
61 panels/sound/data/gnome-sound-panel.desktop.in
62-Index: gnome-control-center-3.6.2/panels/Makefile.am
63+Index: gnome-control-center-3.6.3/panels/Makefile.am
64 ===================================================================
65---- gnome-control-center-3.6.2.orig/panels/Makefile.am 2012-10-01 11:38:59.000000000 +0200
66-+++ gnome-control-center-3.6.2/panels/Makefile.am 2012-11-13 16:25:40.777717988 +0100
67+--- gnome-control-center-3.6.3.orig/panels/Makefile.am 2012-12-07 14:27:22.997580116 +0100
68++++ gnome-control-center-3.6.3/panels/Makefile.am 2012-12-07 14:27:28.297580038 +0100
69 @@ -10,6 +10,7 @@
70 region \
71 info \
72@@ -28,10 +28,10 @@
73 keyboard \
74 universal-access \
75 user-accounts \
76-Index: gnome-control-center-3.6.2/panels/sound-nua/Makefile.am
77+Index: gnome-control-center-3.6.3/panels/sound-nua/Makefile.am
78 ===================================================================
79 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
80-+++ gnome-control-center-3.6.2/panels/sound-nua/Makefile.am 2012-11-13 16:25:40.777717988 +0100
81++++ gnome-control-center-3.6.3/panels/sound-nua/Makefile.am 2012-12-07 14:27:28.297580038 +0100
82 @@ -0,0 +1,63 @@
83 +SUBDIRS = data
84 +
85@@ -96,10 +96,10 @@
86 + Makefile.in
87 +
88 +-include $(top_srcdir)/git.mk
89-Index: gnome-control-center-3.6.2/panels/sound-nua/cc-sound-panel.c
90+Index: gnome-control-center-3.6.3/panels/sound-nua/cc-sound-panel.c
91 ===================================================================
92 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
93-+++ gnome-control-center-3.6.2/panels/sound-nua/cc-sound-panel.c 2012-11-13 16:25:40.777717988 +0100
94++++ gnome-control-center-3.6.3/panels/sound-nua/cc-sound-panel.c 2012-12-07 14:27:28.297580038 +0100
95 @@ -0,0 +1,141 @@
96 +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
97 + *
98@@ -242,10 +242,10 @@
99 +{
100 +}
101 +
102-Index: gnome-control-center-3.6.2/panels/sound-nua/cc-sound-panel.h
103+Index: gnome-control-center-3.6.3/panels/sound-nua/cc-sound-panel.h
104 ===================================================================
105 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
106-+++ gnome-control-center-3.6.2/panels/sound-nua/cc-sound-panel.h 2012-11-13 16:25:40.777717988 +0100
107++++ gnome-control-center-3.6.3/panels/sound-nua/cc-sound-panel.h 2012-12-07 14:27:28.301580038 +0100
108 @@ -0,0 +1,60 @@
109 +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
110 + *
111@@ -307,10 +307,10 @@
112 +
113 +#endif /* _CC_SOUND_PANEL_H */
114 +
115-Index: gnome-control-center-3.6.2/panels/sound-nua/data/Makefile.am
116+Index: gnome-control-center-3.6.3/panels/sound-nua/data/Makefile.am
117 ===================================================================
118 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
119-+++ gnome-control-center-3.6.2/panels/sound-nua/data/Makefile.am 2012-11-13 16:25:40.777717988 +0100
120++++ gnome-control-center-3.6.3/panels/sound-nua/data/Makefile.am 2012-12-07 14:27:28.301580038 +0100
121 @@ -0,0 +1,17 @@
122 +NULL =
123 +
124@@ -329,10 +329,10 @@
125 + $(NULL)
126 +
127 +-include $(top_srcdir)/git.mk
128-Index: gnome-control-center-3.6.2/panels/sound-nua/data/gnome-sound-nua-panel.desktop.in.in
129+Index: gnome-control-center-3.6.3/panels/sound-nua/data/gnome-sound-nua-panel.desktop.in.in
130 ===================================================================
131 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
132-+++ gnome-control-center-3.6.2/panels/sound-nua/data/gnome-sound-nua-panel.desktop.in.in 2012-11-13 16:25:40.781717988 +0100
133++++ gnome-control-center-3.6.3/panels/sound-nua/data/gnome-sound-nua-panel.desktop.in.in 2012-12-07 14:27:28.301580038 +0100
134 @@ -0,0 +1,17 @@
135 +[Desktop Entry]
136 +_Name=Sound
137@@ -351,10 +351,10 @@
138 +X-GNOME-Settings-Panel=sound-nua
139 +# Translators: those are keywords for the sound control-center panel
140 +_Keywords=Card;Microphone;Volume;Fade;Balance;Bluetooth;Headset;
141-Index: gnome-control-center-3.6.2/panels/sound-nua/gvc-balance-bar.c
142+Index: gnome-control-center-3.6.3/panels/sound-nua/gvc-balance-bar.c
143 ===================================================================
144 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
145-+++ gnome-control-center-3.6.2/panels/sound-nua/gvc-balance-bar.c 2012-11-13 16:25:40.797717987 +0100
146++++ gnome-control-center-3.6.3/panels/sound-nua/gvc-balance-bar.c 2012-12-07 14:27:28.301580038 +0100
147 @@ -0,0 +1,575 @@
148 +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
149 + *
150@@ -931,10 +931,10 @@
151 +
152 + return GTK_WIDGET (bar);
153 +}
154-Index: gnome-control-center-3.6.2/panels/sound-nua/gvc-balance-bar.h
155+Index: gnome-control-center-3.6.3/panels/sound-nua/gvc-balance-bar.h
156 ===================================================================
157 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
158-+++ gnome-control-center-3.6.2/panels/sound-nua/gvc-balance-bar.h 2012-11-13 16:25:40.873717987 +0100
159++++ gnome-control-center-3.6.3/panels/sound-nua/gvc-balance-bar.h 2012-12-07 14:27:28.305580037 +0100
160 @@ -0,0 +1,70 @@
161 +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
162 + *
163@@ -1006,11 +1006,11 @@
164 +G_END_DECLS
165 +
166 +#endif /* __GVC_BALANCE_BAR_H */
167-Index: gnome-control-center-3.6.2/panels/sound-nua/gvc-mixer-dialog.c
168+Index: gnome-control-center-3.6.3/panels/sound-nua/gvc-mixer-dialog.c
169 ===================================================================
170 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
171-+++ gnome-control-center-3.6.2/panels/sound-nua/gvc-mixer-dialog.c 2012-11-13 16:26:26.245717312 +0100
172-@@ -0,0 +1,2187 @@
173++++ gnome-control-center-3.6.3/panels/sound-nua/gvc-mixer-dialog.c 2012-12-07 14:33:29.305574678 +0100
174+@@ -0,0 +1,2207 @@
175 +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
176 + *
177 + * Copyright (C) 2008 William Jon McCann
178@@ -2325,7 +2325,11 @@
179 + guint id,
180 + GvcMixerDialog *dialog)
181 +{
182-+ GvcMixerUIDevice* out = NULL;
183++ gboolean is_first_device;
184++ GtkTreeModel *model;
185++ GtkTreeIter iter;
186++ GvcMixerUIDevice *out = NULL;
187++
188 + out = gvc_mixer_control_lookup_output_id (control, id);
189 +
190 + if (out == NULL) {
191@@ -2333,7 +2337,13 @@
192 + return;
193 + }
194 +
195++ model = gtk_tree_view_get_model (GTK_TREE_VIEW (dialog->priv->output_treeview));
196++ is_first_device = !gtk_tree_model_get_iter_first (model, &iter);
197++
198 + add_output_ui_entry (dialog, out);
199++ if (is_first_device)
200++ active_output_update (dialog, out);
201++
202 +}
203 +
204 +static void
205@@ -2371,14 +2381,24 @@
206 + guint id,
207 + GvcMixerDialog *dialog)
208 +{
209-+ GvcMixerUIDevice* in = NULL;
210++ gboolean is_first_device;
211++ GtkTreeModel *model;
212++ GtkTreeIter iter;
213++ GvcMixerUIDevice *in = NULL;
214++
215 + in = gvc_mixer_control_lookup_input_id (control, id);
216 +
217 + if (in == NULL) {
218 + g_warning ("on_control_input_added - tried to fetch an input of id %u but got nothing", id);
219 + return;
220 + }
221++
222++ model = gtk_tree_view_get_model (GTK_TREE_VIEW (dialog->priv->input_treeview));
223++ is_first_device = !gtk_tree_model_get_iter_first (model, &iter);
224++
225 + add_input_ui_entry (dialog, in);
226++ if (is_first_device)
227++ active_input_update (dialog, in);
228 +}
229 +
230 +static void
231@@ -3198,10 +3218,10 @@
232 +
233 + return TRUE;
234 +}
235-Index: gnome-control-center-3.6.2/panels/sound-nua/gvc-mixer-dialog.h
236+Index: gnome-control-center-3.6.3/panels/sound-nua/gvc-mixer-dialog.h
237 ===================================================================
238 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
239-+++ gnome-control-center-3.6.2/panels/sound-nua/gvc-mixer-dialog.h 2012-11-13 16:25:40.893717986 +0100
240++++ gnome-control-center-3.6.3/panels/sound-nua/gvc-mixer-dialog.h 2012-12-07 14:27:28.313580037 +0100
241 @@ -0,0 +1,56 @@
242 +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
243 + *
244@@ -3259,10 +3279,10 @@
245 +G_END_DECLS
246 +
247 +#endif /* __GVC_MIXER_DIALOG_H */
248-Index: gnome-control-center-3.6.2/panels/sound/data/gnome-sound-panel.desktop.in.in
249+Index: gnome-control-center-3.6.3/panels/sound/data/gnome-sound-panel.desktop.in.in
250 ===================================================================
251---- gnome-control-center-3.6.2.orig/panels/sound/data/gnome-sound-panel.desktop.in.in 2012-10-01 11:39:00.000000000 +0200
252-+++ gnome-control-center-3.6.2/panels/sound/data/gnome-sound-panel.desktop.in.in 2012-11-13 16:25:40.897717987 +0100
253+--- gnome-control-center-3.6.3.orig/panels/sound/data/gnome-sound-panel.desktop.in.in 2012-12-07 14:27:22.997580116 +0100
254++++ gnome-control-center-3.6.3/panels/sound/data/gnome-sound-panel.desktop.in.in 2012-12-07 14:27:28.313580037 +0100
255 @@ -7,7 +7,7 @@
256 Type=Application
257 StartupNotify=true
258@@ -3272,10 +3292,10 @@
259 X-GNOME-Bugzilla-Bugzilla=GNOME
260 X-GNOME-Bugzilla-Product=gnome-control-center
261 X-GNOME-Bugzilla-Component=sound
262-Index: gnome-control-center-3.6.2/panels/universal-access/cc-ua-panel.c
263+Index: gnome-control-center-3.6.3/panels/universal-access/cc-ua-panel.c
264 ===================================================================
265---- gnome-control-center-3.6.2.orig/panels/universal-access/cc-ua-panel.c 2012-11-13 16:25:40.341717994 +0100
266-+++ gnome-control-center-3.6.2/panels/universal-access/cc-ua-panel.c 2012-11-13 16:25:40.897717987 +0100
267+--- gnome-control-center-3.6.3.orig/panels/universal-access/cc-ua-panel.c 2012-12-07 14:27:22.997580116 +0100
268++++ gnome-control-center-3.6.3/panels/universal-access/cc-ua-panel.c 2012-12-07 14:27:28.313580037 +0100
269 @@ -492,7 +492,10 @@
270 CcShell *shell;
271
272@@ -3288,11 +3308,11 @@
273
274 return TRUE;
275 }
276-Index: gnome-control-center-3.6.2/shell/gnome-control-center.c
277+Index: gnome-control-center-3.6.3/shell/gnome-control-center.c
278 ===================================================================
279---- gnome-control-center-3.6.2.orig/shell/gnome-control-center.c 2012-11-13 16:25:40.669717988 +0100
280-+++ gnome-control-center-3.6.2/shell/gnome-control-center.c 2012-11-13 16:25:40.897717987 +0100
281-@@ -984,6 +984,10 @@
282+--- gnome-control-center-3.6.3.orig/shell/gnome-control-center.c 2012-12-07 14:27:22.997580116 +0100
283++++ gnome-control-center-3.6.3/shell/gnome-control-center.c 2012-12-07 14:27:28.313580037 +0100
284+@@ -1000,6 +1000,10 @@
285
286 g_clear_pointer (&priv->current_panel_id, g_free);
287

Subscribers

People subscribed via source and target branches