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

Subscribers

People subscribed via source and target branches