Merge lp:~themuso/network-manager-applet/set-atk-label-relations into lp:~network-manager/network-manager-applet/ubuntu

Proposed by Luke Yelavich on 2014-02-10
Status: Merged
Merged at revision: 433
Proposed branch: lp:~themuso/network-manager-applet/set-atk-label-relations
Merge into: lp:~network-manager/network-manager-applet/ubuntu
Diff against target: 430 lines (+410/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/series (+1/-0)
debian/patches/set_atk_relations.patch (+402/-0)
To merge this branch: bzr merge lp:~themuso/network-manager-applet/set-atk-label-relations
Reviewer Review Type Date Requested Status
Network-manager 2014-02-10 Pending
Review via email: mp+205514@code.launchpad.net
To post a comment you must log in.
Marius B. Kotsbak (mariusko) wrote :

Has this patch been sent upstream?

Luke Yelavich (themuso) wrote :

On Mon, Feb 10, 2014 at 09:18:39PM EST, Marius B. Kotsbak wrote:
> Has this patch been sent upstream?

Not as yet, as I need to port it to the latest upstream code, given git master uses GTK grid, and not GTK table.

430. By Luke Yelavich on 2014-03-10

Merge with trunk.

Luke Yelavich (themuso) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2014-03-05 19:16:49 +0000
3+++ debian/changelog 2014-03-10 06:10:45 +0000
4@@ -1,3 +1,10 @@
5+network-manager-applet (0.9.8.8-0ubuntu2) UNRELEASED; urgency=medium
6+
7+ * debian/patches/set_atk_relations.patch: Set label relationships in info
8+ dialogs to better present information to Orca users. (LP: #1266302)
9+
10+ -- Luke Yelavich <themuso@ubuntu.com> Mon, 10 Mar 2014 16:57:08 +1100
11+
12 network-manager-applet (0.9.8.8-0ubuntu1) trusty; urgency=medium
13
14 * New upstream release. (LP: #1276082)
15
16=== modified file 'debian/patches/series'
17--- debian/patches/series 2014-02-19 17:30:54 +0000
18+++ debian/patches/series 2014-03-10 06:10:45 +0000
19@@ -17,3 +17,4 @@
20 lp1048520_delay_pin_dialog_in_greeter.patch
21 rebuild_menu_after_init.patch
22 0001_Move_on_with_enter_in_the_country_page_of_the_new_mobile_wizard.patch
23+set_atk_relations.patch
24
25=== added file 'debian/patches/set_atk_relations.patch'
26--- debian/patches/set_atk_relations.patch 1970-01-01 00:00:00 +0000
27+++ debian/patches/set_atk_relations.patch 2014-03-10 06:10:45 +0000
28@@ -0,0 +1,402 @@
29+Index: set-atk-label-relations/src/applet-dialogs.c
30+===================================================================
31+--- set-atk-label-relations.orig/src/applet-dialogs.c 2014-02-07 17:56:44.471316676 +1100
32++++ set-atk-label-relations/src/applet-dialogs.c 2014-02-07 17:59:46.947321348 +1100
33+@@ -397,6 +397,10 @@
34+ GtkWidget* speed_label, *sec_label = NULL;
35+ const GSList *addresses;
36+ gboolean show_security = FALSE;
37++ GtkWidget *desc_widget = NULL;
38++ GtkWidget *data_widget = NULL;
39++ AtkObject *desc_object = NULL;
40++ AtkObject *data_object = NULL;
41+
42+ table = GTK_TABLE (gtk_table_new (12, 2, FALSE));
43+ gtk_table_set_col_spacings (table, 12);
44+@@ -432,9 +436,15 @@
45+ 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
46+ row++;
47+
48+- gtk_table_attach (table, create_info_label (_("Interface:"), FALSE),
49++ desc_widget = create_info_label (_("Interface:"), FALSE);
50++ desc_object = gtk_widget_get_accessible (desc_widget);
51++ data_widget = create_info_label (str, TRUE);
52++ data_object = gtk_widget_get_accessible (data_widget);
53++ atk_object_add_relationship (desc_object, ATK_RELATION_LABEL_FOR, data_object);
54++
55++ gtk_table_attach (table, desc_widget,
56+ 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
57+- gtk_table_attach (table, create_info_label (str, TRUE),
58++ gtk_table_attach (table, data_widget,
59+ 1, 2, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
60+ g_free (str);
61+ row++;
62+@@ -448,17 +458,33 @@
63+ else if (NM_IS_DEVICE_WIMAX (device))
64+ str = g_strdup (nm_device_wimax_get_hw_address (NM_DEVICE_WIMAX (device)));
65+
66+- gtk_table_attach (table, create_info_label (_("Hardware Address:"), FALSE),
67++ desc_widget = create_info_label (_("Hardware Address:"), FALSE);
68++ desc_object = gtk_widget_get_accessible (desc_widget);
69++ data_widget = create_info_label (str, TRUE);
70++ data_object = gtk_widget_get_accessible (data_widget);
71++ atk_object_add_relationship (desc_object, ATK_RELATION_LABEL_FOR, data_object);
72++
73++ gtk_table_attach (table, desc_widget,
74+ 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
75+- gtk_table_attach (table, create_info_label (str, TRUE),
76++ gtk_table_attach (table, data_widget,
77+ 1, 2, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
78+ g_free (str);
79++ desc_widget = NULL;
80++ desc_object = NULL;
81++ data_widget = NULL;
82++ data_object = NULL;
83+ row++;
84+
85+ /* Driver */
86+- gtk_table_attach (table, create_info_label (_("Driver:"), FALSE),
87++ desc_widget = create_info_label (_("Driver:"), FALSE);
88++ desc_object = gtk_widget_get_accessible (desc_widget);
89++ data_object = create_info_label (nm_device_get_driver (device), TRUE);
90++ data_object = gtk_widget_get_accessible (data_widget);
91++ atk_object_add_relationship (desc_object, ATK_RELATION_LABEL_FOR, data_object);
92++
93++ gtk_table_attach (table, desc_widget,
94+ 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
95+- gtk_table_attach (table, create_info_label (nm_device_get_driver (device), TRUE),
96++ gtk_table_attach (table, data_widget,
97+ 1, 2, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
98+ row++;
99+
100+@@ -485,20 +511,36 @@
101+ gtk_label_set_text (GTK_LABEL(speed_label), str ? str : C_("Speed", "Unknown"));
102+ g_free (str);
103+
104+- gtk_table_attach (table, create_info_label (_("Speed:"), FALSE),
105++ desc_widget = create_info_label (_("Speed:"), FALSE);
106++ desc_object = gtk_widget_get_accessible (desc_widget);
107++ data_object = gtk_widget_get_accessible (speed_label);
108++ atk_object_add_relationship (desc_object, ATK_RELATION_LABEL_FOR, data_object);
109++
110++ gtk_table_attach (table, desc_widget,
111+ 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
112+ gtk_table_attach (table, speed_label,
113+ 1, 2, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
114++ desc_widget = NULL;
115++ desc_object = NULL;
116++ data_object = NULL;
117+ row++;
118+
119+ /* Security */
120+ if (show_security) {
121+ sec_label = create_info_label_security (connection);
122+ if (sec_label) {
123+- gtk_table_attach (table, create_info_label (_("Security:"), FALSE),
124++ desc_widget = create_info_label (_("Security:"), FALSE);
125++ desc_object = gtk_widget_get_accessible (desc_widget);
126++ data_object = gtk_widget_get_accessible (sec_label);
127++ atk_object_add_relationship (desc_object, ATK_RELATION_LABEL_FOR, data_object);
128++
129++ gtk_table_attach (table, desc_widget,
130+ 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
131+ gtk_table_attach (table, sec_label,
132+ 1, 2, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
133++ desc_widget = NULL;
134++ desc_object = NULL;
135++ data_object = NULL;
136+ row++;
137+ }
138+ }
139+@@ -508,7 +550,12 @@
140+
141+ /* CINR */
142+ cinr_label = create_info_label ("", TRUE);
143+- gtk_table_attach (table, create_info_label (_("CINR:"), FALSE),
144++ desc_widget = create_info_label (_("CINR:"), FALSE);
145++ desc_object = gtk_widget_get_accessible (desc_widget);
146++ data_object = gtk_widget_get_accessible (cinr_label);
147++ atk_object_add_relationship (desc_object, ATK_RELATION_LABEL_FOR, data_object);
148++
149++ gtk_table_attach (table, desc_widget,
150+ 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
151+ gtk_table_attach (table, cinr_label,
152+ 1, 2, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
153+@@ -517,11 +564,19 @@
154+ "notify::" NM_DEVICE_WIMAX_CINR,
155+ G_CALLBACK (wimax_cinr_changed_cb));
156+ wimax_cinr_changed_cb (device, NULL, cinr_label);
157++ desc_widget = NULL;
158++ desc_object = NULL;
159++ data_object = NULL;
160+ row++;
161+
162+ /* Base Station ID */
163+ bsid_label = create_info_label ("", TRUE);
164+- gtk_table_attach (table, create_info_label (_("BSID:"), FALSE),
165++ desc_widget = create_info_label (_("BSID:"), FALSE);
166++ desc_object = gtk_widget_get_accessible (desc_widget);
167++ data_object = gtk_widget_get_accessible (bsid_label);
168++ atk_object_add_relationship (desc_object, ATK_RELATION_LABEL_FOR, data_object);
169++
170++ gtk_table_attach (table, desc_widget,
171+ 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
172+ gtk_table_attach (table, bsid_label,
173+ 1, 2, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
174+@@ -530,6 +585,9 @@
175+ "notify::" NM_DEVICE_WIMAX_BSID,
176+ G_CALLBACK (wimax_bsid_changed_cb));
177+ wimax_bsid_changed_cb (device, NULL, bsid_label);
178++ desc_widget = NULL;
179++ desc_object = NULL;
180++ data_object = NULL;
181+ row++;
182+ }
183+
184+@@ -549,12 +607,22 @@
185+ def_addr = addresses->data;
186+
187+ /* Address */
188+- gtk_table_attach (table, create_info_label (_("IP Address:"), FALSE),
189+- 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
190+ str = def_addr ? ip4_address_as_string (nm_ip4_address_get_address (def_addr)) : g_strdup (C_("Address", "Unknown"));
191+- gtk_table_attach (table, create_info_label (str, TRUE),
192++ desc_widget = create_info_label (_("IP Address:"), FALSE);
193++ desc_object = gtk_widget_get_accessible (desc_widget);
194++ data_widget = create_info_label (str, TRUE);
195++ data_object = gtk_widget_get_accessible (data_widget);
196++ atk_object_add_relationship (desc_object, ATK_RELATION_LABEL_FOR, data_object);
197++
198++ gtk_table_attach (table, desc_widget,
199++ 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
200++ gtk_table_attach (table, data_widget,
201+ 1, 2, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
202+ g_free (str);
203++ desc_widget = NULL;
204++ desc_object = NULL;
205++ data_widget = NULL;
206++ data_object = NULL;
207+ row++;
208+
209+ /* Broadcast */
210+@@ -565,62 +633,122 @@
211+ bcast = htonl (network | hostmask);
212+ }
213+
214+- gtk_table_attach (table, create_info_label (_("Broadcast Address:"), FALSE),
215+- 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
216+ str = def_addr ? ip4_address_as_string (bcast) : g_strdup (C_("Address", "Unknown"));
217+- gtk_table_attach (table, create_info_label (str, TRUE),
218++ desc_widget = create_info_label (_("Broadcast Address:"), FALSE);
219++ desc_object = gtk_widget_get_accessible (desc_widget);
220++ data_widget = create_info_label (str, TRUE);
221++ data_object = gtk_widget_get_accessible (data_widget);
222++ atk_object_add_relationship (desc_object, ATK_RELATION_LABEL_FOR, data_object);
223++
224++ gtk_table_attach (table, desc_widget,
225++ 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
226++ gtk_table_attach (table, data_widget,
227+ 1, 2, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
228+ g_free (str);
229++ desc_widget = NULL;
230++ desc_object = NULL;
231++ data_widget = NULL;
232++ data_object = NULL;
233+ row++;
234+
235+ /* Prefix */
236+- gtk_table_attach (table, create_info_label (_("Subnet Mask:"), FALSE),
237+- 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
238+ str = def_addr ? ip4_address_as_string (netmask) : g_strdup (C_("Subnet Mask", "Unknown"));
239+- gtk_table_attach (table, create_info_label (str, TRUE),
240++ desc_widget = create_info_label (_("Subnet Mask:"), FALSE);
241++ desc_object = gtk_widget_get_accessible (desc_widget);
242++ data_widget = create_info_label (str, TRUE);
243++ data_object = gtk_widget_get_accessible (data_widget);
244++ atk_object_add_relationship (desc_object, ATK_RELATION_LABEL_FOR, data_object);
245++
246++ gtk_table_attach (table, desc_widget,
247++ 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);;
248++ gtk_table_attach (table, data_widget,
249+ 1, 2, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
250+ g_free (str);
251++ desc_widget = NULL;
252++ desc_object = NULL;
253++ data_widget = NULL;
254++ data_object = NULL;
255+ row++;
256+
257+ /* Gateway */
258+ if (def_addr && nm_ip4_address_get_gateway (def_addr)) {
259+- gtk_table_attach (table, create_info_label (_("Default Route:"), FALSE),
260+- 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
261+ str = ip4_address_as_string (nm_ip4_address_get_gateway (def_addr));
262+- gtk_table_attach (table, create_info_label (str, TRUE),
263++ desc_widget = create_info_label (_("Default Route:"), FALSE);
264++ desc_object = gtk_widget_get_accessible (desc_widget);
265++ data_widget = create_info_label (str, TRUE);
266++ data_object = gtk_widget_get_accessible (data_widget);
267++ atk_object_add_relationship (desc_object, ATK_RELATION_LABEL_FOR, data_object);
268++
269++ gtk_table_attach (table, desc_widget,
270++ 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
271++ gtk_table_attach (table, data_widget,
272+ 1, 2, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
273+ g_free (str);
274++ desc_widget = NULL;
275++ desc_object = NULL;
276++ data_widget = NULL;
277++ data_object = NULL;
278+ row++;
279+ }
280+
281+ /* DNS */
282+ dns = def_addr ? nm_ip4_config_get_nameservers (ip4_config) : NULL;
283+ if (dns && dns->len) {
284+- gtk_table_attach (table, create_info_label (_("Primary DNS:"), FALSE),
285+- 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
286+ str = ip4_address_as_string (g_array_index (dns, guint32, 0));
287+- gtk_table_attach (table, create_info_label (str, TRUE),
288++ desc_widget = create_info_label (_("Primary DNS:"), FALSE);
289++ desc_object = gtk_widget_get_accessible (desc_widget);
290++ data_widget = create_info_label (str, TRUE);
291++ data_object = gtk_widget_get_accessible (data_widget);
292++ atk_object_add_relationship (desc_object, ATK_RELATION_LABEL_FOR, data_object);
293++
294++ gtk_table_attach (table, desc_widget,
295++ 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
296++ gtk_table_attach (table, data_widget,
297+ 1, 2, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
298+ g_free (str);
299++ desc_widget = NULL;
300++ desc_object = NULL;
301++ data_widget = NULL;
302++ data_object = NULL;
303+ row++;
304+
305+ if (dns->len > 1) {
306+- gtk_table_attach (table, create_info_label (_("Secondary DNS:"), FALSE),
307+- 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
308+ str = ip4_address_as_string (g_array_index (dns, guint32, 1));
309+- gtk_table_attach (table, create_info_label (str, TRUE),
310++ desc_widget = create_info_label (_("Secondary DNS:"), FALSE);
311++ desc_object = gtk_widget_get_accessible (desc_widget);
312++ data_widget = create_info_label (str, TRUE);
313++ data_object = gtk_widget_get_accessible (data_widget);
314++ atk_object_add_relationship (desc_object, ATK_RELATION_LABEL_FOR, data_object);
315++
316++ gtk_table_attach (table, desc_widget,
317++ 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
318++ gtk_table_attach (table, data_widget,
319+ 1, 2, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
320+ g_free (str);
321++ desc_widget = NULL;
322++ desc_object = NULL;
323++ data_widget = NULL;
324++ data_object = NULL;
325+ row++;
326+ }
327+
328+ if (dns->len > 2) {
329+- gtk_table_attach (table, create_info_label (_("Ternary DNS:"), FALSE),
330+- 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
331+ str = ip4_address_as_string (g_array_index (dns, guint32, 2));
332+- gtk_table_attach (table, create_info_label (str, TRUE),
333++ desc_widget = create_info_label (_("Ternary DNS:"), FALSE);
334++ desc_object = gtk_widget_get_accessible (desc_widget);
335++ data_widget = create_info_label (str, TRUE);
336++ data_object = gtk_widget_get_accessible (data_widget);
337++ atk_object_add_relationship (desc_object, ATK_RELATION_LABEL_FOR, data_object);
338++
339++ gtk_table_attach (table, desc_widget,
340++ 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
341++ gtk_table_attach (table, data_widget,
342+ 1, 2, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
343+ g_free (str);
344++ desc_widget = NULL;
345++ desc_object = NULL;
346++ data_widget = NULL;
347++ data_object = NULL;
348+ row++;
349+ }
350+ }
351+@@ -656,27 +784,47 @@
352+ char *tmp_addr;
353+ guint32 prefix;
354+
355+- gtk_table_attach (table, create_info_label (_("IP Address:"), FALSE),
356+- 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
357+ tmp_addr = ip6_address_as_string (nm_ip6_address_get_address (def6_addr));
358+ prefix = nm_ip6_address_get_prefix (def6_addr);
359+ str = g_strdup_printf ("%s/%d", tmp_addr, prefix);
360+ g_free (tmp_addr);
361+
362+- gtk_table_attach (table, create_info_label (str, TRUE),
363++ desc_widget = create_info_label (_("IP Address:"), FALSE);
364++ desc_object = gtk_widget_get_accessible (desc_widget);
365++ data_widget = create_info_label (str, TRUE);
366++ data_object = gtk_widget_get_accessible (data_widget);
367++ atk_object_add_relationship (desc_object, ATK_RELATION_LABEL_FOR, data_object);
368++
369++ gtk_table_attach (table, desc_widget,
370++ 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
371++ gtk_table_attach (table, data_widget,
372+ 1, 2, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
373+ g_free (str);
374++ desc_widget = NULL;
375++ desc_object = NULL;
376++ data_widget = NULL;
377++ data_object = NULL;
378+ row++;
379+ }
380+
381+ /* Gateway */
382+ if (def6_addr && nm_ip6_address_get_gateway (def6_addr)) {
383+- gtk_table_attach (table, create_info_label (_("Default Route:"), FALSE),
384+- 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
385+ str = ip6_address_as_string (nm_ip6_address_get_gateway (def6_addr));
386+- gtk_table_attach (table, create_info_label (str, TRUE),
387++ desc_widget = create_info_label (_("Default Route:"), FALSE);
388++ desc_object = gtk_widget_get_accessible (desc_widget);
389++ data_widget = create_info_label (str, TRUE);
390++ data_object = gtk_widget_get_accessible (data_widget);
391++ atk_object_add_relationship (desc_object, ATK_RELATION_LABEL_FOR, data_object);
392++
393++ gtk_table_attach (table, desc_widget,
394++ 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
395++ gtk_table_attach (table, data_widget,
396+ 1, 2, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
397+ g_free (str);
398++ desc_widget = NULL;
399++ data_widget = NULL;
400++ desc_object = NULL;
401++ data_object = NULL;
402+ row++;
403+ }
404+
405+@@ -685,13 +833,22 @@
406+
407+ for (i = 0; dns6 && i < 3 ; dns6 = g_slist_next (dns6), i++) {
408+ char *label[] = { "Primary DNS:", "Secondary DNS:", "Ternary DNS:" };
409++ str = ip6_address_as_string (dns6->data);
410++ desc_widget = create_info_label (_(label[i]), FALSE);
411++ desc_object = gtk_widget_get_accessible (desc_widget);
412++ data_widget = create_info_label (str, TRUE);
413++ data_object = gtk_widget_get_accessible (data_widget);
414++ atk_object_add_relationship (desc_object, ATK_RELATION_LABEL_FOR, data_object);
415+
416+- gtk_table_attach (table, create_info_label (_(label[i]), FALSE),
417++ gtk_table_attach (table, desc_widget,
418+ 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
419+- str = ip6_address_as_string (dns6->data);
420+- gtk_table_attach (table, create_info_label (str, TRUE),
421++ gtk_table_attach (table, data_widget,
422+ 1, 2, row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
423+ g_free (str);
424++ desc_widget = NULL;
425++ data_widget = NULL;
426++ desc_object = NULL;
427++ data_object = NULL;
428+ row++;
429+ }
430+

Subscribers

People subscribed via source and target branches