Merge lp:~achiang/network-manager-applet/precise-lp780602 into lp:~network-manager/network-manager-applet/ubuntu.precise
- precise-lp780602
- Merge into ubuntu.precise
Proposed by
Alex Chiang
Status: | Merged |
---|---|
Approved by: | Mathieu Trudel-Lapierre |
Approved revision: | 340 |
Merged at revision: | 337 |
Proposed branch: | lp:~achiang/network-manager-applet/precise-lp780602 |
Merge into: | lp:~network-manager/network-manager-applet/ubuntu.precise |
Diff against target: |
1668 lines (+606/-160) 5 files modified
debian/changelog (+13/-0) debian/patches/git_fix_some_leaks_80ef61b.patch (+336/-0) debian/patches/git_mac_addr_string_leakage_6dae878.patch (+94/-0) debian/patches/nm-applet-use-indicator.patch (+161/-160) debian/patches/series (+2/-0) |
To merge this branch: | bzr merge lp:~achiang/network-manager-applet/precise-lp780602 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mathieu Trudel-Lapierre | Approve | ||
Review via email: mp+135586@code.launchpad.net |
Commit message
Description of the change
Backport several memory leaks from trunk that were fixed in 12.10 in the hopes that they fix LP: #780602
Packages built fine, and installed fine on my 12.04 amd64 laptop.
Currently doing a valgrind run to verify that things are better, but since these patches have been shipped for a long time, I think these are pretty safe.
To post a comment you must log in.
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote : | # |
review:
Needs Fixing
- 340. By Alex Chiang
-
Fix version string.
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote : | # |
Already did merge and upload this : approve.
review:
Approve
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 2012-04-05 19:07:45 +0000 |
3 | +++ debian/changelog 2012-11-23 16:30:42 +0000 |
4 | @@ -1,3 +1,16 @@ |
5 | +network-manager-applet (0.9.4.1-0ubuntu2.1) UNRELEASED; urgency=low |
6 | + |
7 | + * Backport r355, r364, r368 from trunk (LP: #780602) |
8 | + - debian/patches/nm-applet-use-indicator.patch: Plug two small leaks. |
9 | + - debian/patches/git_fix_some_leaks_80ef61b.patch: cherry-picked patch to |
10 | + fix a few leaks: g_object_get() and gtk_tree_model_get() copy/ref the |
11 | + values they return, so make sure to deal with that everywhere. |
12 | + - debian/patches/git_mac_addr_string_leakage_6dae878.patch: use |
13 | + nm_utils_hwaddr_ntoa() to output MAC addresses as strings since it's |
14 | + available and make sure they get freed to avoid leaks. |
15 | + |
16 | + -- Alex Chiang <achiang@canonical.com> Wed, 21 Nov 2012 16:24:21 -0800 |
17 | + |
18 | network-manager-applet (0.9.4.1-0ubuntu2) precise; urgency=low |
19 | |
20 | * debian/patches/nm-applet-use-indicator.patch: move the tooltip/accessible |
21 | |
22 | === added file 'debian/patches/git_fix_some_leaks_80ef61b.patch' |
23 | --- debian/patches/git_fix_some_leaks_80ef61b.patch 1970-01-01 00:00:00 +0000 |
24 | +++ debian/patches/git_fix_some_leaks_80ef61b.patch 2012-11-23 16:30:42 +0000 |
25 | @@ -0,0 +1,336 @@ |
26 | +From 80ef61b967d33e398b0637ebfb5a0dae06ddd379 Mon Sep 17 00:00:00 2001 |
27 | +From: Dan Winship <danw@gnome.org> |
28 | +Date: Thu, 15 Mar 2012 14:25:46 +0000 |
29 | +Subject: Fix some leaks |
30 | + |
31 | +g_object_get() and gtk_tree_model_get() copy/ref the values they |
32 | +return, so make sure to deal with that everywhere. |
33 | + |
34 | +https://bugzilla.gnome.org/show_bug.cgi?id=679723 |
35 | +--- |
36 | +diff --git a/src/connection-editor/nm-connection-list.c b/src/connection-editor/nm-connection-list.c |
37 | +index 455334d..09e84ea 100644 |
38 | +--- a/src/connection-editor/nm-connection-list.c |
39 | ++++ b/src/connection-editor/nm-connection-list.c |
40 | +@@ -127,6 +127,12 @@ get_active_connection (GtkTreeView *treeview) |
41 | + g_list_foreach (selected_rows, (GFunc) gtk_tree_path_free, NULL); |
42 | + g_list_free (selected_rows); |
43 | + |
44 | ++ /* gtk_tree_model_get() will have reffed connection, but we don't |
45 | ++ * need that since we know the model will continue to hold a ref. |
46 | ++ */ |
47 | ++ if (connection) |
48 | ++ g_object_unref (connection); |
49 | ++ |
50 | + return connection; |
51 | + } |
52 | + |
53 | +@@ -198,9 +204,9 @@ get_iter_for_connection (GtkTreeModel *model, |
54 | + if (candidate && (candidate == connection)) { |
55 | + *iter = temp_iter; |
56 | + found = TRUE; |
57 | +- break; |
58 | + } |
59 | +- } while (gtk_tree_model_iter_next (model, &temp_iter)); |
60 | ++ g_object_unref (candidate); |
61 | ++ } while (!found && gtk_tree_model_iter_next (model, &temp_iter)); |
62 | + |
63 | + return found; |
64 | + } |
65 | +diff --git a/src/connection-editor/page-wireless-security.c b/src/connection-editor/page-wireless-security.c |
66 | +index 346a52a..09a6744 100644 |
67 | +--- a/src/connection-editor/page-wireless-security.c |
68 | ++++ b/src/connection-editor/page-wireless-security.c |
69 | +@@ -504,6 +504,8 @@ validate (CEPage *page, NMConnection *connection, GError **error) |
70 | + valid = FALSE; |
71 | + } |
72 | + } |
73 | ++ |
74 | ++ wireless_security_unref (sec); |
75 | + } else { |
76 | + /* No security, unencrypted */ |
77 | + g_object_set (s_wireless, NM_SETTING_WIRELESS_SEC, NULL, NULL); |
78 | +@@ -519,9 +521,14 @@ static GtkWidget * |
79 | + nag_user (CEPage *page) |
80 | + { |
81 | + WirelessSecurity *sec; |
82 | ++ GtkWidget *nag = NULL; |
83 | + |
84 | + sec = wireless_security_combo_get_active (CE_PAGE_WIRELESS_SECURITY (page)); |
85 | +- return sec ? wireless_security_nag_user (sec) : NULL; |
86 | ++ if (sec) { |
87 | ++ nag = wireless_security_nag_user (sec); |
88 | ++ wireless_security_unref (sec); |
89 | ++ } |
90 | ++ return nag; |
91 | + } |
92 | + |
93 | + static void |
94 | +diff --git a/src/connection-editor/page-wireless.c b/src/connection-editor/page-wireless.c |
95 | +index 886f175..3b1b57e 100644 |
96 | +--- a/src/connection-editor/page-wireless.c |
97 | ++++ b/src/connection-editor/page-wireless.c |
98 | +@@ -285,9 +285,9 @@ populate_ui (CEPageWireless *self) |
99 | + { |
100 | + CEPageWirelessPrivate *priv = CE_PAGE_WIRELESS_GET_PRIVATE (self); |
101 | + NMSettingWireless *setting = priv->setting; |
102 | +- const GByteArray *ssid = NULL; |
103 | +- const char *mode = NULL; |
104 | +- const char *band = NULL; |
105 | ++ GByteArray *ssid = NULL; |
106 | ++ char *mode = NULL; |
107 | ++ char *band = NULL; |
108 | + int band_idx = 0; |
109 | + int rate_def; |
110 | + int tx_power_def; |
111 | +@@ -330,6 +330,7 @@ populate_ui (CEPageWireless *self) |
112 | + gtk_entry_set_text (priv->ssid, utf8_ssid); |
113 | + g_signal_connect_swapped (priv->ssid, "changed", G_CALLBACK (ce_page_changed), self); |
114 | + g_free (utf8_ssid); |
115 | ++ g_byte_array_unref (ssid); |
116 | + |
117 | + /* Default to Infrastructure */ |
118 | + gtk_combo_box_set_active (priv->mode, 0); |
119 | +@@ -337,6 +338,7 @@ populate_ui (CEPageWireless *self) |
120 | + gtk_combo_box_set_active (priv->mode, 1); |
121 | + mode_combo_changed_cb (priv->mode, self); |
122 | + g_signal_connect (priv->mode, "changed", G_CALLBACK (mode_combo_changed_cb), self); |
123 | ++ g_free (mode); |
124 | + |
125 | + g_signal_connect (priv->channel, "output", |
126 | + G_CALLBACK (channel_spin_output_cb), |
127 | +@@ -354,6 +356,7 @@ populate_ui (CEPageWireless *self) |
128 | + band_idx = 2; |
129 | + gtk_widget_set_sensitive (GTK_WIDGET (priv->channel), TRUE); |
130 | + } |
131 | ++ g_free (band); |
132 | + } |
133 | + |
134 | + gtk_combo_box_set_active (priv->band, band_idx); |
135 | +diff --git a/src/connection-editor/vpn-helpers.c b/src/connection-editor/vpn-helpers.c |
136 | +index 12547fe..55ef432 100644 |
137 | +--- a/src/connection-editor/vpn-helpers.c |
138 | ++++ b/src/connection-editor/vpn-helpers.c |
139 | +@@ -427,17 +427,22 @@ sort_plugins (gconstpointer a, gconstpointer b) |
140 | + { |
141 | + NMVpnPluginUiInterface *aa = NM_VPN_PLUGIN_UI_INTERFACE (a); |
142 | + NMVpnPluginUiInterface *bb = NM_VPN_PLUGIN_UI_INTERFACE (b); |
143 | +- const char *aa_desc = NULL, *bb_desc = NULL; |
144 | ++ char *aa_desc = NULL, *bb_desc = NULL; |
145 | ++ gint ret; |
146 | + |
147 | + g_object_get (aa, NM_VPN_PLUGIN_UI_INTERFACE_NAME, &aa_desc, NULL); |
148 | + g_object_get (bb, NM_VPN_PLUGIN_UI_INTERFACE_NAME, &bb_desc, NULL); |
149 | + |
150 | + if (!aa_desc) |
151 | +- return -1; |
152 | +- if (!bb_desc) |
153 | +- return 1; |
154 | +- |
155 | +- return strcmp (aa_desc, bb_desc); |
156 | ++ ret = -1; |
157 | ++ else if (!bb_desc) |
158 | ++ ret = 1; |
159 | ++ else |
160 | ++ ret = strcmp (aa_desc, bb_desc); |
161 | ++ |
162 | ++ g_free (aa_desc); |
163 | ++ g_free (bb_desc); |
164 | ++ return ret; |
165 | + } |
166 | + |
167 | + #define COL_PLUGIN_DESC 0 |
168 | +@@ -450,7 +455,7 @@ combo_changed_cb (GtkComboBox *combo, gpointer user_data) |
169 | + GtkTreeModel *model; |
170 | + GtkTreeIter iter; |
171 | + NMVpnPluginUiInterface *plugin = NULL; |
172 | +- const char *desc = NULL; |
173 | ++ char *desc = NULL; |
174 | + char *tmp; |
175 | + |
176 | + if (!gtk_combo_box_get_active_iter (combo, &iter)) |
177 | +@@ -465,12 +470,14 @@ combo_changed_cb (GtkComboBox *combo, gpointer user_data) |
178 | + goto error; |
179 | + |
180 | + g_object_get (G_OBJECT (plugin), NM_VPN_PLUGIN_UI_INTERFACE_DESC, &desc, NULL); |
181 | ++ g_object_unref (plugin); |
182 | + if (!desc) |
183 | + goto error; |
184 | + |
185 | + tmp = g_strdup_printf ("<i>%s</i>", desc); |
186 | + gtk_label_set_markup (label, tmp); |
187 | + g_free (tmp); |
188 | ++ g_free (desc); |
189 | + return; |
190 | + |
191 | + error: |
192 | +@@ -515,13 +522,14 @@ vpn_ask_connection_type (GtkWindow *parent) |
193 | + plugin_list = g_slist_sort (plugin_list, sort_plugins); |
194 | + for (iter = plugin_list; iter; iter = g_slist_next (iter)) { |
195 | + NMVpnPluginUiInterface *plugin = NM_VPN_PLUGIN_UI_INTERFACE (iter->data); |
196 | +- const char *desc; |
197 | ++ char *desc; |
198 | + |
199 | + gtk_list_store_append (GTK_LIST_STORE (model), &tree_iter); |
200 | + g_object_get (plugin, NM_VPN_PLUGIN_UI_INTERFACE_NAME, &desc, NULL); |
201 | + gtk_list_store_set (GTK_LIST_STORE (model), &tree_iter, |
202 | + COL_PLUGIN_DESC, desc, |
203 | + COL_PLUGIN_OBJ, plugin, -1); |
204 | ++ g_free (desc); |
205 | + } |
206 | + |
207 | + combo = GTK_WIDGET (gtk_builder_get_object (builder, "vpn_type_combo")); |
208 | +@@ -540,15 +548,17 @@ vpn_ask_connection_type (GtkWindow *parent) |
209 | + NMVpnPluginUiInterface *plugin = NULL; |
210 | + |
211 | + gtk_tree_model_get (model, &tree_iter, COL_PLUGIN_OBJ, &plugin, -1); |
212 | +- if (plugin) |
213 | ++ if (plugin) { |
214 | + g_object_get (G_OBJECT (plugin), NM_VPN_PLUGIN_UI_INTERFACE_SERVICE, &service_type, NULL); |
215 | ++ g_object_unref (plugin); |
216 | ++ } |
217 | + } |
218 | + |
219 | + out: |
220 | + gtk_widget_destroy (dialog); |
221 | + g_object_unref (builder); |
222 | + if (service_type) |
223 | +- return g_strdup (service_type); |
224 | ++ return service_type; |
225 | + return NULL; |
226 | + } |
227 | + |
228 | +diff --git a/src/libnm-gtk/nm-mobile-wizard.c b/src/libnm-gtk/nm-mobile-wizard.c |
229 | +index 2b91fa9..0966c99 100644 |
230 | +--- a/src/libnm-gtk/nm-mobile-wizard.c |
231 | ++++ b/src/libnm-gtk/nm-mobile-wizard.c |
232 | +@@ -171,6 +171,8 @@ assistant_closed (GtkButton *button, gpointer user_data) |
233 | + |
234 | + (*(self->callback)) (self, FALSE, wiz_method, self->user_data); |
235 | + |
236 | ++ if (provider) |
237 | ++ nmn_mobile_provider_unref (provider); |
238 | + g_free (wiz_method->provider_name); |
239 | + g_free (wiz_method->plan_name); |
240 | + g_free (wiz_method->username); |
241 | +@@ -292,17 +294,20 @@ confirm_prepare (NMAMobileWizard *self) |
242 | + |
243 | + /* Provider */ |
244 | + str = g_string_new (NULL); |
245 | +- if (provider) |
246 | ++ if (provider) { |
247 | + g_string_append (str, provider->name); |
248 | +- else { |
249 | ++ nmn_mobile_provider_unref (provider); |
250 | ++ } else { |
251 | + const char *unlisted_provider; |
252 | + |
253 | + unlisted_provider = gtk_entry_get_text (GTK_ENTRY (self->provider_unlisted_entry)); |
254 | + g_string_append (str, unlisted_provider); |
255 | + } |
256 | + |
257 | +- if (country) |
258 | ++ if (country) { |
259 | + g_string_append_printf (str, ", %s", country); |
260 | ++ g_free (country); |
261 | ++ } |
262 | + gtk_label_set_text (GTK_LABEL (self->confirm_provider), str->str); |
263 | + g_string_free (str, TRUE); |
264 | + |
265 | +@@ -576,6 +581,7 @@ plan_prepare (NMAMobileWizard *self) |
266 | + -1); |
267 | + count++; |
268 | + } |
269 | ++ nmn_mobile_provider_unref (provider); |
270 | + |
271 | + /* Draw the separator */ |
272 | + if (count) |
273 | +diff --git a/src/libnm-gtk/nm-wireless-dialog.c b/src/libnm-gtk/nm-wireless-dialog.c |
274 | +index f17c776..885a1c6 100644 |
275 | +--- a/src/libnm-gtk/nm-wireless-dialog.c |
276 | ++++ b/src/libnm-gtk/nm-wireless-dialog.c |
277 | +@@ -112,25 +112,6 @@ nma_wireless_dialog_get_nag_ignored (NMAWirelessDialog *self) |
278 | + } |
279 | + |
280 | + static void |
281 | +-model_free (GtkTreeModel *model, guint col) |
282 | +-{ |
283 | +- GtkTreeIter iter; |
284 | +- |
285 | +- if (!model) |
286 | +- return; |
287 | +- |
288 | +- if (gtk_tree_model_get_iter_first (model, &iter)) { |
289 | +- do { |
290 | +- char *str; |
291 | +- |
292 | +- gtk_tree_model_get (model, &iter, col, &str, -1); |
293 | +- g_free (str); |
294 | +- } while (gtk_tree_model_iter_next (model, &iter)); |
295 | +- } |
296 | +- g_object_unref (model); |
297 | +-} |
298 | +- |
299 | +-static void |
300 | + size_group_clear (GtkSizeGroup *group) |
301 | + { |
302 | + GSList *iter; |
303 | +@@ -427,7 +408,7 @@ connection_combo_init (NMAWirelessDialog *self, NMConnection *connection) |
304 | + g_return_val_if_fail (priv->connection == NULL, FALSE); |
305 | + |
306 | + /* Clear any old model */ |
307 | +- model_free (priv->connection_model, C_NAME_COLUMN); |
308 | ++ g_object_unref (priv->connection_model); |
309 | + |
310 | + /* New model */ |
311 | + store = gtk_list_store_new (4, G_TYPE_STRING, G_TYPE_OBJECT, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN); |
312 | +@@ -1358,7 +1339,7 @@ GtkWidget * |
313 | + nma_wireless_dialog_nag_user (NMAWirelessDialog *self) |
314 | + { |
315 | + NMAWirelessDialogPrivate *priv; |
316 | +- GtkWidget *combo; |
317 | ++ GtkWidget *combo, *nag; |
318 | + GtkTreeModel *model; |
319 | + GtkTreeIter iter; |
320 | + WirelessSecurity *sec = NULL; |
321 | +@@ -1378,8 +1359,11 @@ nma_wireless_dialog_nag_user (NMAWirelessDialog *self) |
322 | + } |
323 | + |
324 | + gtk_tree_model_get (model, &iter, S_SEC_COLUMN, &sec, -1); |
325 | +- if (sec) |
326 | +- return wireless_security_nag_user (sec); |
327 | ++ if (sec) { |
328 | ++ nag = wireless_security_nag_user (sec); |
329 | ++ wireless_security_unref (sec); |
330 | ++ return nag; |
331 | ++ } |
332 | + |
333 | + return NULL; |
334 | + } |
335 | +@@ -1417,8 +1401,8 @@ dispose (GObject *object) |
336 | + g_object_unref (priv->settings); |
337 | + g_object_unref (priv->builder); |
338 | + |
339 | +- model_free (priv->device_model, D_NAME_COLUMN); |
340 | +- model_free (priv->connection_model, C_NAME_COLUMN); |
341 | ++ g_object_unref (priv->device_model); |
342 | ++ g_object_unref (priv->connection_model); |
343 | + |
344 | + if (priv->group) |
345 | + g_object_unref (priv->group); |
346 | +diff --git a/src/wireless-security/wireless-security.c b/src/wireless-security/wireless-security.c |
347 | +index 00cc637..db51920 100644 |
348 | +--- a/src/wireless-security/wireless-security.c |
349 | ++++ b/src/wireless-security/wireless-security.c |
350 | +@@ -544,6 +544,8 @@ ws_802_1x_nag_user (WirelessSecurity *sec, |
351 | + gtk_tree_model_get (model, &iter, AUTH_METHOD_COLUMN, &eap, -1); |
352 | + g_return_val_if_fail (eap != NULL, NULL); |
353 | + |
354 | +- return eap_method_nag_user (eap); |
355 | ++ widget = eap_method_nag_user (eap); |
356 | ++ eap_method_unref (eap); |
357 | ++ return widget; |
358 | + } |
359 | + |
360 | +-- |
361 | +cgit v0.9.0.2 |
362 | |
363 | === added file 'debian/patches/git_mac_addr_string_leakage_6dae878.patch' |
364 | --- debian/patches/git_mac_addr_string_leakage_6dae878.patch 1970-01-01 00:00:00 +0000 |
365 | +++ debian/patches/git_mac_addr_string_leakage_6dae878.patch 2012-11-23 16:30:42 +0000 |
366 | @@ -0,0 +1,94 @@ |
367 | +From 6dae878bbd1c2d0813f26b38cd6c447e33c903fe Mon Sep 17 00:00:00 2001 |
368 | +From: Jiřà Klimeš <jklimes@redhat.com> |
369 | +Date: Wed, 05 Sep 2012 12:59:26 +0000 |
370 | +Subject: editor: use nm_utils_hwaddr_ntoa() for converting MAC address to string |
371 | + |
372 | +and fix the string leakage. |
373 | +--- |
374 | +diff --git a/src/connection-editor/page-wired.c b/src/connection-editor/page-wired.c |
375 | +index 2d1ad0f..58e13be 100644 |
376 | +--- a/src/connection-editor/page-wired.c |
377 | ++++ b/src/connection-editor/page-wired.c |
378 | +@@ -17,7 +17,7 @@ |
379 | + * with this program; if not, write to the Free Software Foundation, Inc., |
380 | + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
381 | + * |
382 | +- * (C) Copyright 2008 - 2011 Red Hat, Inc. |
383 | ++ * (C) Copyright 2008 - 2012 Red Hat, Inc. |
384 | + */ |
385 | + |
386 | + #include "config.h" |
387 | +@@ -31,6 +31,8 @@ |
388 | + #include <nm-setting-connection.h> |
389 | + #include <nm-setting-wired.h> |
390 | + #include <nm-device-ethernet.h> |
391 | ++#include <nm-utils.h> |
392 | ++#include <net/if_arp.h> /* for ARPHRD_ETHER for MAC utilies */ |
393 | + |
394 | + #include "page-wired.h" |
395 | + |
396 | +@@ -174,11 +176,7 @@ populate_ui (CEPageWired *self) |
397 | + /* Device MAC address */ |
398 | + mac_list = ce_page_get_mac_list (CE_PAGE (self)); |
399 | + s_mac = nm_setting_wired_get_mac_address (setting); |
400 | +- s_mac_str = s_mac ? g_strdup_printf ("%02X:%02X:%02X:%02X:%02X:%02X", |
401 | +- s_mac->data[0], s_mac->data[1], s_mac->data[2], |
402 | +- s_mac->data[3], s_mac->data[4], s_mac->data[5]): |
403 | +- NULL; |
404 | +- |
405 | ++ s_mac_str = s_mac ? nm_utils_hwaddr_ntoa (s_mac->data, ARPHRD_ETHER) : NULL; |
406 | + for (iter = mac_list; iter && *iter; iter++) { |
407 | + #if GTK_CHECK_VERSION (2,24,0) |
408 | + gtk_combo_box_text_append_text (priv->device_mac, *iter); |
409 | +@@ -202,6 +200,7 @@ populate_ui (CEPageWired *self) |
410 | + if (entry) |
411 | + gtk_entry_set_text (GTK_ENTRY (entry), active_mac ? active_mac : s_mac_str); |
412 | + } |
413 | ++ g_free (s_mac_str); |
414 | + g_strfreev (mac_list); |
415 | + g_signal_connect (priv->device_mac, "changed", G_CALLBACK (stuff_changed), self); |
416 | + |
417 | +diff --git a/src/connection-editor/page-wireless.c b/src/connection-editor/page-wireless.c |
418 | +index 886f175..74b48cf 100644 |
419 | +--- a/src/connection-editor/page-wireless.c |
420 | ++++ b/src/connection-editor/page-wireless.c |
421 | +@@ -17,7 +17,7 @@ |
422 | + * with this program; if not, write to the Free Software Foundation, Inc., |
423 | + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
424 | + * |
425 | +- * (C) Copyright 2008 - 2010 Red Hat, Inc. |
426 | ++ * (C) Copyright 2008 - 2012 Red Hat, Inc. |
427 | + */ |
428 | + |
429 | + #include "config.h" |
430 | +@@ -32,6 +32,7 @@ |
431 | + #include <nm-setting-wireless.h> |
432 | + #include <nm-device-wifi.h> |
433 | + #include <nm-utils.h> |
434 | ++#include <net/if_arp.h> /* for ARPHRD_ETHER for MAC utilies */ |
435 | + |
436 | + #include "page-wireless.h" |
437 | + |
438 | +@@ -374,11 +375,7 @@ populate_ui (CEPageWireless *self) |
439 | + /* Device MAC address */ |
440 | + mac_list = ce_page_get_mac_list (CE_PAGE (self)); |
441 | + s_mac = nm_setting_wireless_get_mac_address (setting); |
442 | +- s_mac_str = s_mac ? g_strdup_printf ("%02X:%02X:%02X:%02X:%02X:%02X", |
443 | +- s_mac->data[0], s_mac->data[1], s_mac->data[2], |
444 | +- s_mac->data[3], s_mac->data[4], s_mac->data[5]): |
445 | +- NULL; |
446 | +- |
447 | ++ s_mac_str = s_mac ? nm_utils_hwaddr_ntoa (s_mac->data, ARPHRD_ETHER) : NULL; |
448 | + for (iter = mac_list; iter && *iter; iter++) { |
449 | + #if GTK_CHECK_VERSION (2,24,0) |
450 | + gtk_combo_box_text_append_text (priv->device_mac, *iter); |
451 | +@@ -402,6 +399,7 @@ populate_ui (CEPageWireless *self) |
452 | + if (entry) |
453 | + gtk_entry_set_text (GTK_ENTRY (entry), active_mac ? active_mac : s_mac_str); |
454 | + } |
455 | ++ g_free (s_mac_str); |
456 | + g_strfreev (mac_list); |
457 | + g_signal_connect_swapped (priv->device_mac, "changed", G_CALLBACK (ce_page_changed), self); |
458 | + |
459 | +-- |
460 | +cgit v0.9.0.2 |
461 | |
462 | === modified file 'debian/patches/nm-applet-use-indicator.patch' |
463 | --- debian/patches/nm-applet-use-indicator.patch 2012-04-03 15:31:39 +0000 |
464 | +++ debian/patches/nm-applet-use-indicator.patch 2012-11-23 16:30:42 +0000 |
465 | @@ -25,11 +25,11 @@ |
466 | src/mobile-helpers.h | 11 + |
467 | 14 files changed, 1020 insertions(+), 113 deletions(-) |
468 | |
469 | -Index: b/configure.ac |
470 | +Index: network-manager-applet-0.9.4.1/configure.ac |
471 | =================================================================== |
472 | ---- a/configure.ac |
473 | -+++ b/configure.ac |
474 | -@@ -170,6 +170,14 @@ case "${with_bluetooth}" in |
475 | +--- network-manager-applet-0.9.4.1.orig/configure.ac 2012-03-23 15:55:33.000000000 -0700 |
476 | ++++ network-manager-applet-0.9.4.1/configure.ac 2012-11-21 16:19:09.071734640 -0800 |
477 | +@@ -170,6 +170,14 @@ |
478 | ;; |
479 | esac |
480 | |
481 | @@ -44,11 +44,11 @@ |
482 | AM_CONDITIONAL(HAVE_GBT, test x"$have_gbt" = "xyes") |
483 | |
484 | AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal) |
485 | -Index: b/src/Makefile.am |
486 | +Index: network-manager-applet-0.9.4.1/src/Makefile.am |
487 | =================================================================== |
488 | ---- a/src/Makefile.am |
489 | -+++ b/src/Makefile.am |
490 | -@@ -8,6 +8,7 @@ nm_applet_CPPFLAGS = \ |
491 | +--- network-manager-applet-0.9.4.1.orig/src/Makefile.am 2012-03-13 16:03:59.000000000 -0700 |
492 | ++++ network-manager-applet-0.9.4.1/src/Makefile.am 2012-11-21 16:19:09.071734640 -0800 |
493 | +@@ -8,6 +8,7 @@ |
494 | $(GCONF_CFLAGS) \ |
495 | $(GNOME_KEYRING_CFLAGS) \ |
496 | $(NOTIFY_CFLAGS) \ |
497 | @@ -56,7 +56,7 @@ |
498 | -DICONDIR=\""$(datadir)/icons"\" \ |
499 | -DUIDIR=\""$(uidir)"\" \ |
500 | -DBINDIR=\""$(bindir)"\" \ |
501 | -@@ -68,6 +69,7 @@ nm_applet_LDADD = \ |
502 | +@@ -68,6 +69,7 @@ |
503 | $(GCONF_LIBS) \ |
504 | $(GNOME_KEYRING_LIBS) \ |
505 | $(NOTIFY_LIBS) \ |
506 | @@ -64,11 +64,11 @@ |
507 | ${top_builddir}/src/marshallers/libmarshallers.la \ |
508 | ${top_builddir}/src/utils/libutils.la \ |
509 | ${top_builddir}/src/gconf-helpers/libgconf-helpers.la \ |
510 | -Index: b/src/applet-device-bt.c |
511 | +Index: network-manager-applet-0.9.4.1/src/applet-device-bt.c |
512 | =================================================================== |
513 | ---- a/src/applet-device-bt.c |
514 | -+++ b/src/applet-device-bt.c |
515 | -@@ -154,7 +154,9 @@ bt_add_menu_item (NMDevice *device, |
516 | +--- network-manager-applet-0.9.4.1.orig/src/applet-device-bt.c 2012-03-19 11:39:48.000000000 -0700 |
517 | ++++ network-manager-applet-0.9.4.1/src/applet-device-bt.c 2012-11-21 16:19:09.071734640 -0800 |
518 | +@@ -154,7 +154,9 @@ |
519 | |
520 | item = applet_menu_item_create_device_item_helper (device, applet, text); |
521 | |
522 | @@ -78,7 +78,7 @@ |
523 | gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); |
524 | gtk_widget_show (item); |
525 | |
526 | -@@ -209,15 +211,16 @@ bt_device_state_changed (NMDevice *devic |
527 | +@@ -209,15 +211,16 @@ |
528 | } |
529 | } |
530 | |
531 | @@ -97,7 +97,7 @@ |
532 | const char *id; |
533 | |
534 | id = nm_device_get_iface (NM_DEVICE (device)); |
535 | -@@ -240,14 +243,16 @@ bt_get_icon (NMDevice *device, |
536 | +@@ -240,14 +243,16 @@ |
537 | *tip = g_strdup_printf (_("Requesting a network address for '%s'..."), id); |
538 | break; |
539 | case NM_DEVICE_STATE_ACTIVATED: |
540 | @@ -116,11 +116,11 @@ |
541 | } |
542 | |
543 | typedef struct { |
544 | -Index: b/src/applet-device-cdma.c |
545 | +Index: network-manager-applet-0.9.4.1/src/applet-device-cdma.c |
546 | =================================================================== |
547 | ---- a/src/applet-device-cdma.c |
548 | -+++ b/src/applet-device-cdma.c |
549 | -@@ -327,6 +327,9 @@ cdma_add_menu_item (NMDevice *device, |
550 | +--- network-manager-applet-0.9.4.1.orig/src/applet-device-cdma.c 2012-03-19 07:53:53.000000000 -0700 |
551 | ++++ network-manager-applet-0.9.4.1/src/applet-device-cdma.c 2012-11-21 16:19:09.071734640 -0800 |
552 | +@@ -327,6 +327,9 @@ |
553 | char *text; |
554 | GtkWidget *item; |
555 | GSList *connections, *all, *iter; |
556 | @@ -130,7 +130,7 @@ |
557 | |
558 | info = g_object_get_data (G_OBJECT (device), "devinfo"); |
559 | |
560 | -@@ -348,7 +351,9 @@ cdma_add_menu_item (NMDevice *device, |
561 | +@@ -348,7 +351,9 @@ |
562 | } |
563 | |
564 | item = applet_menu_item_create_device_item_helper (device, applet, text); |
565 | @@ -140,7 +140,7 @@ |
566 | gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); |
567 | gtk_widget_show (item); |
568 | g_free (text); |
569 | -@@ -360,6 +365,7 @@ cdma_add_menu_item (NMDevice *device, |
570 | +@@ -360,6 +365,7 @@ |
571 | s_con = nm_connection_get_setting_connection (active); |
572 | g_assert (s_con); |
573 | |
574 | @@ -148,7 +148,7 @@ |
575 | item = nm_mb_menu_item_new (nm_setting_connection_get_id (s_con), |
576 | info->quality_valid ? info->quality : 0, |
577 | info->provider_name, |
578 | -@@ -368,6 +374,21 @@ cdma_add_menu_item (NMDevice *device, |
579 | +@@ -368,6 +374,21 @@ |
580 | cdma_state_to_mb_state (info), |
581 | info->modem_enabled, |
582 | applet); |
583 | @@ -170,7 +170,7 @@ |
584 | gtk_widget_set_sensitive (GTK_WIDGET (item), TRUE); |
585 | add_connection_item (device, active, item, menu, applet); |
586 | } |
587 | -@@ -381,6 +402,7 @@ cdma_add_menu_item (NMDevice *device, |
588 | +@@ -381,6 +402,7 @@ |
589 | } |
590 | } else { |
591 | /* Otherwise show idle registration state or disabled */ |
592 | @@ -178,7 +178,7 @@ |
593 | item = nm_mb_menu_item_new (NULL, |
594 | info->quality_valid ? info->quality : 0, |
595 | info->provider_name, |
596 | -@@ -389,6 +411,21 @@ cdma_add_menu_item (NMDevice *device, |
597 | +@@ -389,6 +411,21 @@ |
598 | cdma_state_to_mb_state (info), |
599 | info->modem_enabled, |
600 | applet); |
601 | @@ -200,7 +200,7 @@ |
602 | gtk_widget_set_sensitive (GTK_WIDGET (item), FALSE); |
603 | gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); |
604 | } |
605 | -@@ -454,15 +491,16 @@ cdma_device_state_changed (NMDevice *dev |
606 | +@@ -454,15 +491,16 @@ |
607 | check_start_polling (info); |
608 | } |
609 | |
610 | @@ -219,7 +219,7 @@ |
611 | const char *id; |
612 | CdmaDeviceInfo *info; |
613 | gboolean mb_state; |
614 | -@@ -491,11 +529,14 @@ cdma_get_icon (NMDevice *device, |
615 | +@@ -491,11 +529,14 @@ |
616 | break; |
617 | case NM_DEVICE_STATE_ACTIVATED: |
618 | mb_state = cdma_state_to_mb_state (info); |
619 | @@ -235,7 +235,7 @@ |
620 | |
621 | if ((mb_state != MB_STATE_UNKNOWN) && info->quality_valid) { |
622 | gboolean roaming = (mb_state == MB_STATE_ROAMING); |
623 | -@@ -510,8 +551,6 @@ cdma_get_icon (NMDevice *device, |
624 | +@@ -510,8 +551,6 @@ |
625 | default: |
626 | break; |
627 | } |
628 | @@ -244,7 +244,7 @@ |
629 | } |
630 | |
631 | typedef struct { |
632 | -@@ -877,6 +916,9 @@ reg_state_changed_cb (DBusGProxy *proxy, |
633 | +@@ -877,6 +916,9 @@ |
634 | update_registration_state (info, cdma1x_state, evdo_state); |
635 | info->skip_reg_poll = TRUE; |
636 | applet_schedule_update_icon (info->applet); |
637 | @@ -254,10 +254,10 @@ |
638 | } |
639 | |
640 | static void |
641 | -Index: b/src/applet-device-gsm.c |
642 | +Index: network-manager-applet-0.9.4.1/src/applet-device-gsm.c |
643 | =================================================================== |
644 | ---- a/src/applet-device-gsm.c |
645 | -+++ b/src/applet-device-gsm.c |
646 | +--- network-manager-applet-0.9.4.1.orig/src/applet-device-gsm.c 2012-11-21 16:19:08.943734000 -0800 |
647 | ++++ network-manager-applet-0.9.4.1/src/applet-device-gsm.c 2012-11-21 16:19:09.071734640 -0800 |
648 | @@ -42,6 +42,7 @@ |
649 | #include "applet-device-gsm.h" |
650 | #include "utils.h" |
651 | @@ -266,7 +266,7 @@ |
652 | #include "applet-dialogs.h" |
653 | #include "mb-menu-item.h" |
654 | #include "nma-marshal.h" |
655 | -@@ -374,6 +375,9 @@ gsm_add_menu_item (NMDevice *device, |
656 | +@@ -374,6 +375,9 @@ |
657 | char *text; |
658 | GtkWidget *item; |
659 | GSList *connections, *all, *iter; |
660 | @@ -276,7 +276,7 @@ |
661 | |
662 | info = g_object_get_data (G_OBJECT (device), "devinfo"); |
663 | |
664 | -@@ -395,7 +399,9 @@ gsm_add_menu_item (NMDevice *device, |
665 | +@@ -395,7 +399,9 @@ |
666 | } |
667 | |
668 | item = applet_menu_item_create_device_item_helper (device, applet, text); |
669 | @@ -286,7 +286,7 @@ |
670 | gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); |
671 | gtk_widget_show (item); |
672 | g_free (text); |
673 | -@@ -407,6 +413,7 @@ gsm_add_menu_item (NMDevice *device, |
674 | +@@ -407,6 +413,7 @@ |
675 | s_con = nm_connection_get_setting_connection (active); |
676 | g_assert (s_con); |
677 | |
678 | @@ -294,7 +294,7 @@ |
679 | item = nm_mb_menu_item_new (nm_setting_connection_get_id (s_con), |
680 | info->quality_valid ? info->quality : 0, |
681 | info->op_name, |
682 | -@@ -415,6 +422,21 @@ gsm_add_menu_item (NMDevice *device, |
683 | +@@ -415,6 +422,21 @@ |
684 | gsm_state_to_mb_state (info), |
685 | info->modem_enabled, |
686 | applet); |
687 | @@ -316,7 +316,7 @@ |
688 | gtk_widget_set_sensitive (GTK_WIDGET (item), TRUE); |
689 | add_connection_item (device, active, item, menu, applet); |
690 | } |
691 | -@@ -428,6 +450,7 @@ gsm_add_menu_item (NMDevice *device, |
692 | +@@ -428,6 +450,7 @@ |
693 | } |
694 | } else { |
695 | /* Otherwise show idle registration state or disabled */ |
696 | @@ -324,7 +324,7 @@ |
697 | item = nm_mb_menu_item_new (NULL, |
698 | info->quality_valid ? info->quality : 0, |
699 | info->op_name, |
700 | -@@ -436,6 +459,23 @@ gsm_add_menu_item (NMDevice *device, |
701 | +@@ -436,6 +459,23 @@ |
702 | gsm_state_to_mb_state (info), |
703 | info->modem_enabled, |
704 | applet); |
705 | @@ -348,7 +348,7 @@ |
706 | gtk_widget_set_sensitive (GTK_WIDGET (item), FALSE); |
707 | gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); |
708 | } |
709 | -@@ -496,15 +536,16 @@ gsm_device_state_changed (NMDevice *devi |
710 | +@@ -496,15 +536,16 @@ |
711 | check_start_polling (info); |
712 | } |
713 | |
714 | @@ -367,7 +367,7 @@ |
715 | const char *id; |
716 | GsmDeviceInfo *info; |
717 | guint32 mb_state; |
718 | -@@ -533,11 +574,14 @@ gsm_get_icon (NMDevice *device, |
719 | +@@ -533,11 +574,14 @@ |
720 | break; |
721 | case NM_DEVICE_STATE_ACTIVATED: |
722 | mb_state = gsm_state_to_mb_state (info); |
723 | @@ -383,7 +383,7 @@ |
724 | |
725 | if ((mb_state != MB_STATE_UNKNOWN) && info->quality_valid) { |
726 | gboolean roaming = (mb_state == MB_STATE_ROAMING); |
727 | -@@ -552,8 +596,6 @@ gsm_get_icon (NMDevice *device, |
728 | +@@ -552,8 +596,6 @@ |
729 | default: |
730 | break; |
731 | } |
732 | @@ -392,7 +392,7 @@ |
733 | } |
734 | |
735 | typedef struct { |
736 | -@@ -1554,6 +1596,10 @@ reg_info_changed_cb (DBusGProxy *proxy, |
737 | +@@ -1554,6 +1596,10 @@ |
738 | g_free (info->op_name); |
739 | info->op_name = parse_op_name (info, op_name, info->op_code); |
740 | info->skip_reg_poll = TRUE; |
741 | @@ -403,10 +403,10 @@ |
742 | } |
743 | |
744 | static void |
745 | -Index: b/src/applet-device-wifi.c |
746 | +Index: network-manager-applet-0.9.4.1/src/applet-device-wifi.c |
747 | =================================================================== |
748 | ---- a/src/applet-device-wifi.c |
749 | -+++ b/src/applet-device-wifi.c |
750 | +--- network-manager-applet-0.9.4.1.orig/src/applet-device-wifi.c 2012-11-21 16:19:08.971734142 -0800 |
751 | ++++ network-manager-applet-0.9.4.1/src/applet-device-wifi.c 2012-11-21 16:22:11.308638296 -0800 |
752 | @@ -31,6 +31,7 @@ |
753 | |
754 | #include <glib/gi18n.h> |
755 | @@ -415,7 +415,7 @@ |
756 | |
757 | #include <nm-device.h> |
758 | #include <nm-access-point.h> |
759 | -@@ -309,6 +310,135 @@ is_blacklisted_ssid (const GByteArray *s |
760 | +@@ -309,6 +310,135 @@ |
761 | return is_ssid_in_list (ssid, blacklisted_ssids); |
762 | } |
763 | |
764 | @@ -544,14 +544,14 @@ |
765 | +out: |
766 | + atk_object_set_name (gtk_widget_get_accessible (GTK_WIDGET (item)), icon_desc->str); |
767 | + g_free (ssid); |
768 | -+ g_string_free (icon_desc, FALSE); |
769 | ++ g_string_free (icon_desc, TRUE); |
770 | +} |
771 | +#endif |
772 | + |
773 | static void |
774 | clamp_ap_to_bssid (NMAccessPoint *ap, NMSettingWireless *s_wifi) |
775 | { |
776 | -@@ -517,7 +647,11 @@ wireless_menu_item_activate (GtkMenuItem |
777 | +@@ -517,7 +647,11 @@ |
778 | |
779 | struct dup_data { |
780 | NMDevice *device; |
781 | @@ -563,7 +563,7 @@ |
782 | char *hash; |
783 | }; |
784 | |
785 | -@@ -533,19 +667,34 @@ find_duplicate (gpointer d, gpointer use |
786 | +@@ -533,19 +667,34 @@ |
787 | g_return_if_fail (data); |
788 | g_return_if_fail (data->hash); |
789 | |
790 | @@ -598,7 +598,7 @@ |
791 | create_new_ap_item (NMDeviceWifi *device, |
792 | NMAccessPoint *ap, |
793 | struct dup_data *dup_data, |
794 | -@@ -554,7 +703,16 @@ create_new_ap_item (NMDeviceWifi *device |
795 | +@@ -554,7 +703,16 @@ |
796 | { |
797 | WirelessMenuItemInfo *info; |
798 | GSList *iter; |
799 | @@ -615,7 +615,7 @@ |
800 | GSList *dev_connections = NULL; |
801 | GSList *ap_connections = NULL; |
802 | const GByteArray *ssid; |
803 | -@@ -565,18 +723,51 @@ create_new_ap_item (NMDeviceWifi *device |
804 | +@@ -565,18 +723,51 @@ |
805 | g_slist_free (dev_connections); |
806 | dev_connections = NULL; |
807 | |
808 | @@ -669,7 +669,7 @@ |
809 | |
810 | g_object_set_data (G_OBJECT (item), "device", NM_DEVICE (device)); |
811 | |
812 | -@@ -634,7 +825,11 @@ create_new_ap_item (NMDeviceWifi *device |
813 | +@@ -634,7 +825,11 @@ |
814 | return item; |
815 | } |
816 | |
817 | @@ -681,7 +681,7 @@ |
818 | get_menu_item_for_ap (NMDeviceWifi *device, |
819 | NMAccessPoint *ap, |
820 | GSList *connections, |
821 | -@@ -658,14 +853,31 @@ get_menu_item_for_ap (NMDeviceWifi *devi |
822 | +@@ -658,14 +853,32 @@ |
823 | */ |
824 | dup_data.found = NULL; |
825 | dup_data.hash = g_object_get_data (G_OBJECT (ap), "hash"); |
826 | @@ -706,14 +706,15 @@ |
827 | + GSList *dupes = NULL; |
828 | + const char *path; |
829 | + |
830 | -+ dupes = g_object_get_data (G_OBJECT (dup_data.found), "dupes"); |
831 | ++ dupes = g_object_steal_data (G_OBJECT (dup_data.found), "dupes"); |
832 | + path = nm_object_get_path (NM_OBJECT (ap)); |
833 | + dupes = g_slist_prepend (dupes, g_strdup (path)); |
834 | ++ g_object_set_data_full (G_OBJECT (dup_data.found), "dupes", (gpointer) dupes, (GDestroyNotify) clear_dupes_list); |
835 | +#endif |
836 | return NULL; |
837 | } |
838 | |
839 | -@@ -675,6 +887,7 @@ get_menu_item_for_ap (NMDeviceWifi *devi |
840 | +@@ -675,6 +888,7 @@ |
841 | static gint |
842 | sort_by_name (gconstpointer tmpa, gconstpointer tmpb) |
843 | { |
844 | @@ -721,7 +722,7 @@ |
845 | NMNetworkMenuItem *a = NM_NETWORK_MENU_ITEM (tmpa); |
846 | NMNetworkMenuItem *b = NM_NETWORK_MENU_ITEM (tmpb); |
847 | const char *a_ssid, *b_ssid; |
848 | -@@ -711,6 +924,44 @@ sort_by_name (gconstpointer tmpa, gconst |
849 | +@@ -711,6 +925,44 @@ |
850 | return -1; |
851 | |
852 | return 0; |
853 | @@ -766,7 +767,7 @@ |
854 | } |
855 | |
856 | /* Sort menu items for the top-level menu: |
857 | -@@ -722,6 +973,7 @@ sort_by_name (gconstpointer tmpa, gconst |
858 | +@@ -722,6 +974,7 @@ |
859 | static gint |
860 | sort_toplevel (gconstpointer tmpa, gconstpointer tmpb) |
861 | { |
862 | @@ -774,7 +775,7 @@ |
863 | NMNetworkMenuItem *a = NM_NETWORK_MENU_ITEM (tmpa); |
864 | NMNetworkMenuItem *b = NM_NETWORK_MENU_ITEM (tmpb); |
865 | gboolean a_fave, b_fave; |
866 | -@@ -756,6 +1008,42 @@ sort_toplevel (gconstpointer tmpa, gcons |
867 | +@@ -756,6 +1009,42 @@ |
868 | * both are unencrypted) just sort by name. |
869 | */ |
870 | return sort_by_name (a, b); |
871 | @@ -817,7 +818,7 @@ |
872 | } |
873 | |
874 | static void |
875 | -@@ -774,7 +1062,11 @@ wireless_add_menu_item (NMDevice *device |
876 | +@@ -774,7 +1063,11 @@ |
877 | gboolean wireless_enabled = TRUE; |
878 | gboolean wireless_hw_enabled = TRUE; |
879 | GSList *menu_items = NULL; /* All menu items we'll be adding */ |
880 | @@ -829,7 +830,7 @@ |
881 | GtkWidget *widget; |
882 | |
883 | wdev = NM_DEVICE_WIFI (device); |
884 | -@@ -812,7 +1104,9 @@ wireless_add_menu_item (NMDevice *device |
885 | +@@ -812,7 +1105,9 @@ |
886 | if (active_ap) { |
887 | active_item = item = get_menu_item_for_ap (wdev, active_ap, connections, NULL, applet); |
888 | if (item) { |
889 | @@ -839,7 +840,7 @@ |
890 | menu_items = g_slist_append (menu_items, item); |
891 | |
892 | gtk_menu_shell_append (GTK_MENU_SHELL (menu), GTK_WIDGET (item)); |
893 | -@@ -1109,6 +1403,9 @@ access_point_added_cb (NMDeviceWifi *dev |
894 | +@@ -1109,6 +1404,9 @@ |
895 | applet); |
896 | |
897 | queue_avail_access_point_notification (NM_DEVICE (device)); |
898 | @@ -849,7 +850,7 @@ |
899 | } |
900 | |
901 | static void |
902 | -@@ -1126,6 +1423,9 @@ access_point_removed_cb (NMDeviceWifi *d |
903 | +@@ -1126,6 +1424,9 @@ |
904 | if (old == ap) { |
905 | g_object_set_data (G_OBJECT (device), ACTIVE_AP_TAG, NULL); |
906 | applet_schedule_update_icon (applet); |
907 | @@ -859,7 +860,7 @@ |
908 | } |
909 | } |
910 | |
911 | -@@ -1272,16 +1572,17 @@ wireless_device_state_changed (NMDevice |
912 | +@@ -1272,16 +1573,17 @@ |
913 | g_free (esc_ssid); |
914 | } |
915 | |
916 | @@ -879,7 +880,7 @@ |
917 | const char *id; |
918 | char *ssid = NULL; |
919 | |
920 | -@@ -1314,22 +1615,25 @@ wireless_get_icon (NMDevice *device, |
921 | +@@ -1314,22 +1616,25 @@ |
922 | strength = CLAMP (strength, 0, 100); |
923 | |
924 | if (strength > 80) |
925 | @@ -911,7 +912,7 @@ |
926 | *tip = g_strdup_printf (_("Wireless network connection '%s' active"), id); |
927 | } |
928 | break; |
929 | -@@ -1337,7 +1641,8 @@ wireless_get_icon (NMDevice *device, |
930 | +@@ -1337,7 +1642,8 @@ |
931 | break; |
932 | } |
933 | |
934 | @@ -921,11 +922,11 @@ |
935 | } |
936 | |
937 | static gboolean |
938 | -Index: b/src/applet-device-wired.c |
939 | +Index: network-manager-applet-0.9.4.1/src/applet-device-wired.c |
940 | =================================================================== |
941 | ---- a/src/applet-device-wired.c |
942 | -+++ b/src/applet-device-wired.c |
943 | -@@ -221,7 +221,9 @@ wired_add_menu_item (NMDevice *device, |
944 | +--- network-manager-applet-0.9.4.1.orig/src/applet-device-wired.c 2012-11-21 16:19:08.943734000 -0800 |
945 | ++++ network-manager-applet-0.9.4.1/src/applet-device-wired.c 2012-11-21 16:19:09.079734683 -0800 |
946 | +@@ -221,7 +221,9 @@ |
947 | if (nm_device_get_capabilities (device) & NM_DEVICE_CAP_CARRIER_DETECT) |
948 | carrier = nm_device_ethernet_get_carrier (NM_DEVICE_ETHERNET (device)); |
949 | |
950 | @@ -935,7 +936,7 @@ |
951 | gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); |
952 | gtk_widget_show (item); |
953 | |
954 | -@@ -274,15 +276,16 @@ wired_device_state_changed (NMDevice *de |
955 | +@@ -274,15 +276,16 @@ |
956 | } |
957 | } |
958 | |
959 | @@ -954,7 +955,7 @@ |
960 | const char *id; |
961 | |
962 | id = nm_device_get_iface (NM_DEVICE (device)); |
963 | -@@ -305,14 +308,16 @@ wired_get_icon (NMDevice *device, |
964 | +@@ -305,14 +308,16 @@ |
965 | *tip = g_strdup_printf (_("Requesting a wired network address for '%s'..."), id); |
966 | break; |
967 | case NM_DEVICE_STATE_ACTIVATED: |
968 | @@ -973,11 +974,11 @@ |
969 | } |
970 | |
971 | /* PPPoE */ |
972 | -Index: b/src/applet.c |
973 | +Index: network-manager-applet-0.9.4.1/src/applet.c |
974 | =================================================================== |
975 | ---- a/src/applet.c |
976 | -+++ b/src/applet.c |
977 | -@@ -499,6 +499,8 @@ add_and_activate_cb (NMClient *client, |
978 | +--- network-manager-applet-0.9.4.1.orig/src/applet.c 2012-11-21 16:19:09.047734521 -0800 |
979 | ++++ network-manager-applet-0.9.4.1/src/applet.c 2012-11-21 16:19:33.259854586 -0800 |
980 | +@@ -499,6 +499,8 @@ |
981 | GError *error, |
982 | gpointer user_data) |
983 | { |
984 | @@ -986,7 +987,7 @@ |
985 | if (error) { |
986 | const char *text = _("Failed to add/activate connection"); |
987 | char *err_text = g_strdup_printf ("(%d) %s", error->code, |
988 | -@@ -509,7 +511,8 @@ add_and_activate_cb (NMClient *client, |
989 | +@@ -509,7 +511,8 @@ |
990 | g_free (err_text); |
991 | } |
992 | |
993 | @@ -996,7 +997,7 @@ |
994 | } |
995 | |
996 | static void |
997 | -@@ -543,6 +546,8 @@ applet_menu_item_activate_helper_new_con |
998 | +@@ -543,6 +546,8 @@ |
999 | static void |
1000 | disconnect_cb (NMDevice *device, GError *error, gpointer user_data) |
1001 | { |
1002 | @@ -1005,7 +1006,7 @@ |
1003 | if (error) { |
1004 | const char *text = _("Device disconnect failed"); |
1005 | char *err_text = g_strdup_printf ("(%d) %s", error->code, |
1006 | -@@ -552,6 +557,9 @@ disconnect_cb (NMDevice *device, GError |
1007 | +@@ -552,6 +557,9 @@ |
1008 | utils_show_error_dialog (_("Disconnect failure"), text, err_text, FALSE, NULL); |
1009 | g_free (err_text); |
1010 | } |
1011 | @@ -1015,7 +1016,7 @@ |
1012 | } |
1013 | |
1014 | void |
1015 | -@@ -560,7 +568,7 @@ applet_menu_item_disconnect_helper (NMDe |
1016 | +@@ -560,7 +568,7 @@ |
1017 | { |
1018 | g_return_if_fail (NM_IS_DEVICE (device)); |
1019 | |
1020 | @@ -1024,7 +1025,7 @@ |
1021 | } |
1022 | |
1023 | static void |
1024 | -@@ -633,13 +641,15 @@ applet_menu_item_add_complex_separator_h |
1025 | +@@ -633,13 +641,15 @@ |
1026 | const gchar* label, |
1027 | int pos) |
1028 | { |
1029 | @@ -1041,7 +1042,7 @@ |
1030 | |
1031 | if (label) { |
1032 | xlabel = gtk_label_new (NULL); |
1033 | -@@ -663,6 +673,9 @@ applet_menu_item_add_complex_separator_h |
1034 | +@@ -663,6 +673,9 @@ |
1035 | "child", box, |
1036 | "sensitive", FALSE, |
1037 | NULL); |
1038 | @@ -1051,7 +1052,7 @@ |
1039 | if (pos < 0) |
1040 | gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); |
1041 | else |
1042 | -@@ -677,10 +690,13 @@ applet_new_menu_item_helper (NMConnectio |
1043 | +@@ -677,10 +690,13 @@ |
1044 | { |
1045 | GtkWidget *item; |
1046 | NMSettingConnection *s_con; |
1047 | @@ -1065,7 +1066,7 @@ |
1048 | item = gtk_image_menu_item_new_with_label (""); |
1049 | if (add_active && (active == connection)) { |
1050 | /* Pure evil */ |
1051 | -@@ -693,9 +709,13 @@ applet_new_menu_item_helper (NMConnectio |
1052 | +@@ -693,9 +709,13 @@ |
1053 | gtk_menu_item_set_label (GTK_MENU_ITEM (item), nm_setting_connection_get_id (s_con)); |
1054 | |
1055 | gtk_image_menu_item_set_always_show_image (GTK_IMAGE_MENU_ITEM (item), TRUE); |
1056 | @@ -1079,7 +1080,7 @@ |
1057 | #define TITLE_TEXT_R ((double) 0x5e / 255.0 ) |
1058 | #define TITLE_TEXT_G ((double) 0x5e / 255.0 ) |
1059 | #define TITLE_TEXT_B ((double) 0x5e / 255.0 ) |
1060 | -@@ -800,6 +820,8 @@ menu_title_item_expose (GtkWidget *widge |
1061 | +@@ -800,6 +820,8 @@ |
1062 | } |
1063 | #endif |
1064 | |
1065 | @@ -1088,7 +1089,7 @@ |
1066 | GtkWidget * |
1067 | applet_menu_item_create_device_item_helper (NMDevice *device, |
1068 | NMApplet *applet, |
1069 | -@@ -809,11 +831,13 @@ applet_menu_item_create_device_item_help |
1070 | +@@ -809,11 +831,13 @@ |
1071 | |
1072 | item = gtk_menu_item_new_with_mnemonic (text); |
1073 | gtk_widget_set_sensitive (item, FALSE); |
1074 | @@ -1102,7 +1103,7 @@ |
1075 | return item; |
1076 | } |
1077 | |
1078 | -@@ -860,7 +884,12 @@ applet_do_notify (NMApplet *applet, |
1079 | +@@ -860,7 +884,12 @@ |
1080 | g_return_if_fail (summary != NULL); |
1081 | g_return_if_fail (message != NULL); |
1082 | |
1083 | @@ -1115,7 +1116,7 @@ |
1084 | return; |
1085 | |
1086 | escaped = utils_escape_notify_message (message); |
1087 | -@@ -1144,6 +1173,7 @@ vpn_connection_state_changed (NMVPNConne |
1088 | +@@ -1144,6 +1173,7 @@ |
1089 | clear_animation_timeout (applet); |
1090 | |
1091 | applet_schedule_update_icon (applet); |
1092 | @@ -1123,7 +1124,7 @@ |
1093 | } |
1094 | |
1095 | static const char * |
1096 | -@@ -1199,10 +1229,13 @@ activate_vpn_cb (NMClient *client, |
1097 | +@@ -1199,10 +1229,13 @@ |
1098 | } |
1099 | |
1100 | applet_schedule_update_icon (info->applet); |
1101 | @@ -1137,7 +1138,7 @@ |
1102 | static void |
1103 | nma_menu_vpn_item_clicked (GtkMenuItem *item, gpointer user_data) |
1104 | { |
1105 | -@@ -1225,9 +1258,14 @@ nma_menu_vpn_item_clicked (GtkMenuItem * |
1106 | +@@ -1225,9 +1258,14 @@ |
1107 | return; |
1108 | } |
1109 | |
1110 | @@ -1153,7 +1154,7 @@ |
1111 | |
1112 | s_con = nm_connection_get_setting_connection (connection); |
1113 | info = g_malloc0 (sizeof (VPNActivateInfo)); |
1114 | -@@ -1620,6 +1658,8 @@ nma_menu_add_devices (GtkWidget *menu, N |
1115 | +@@ -1620,6 +1658,8 @@ |
1116 | dclass = get_device_class (device, applet); |
1117 | if (dclass) |
1118 | dclass->add_menu_item (device, n_devices, active, menu, applet); |
1119 | @@ -1162,7 +1163,7 @@ |
1120 | } |
1121 | |
1122 | out: |
1123 | -@@ -1677,8 +1717,6 @@ nma_menu_add_vpn_submenu (GtkWidget *men |
1124 | +@@ -1677,8 +1717,6 @@ |
1125 | GSList *list, *iter; |
1126 | int num_vpn_active = 0; |
1127 | |
1128 | @@ -1171,7 +1172,7 @@ |
1129 | vpn_menu = GTK_MENU (gtk_menu_new ()); |
1130 | |
1131 | item = GTK_MENU_ITEM (gtk_menu_item_new_with_mnemonic (_("_VPN Connections"))); |
1132 | -@@ -1697,13 +1735,20 @@ nma_menu_add_vpn_submenu (GtkWidget *men |
1133 | +@@ -1697,13 +1735,20 @@ |
1134 | NMConnection *connection = NM_CONNECTION (iter->data); |
1135 | NMActiveConnection *active; |
1136 | const char *name; |
1137 | @@ -1192,7 +1193,7 @@ |
1138 | |
1139 | /* If no VPN connections are active, draw all menu items enabled. If |
1140 | * >= 1 VPN connections are active, only the active VPN menu item is |
1141 | -@@ -1722,8 +1767,12 @@ nma_menu_add_vpn_submenu (GtkWidget *men |
1142 | +@@ -1722,8 +1767,12 @@ |
1143 | gtk_widget_set_sensitive (GTK_WIDGET (item), FALSE); |
1144 | |
1145 | if (active) { |
1146 | @@ -1205,7 +1206,7 @@ |
1147 | } |
1148 | |
1149 | g_object_set_data_full (G_OBJECT (item), "connection", |
1150 | -@@ -1797,6 +1846,7 @@ nma_set_networking_enabled_cb (GtkWidget |
1151 | +@@ -1797,6 +1846,7 @@ |
1152 | } |
1153 | |
1154 | |
1155 | @@ -1213,7 +1214,7 @@ |
1156 | static void |
1157 | nma_set_notifications_enabled_cb (GtkWidget *widget, NMApplet *applet) |
1158 | { |
1159 | -@@ -1823,6 +1873,7 @@ nma_set_notifications_enabled_cb (GtkWid |
1160 | +@@ -1823,6 +1873,7 @@ |
1161 | !state, |
1162 | NULL); |
1163 | } |
1164 | @@ -1221,7 +1222,7 @@ |
1165 | |
1166 | /* |
1167 | * nma_menu_show_cb |
1168 | -@@ -1911,7 +1962,9 @@ nma_context_menu_update (NMApplet *apple |
1169 | +@@ -1911,7 +1962,9 @@ |
1170 | gboolean wireless_hw_enabled; |
1171 | gboolean wwan_hw_enabled; |
1172 | gboolean wimax_hw_enabled; |
1173 | @@ -1231,7 +1232,7 @@ |
1174 | gboolean sensitive = FALSE; |
1175 | |
1176 | state = nm_client_get_state (applet->nm_client); |
1177 | -@@ -1971,6 +2024,7 @@ nma_context_menu_update (NMApplet *apple |
1178 | +@@ -1971,6 +2024,7 @@ |
1179 | gtk_widget_set_sensitive (GTK_WIDGET (applet->wimax_enabled_item), |
1180 | wimax_hw_enabled && is_permission_yes (applet, NM_CLIENT_PERMISSION_ENABLE_DISABLE_WIMAX)); |
1181 | |
1182 | @@ -1239,7 +1240,7 @@ |
1183 | /* Enabled notifications */ |
1184 | g_signal_handler_block (G_OBJECT (applet->notifications_enabled_item), |
1185 | applet->notifications_enabled_toggled_id); |
1186 | -@@ -1982,6 +2036,7 @@ nma_context_menu_update (NMApplet *apple |
1187 | +@@ -1982,6 +2036,7 @@ |
1188 | gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (applet->notifications_enabled_item), notifications_enabled); |
1189 | g_signal_handler_unblock (G_OBJECT (applet->notifications_enabled_item), |
1190 | applet->notifications_enabled_toggled_id); |
1191 | @@ -1247,7 +1248,7 @@ |
1192 | |
1193 | /* Don't show wifi-specific stuff if wireless is off */ |
1194 | if (state != NM_STATE_ASLEEP) { |
1195 | -@@ -2054,16 +2109,20 @@ applet_connection_info_cb (NMApplet *app |
1196 | +@@ -2054,16 +2109,20 @@ |
1197 | * Generate the contextual popup menu. |
1198 | * |
1199 | */ |
1200 | @@ -1269,7 +1270,7 @@ |
1201 | |
1202 | /* 'Enable Networking' item */ |
1203 | applet->networking_enabled_item = gtk_check_menu_item_new_with_mnemonic (_("Enable _Networking")); |
1204 | -@@ -2103,6 +2162,7 @@ static GtkWidget *nma_context_menu_creat |
1205 | +@@ -2103,6 +2162,7 @@ |
1206 | |
1207 | nma_menu_add_separator_item (GTK_WIDGET (menu)); |
1208 | |
1209 | @@ -1277,7 +1278,7 @@ |
1210 | /* Toggle notifications item */ |
1211 | applet->notifications_enabled_item = gtk_check_menu_item_new_with_mnemonic (_("Enable N_otifications")); |
1212 | id = g_signal_connect (applet->notifications_enabled_item, |
1213 | -@@ -2113,6 +2173,7 @@ static GtkWidget *nma_context_menu_creat |
1214 | +@@ -2113,6 +2173,7 @@ |
1215 | gtk_menu_shell_append (menu, applet->notifications_enabled_item); |
1216 | |
1217 | nma_menu_add_separator_item (GTK_WIDGET (menu)); |
1218 | @@ -1285,7 +1286,7 @@ |
1219 | |
1220 | /* 'Connection Information' item */ |
1221 | applet->info_menu_item = gtk_image_menu_item_new_with_mnemonic (_("Connection _Information")); |
1222 | -@@ -2134,6 +2195,7 @@ static GtkWidget *nma_context_menu_creat |
1223 | +@@ -2134,6 +2195,7 @@ |
1224 | gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (applet->connections_menu_item), image); |
1225 | gtk_menu_shell_append (menu, applet->connections_menu_item); |
1226 | |
1227 | @@ -1293,7 +1294,7 @@ |
1228 | /* Separator */ |
1229 | nma_menu_add_separator_item (GTK_WIDGET (menu)); |
1230 | |
1231 | -@@ -2153,25 +2215,112 @@ static GtkWidget *nma_context_menu_creat |
1232 | +@@ -2153,25 +2215,112 @@ |
1233 | image = gtk_image_new_from_stock (GTK_STOCK_ABOUT, GTK_ICON_SIZE_MENU); |
1234 | gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), image); |
1235 | gtk_menu_shell_append (menu, menu_item); |
1236 | @@ -1410,7 +1411,7 @@ |
1237 | /* Ignore setting of the same icon as is already displayed */ |
1238 | if (applet->icon_layers[layer] == pixbuf) |
1239 | return; |
1240 | -@@ -2205,8 +2354,13 @@ foo_set_icon (NMApplet *applet, GdkPixbu |
1241 | +@@ -2205,8 +2354,13 @@ |
1242 | |
1243 | gtk_status_icon_set_from_pixbuf (applet->status_icon, pixbuf); |
1244 | g_object_unref (pixbuf); |
1245 | @@ -1425,7 +1426,7 @@ |
1246 | |
1247 | NMRemoteConnection * |
1248 | applet_get_exported_connection_for_device (NMDevice *device, NMApplet *applet) |
1249 | -@@ -2393,6 +2547,7 @@ foo_device_state_changed_cb (NMDevice *d |
1250 | +@@ -2393,6 +2547,7 @@ |
1251 | applet_common_device_state_changed (device, new_state, old_state, reason, applet); |
1252 | |
1253 | applet_schedule_update_icon (applet); |
1254 | @@ -1433,7 +1434,7 @@ |
1255 | } |
1256 | |
1257 | static void |
1258 | -@@ -2448,8 +2603,20 @@ foo_client_state_changed_cb (NMClient *c |
1259 | +@@ -2448,8 +2603,20 @@ |
1260 | } |
1261 | |
1262 | applet_schedule_update_icon (applet); |
1263 | @@ -1454,7 +1455,7 @@ |
1264 | static void |
1265 | foo_manager_running_cb (NMClient *client, |
1266 | GParamSpec *pspec, |
1267 | -@@ -2465,6 +2632,7 @@ foo_manager_running_cb (NMClient *client |
1268 | +@@ -2465,6 +2632,7 @@ |
1269 | } |
1270 | |
1271 | applet_schedule_update_icon (applet); |
1272 | @@ -1462,7 +1463,7 @@ |
1273 | } |
1274 | |
1275 | #define VPN_STATE_ID_TAG "vpn-state-id" |
1276 | -@@ -2494,6 +2662,7 @@ foo_active_connections_changed_cb (NMCli |
1277 | +@@ -2494,6 +2662,7 @@ |
1278 | } |
1279 | |
1280 | applet_schedule_update_icon (applet); |
1281 | @@ -1470,7 +1471,7 @@ |
1282 | } |
1283 | |
1284 | static void |
1285 | -@@ -2526,6 +2695,9 @@ foo_set_initial_state (gpointer data) |
1286 | +@@ -2526,6 +2695,9 @@ |
1287 | return FALSE; |
1288 | } |
1289 | |
1290 | @@ -1480,7 +1481,7 @@ |
1291 | static void |
1292 | foo_client_setup (NMApplet *applet) |
1293 | { |
1294 | -@@ -2542,6 +2714,11 @@ foo_client_setup (NMApplet *applet) |
1295 | +@@ -2542,6 +2714,11 @@ |
1296 | g_signal_connect (applet->nm_client, "device-added", |
1297 | G_CALLBACK (foo_device_added_cb), |
1298 | applet); |
1299 | @@ -1492,7 +1493,7 @@ |
1300 | g_signal_connect (applet->nm_client, "notify::manager-running", |
1301 | G_CALLBACK (foo_manager_running_cb), |
1302 | applet); |
1303 | -@@ -2561,10 +2738,12 @@ foo_client_setup (NMApplet *applet) |
1304 | +@@ -2561,10 +2738,12 @@ |
1305 | applet_schedule_update_icon (applet); |
1306 | } |
1307 | |
1308 | @@ -1508,7 +1509,7 @@ |
1309 | int stage = -1; |
1310 | |
1311 | switch (state) { |
1312 | -@@ -2583,25 +2762,32 @@ applet_common_get_device_icon (NMDeviceS |
1313 | +@@ -2583,25 +2762,32 @@ |
1314 | } |
1315 | |
1316 | if (stage >= 0) { |
1317 | @@ -1553,7 +1554,7 @@ |
1318 | } |
1319 | |
1320 | static char * |
1321 | -@@ -2640,12 +2826,14 @@ get_tip_for_device_state (NMDevice *devi |
1322 | +@@ -2640,12 +2826,14 @@ |
1323 | return tip; |
1324 | } |
1325 | |
1326 | @@ -1571,7 +1572,7 @@ |
1327 | NMDeviceState state = NM_DEVICE_STATE_UNKNOWN; |
1328 | NMADeviceClass *dclass; |
1329 | |
1330 | -@@ -2670,19 +2858,13 @@ applet_get_device_icon_for_state (NMAppl |
1331 | +@@ -2670,19 +2858,13 @@ |
1332 | |
1333 | connection = applet_find_active_connection_for_device (device, applet, NULL); |
1334 | /* device class returns a referenced pixbuf */ |
1335 | @@ -1595,7 +1596,7 @@ |
1336 | } |
1337 | |
1338 | static char * |
1339 | -@@ -2738,7 +2920,7 @@ applet_update_icon (gpointer user_data) |
1340 | +@@ -2738,7 +2920,7 @@ |
1341 | NMApplet *applet = NM_APPLET (user_data); |
1342 | GdkPixbuf *pixbuf = NULL; |
1343 | NMState state; |
1344 | @@ -1604,7 +1605,7 @@ |
1345 | NMVPNConnectionState vpn_state = NM_VPN_SERVICE_STATE_UNKNOWN; |
1346 | gboolean nm_running; |
1347 | NMActiveConnection *active_vpn = NULL; |
1348 | -@@ -2753,36 +2935,53 @@ applet_update_icon (gpointer user_data) |
1349 | +@@ -2753,36 +2935,53 @@ |
1350 | if (!nm_running) |
1351 | state = NM_STATE_UNKNOWN; |
1352 | |
1353 | @@ -1663,7 +1664,7 @@ |
1354 | break; |
1355 | case NM_VPN_CONNECTION_STATE_PREPARE: |
1356 | case NM_VPN_CONNECTION_STATE_NEED_AUTH: |
1357 | -@@ -2797,6 +2996,9 @@ applet_update_icon (gpointer user_data) |
1358 | +@@ -2797,6 +2996,9 @@ |
1359 | } |
1360 | |
1361 | pixbuf = applet->vpn_connecting_icons[applet->animation_step]; |
1362 | @@ -1673,7 +1674,7 @@ |
1363 | applet->animation_step++; |
1364 | if (applet->animation_step >= NUM_VPN_CONNECTING_FRAMES) |
1365 | applet->animation_step = 0; |
1366 | -@@ -2807,28 +3009,9 @@ applet_update_icon (gpointer user_data) |
1367 | +@@ -2807,28 +3009,9 @@ |
1368 | |
1369 | vpn_tip = get_tip_for_vpn (active_vpn, vpn_state, applet); |
1370 | } |
1371 | @@ -1705,7 +1706,7 @@ |
1372 | |
1373 | return FALSE; |
1374 | } |
1375 | -@@ -3311,18 +3494,95 @@ status_icon_popup_menu_cb (GtkStatusIcon |
1376 | +@@ -3311,18 +3494,95 @@ |
1377 | * of the notification. |
1378 | */ |
1379 | |
1380 | @@ -1802,7 +1803,7 @@ |
1381 | if (!applet->status_icon) |
1382 | return FALSE; |
1383 | if (shell_debug) |
1384 | -@@ -3337,11 +3597,34 @@ setup_widgets (NMApplet *applet) |
1385 | +@@ -3337,11 +3597,34 @@ |
1386 | g_signal_connect (applet->status_icon, "popup-menu", |
1387 | G_CALLBACK (status_icon_popup_menu_cb), applet); |
1388 | |
1389 | @@ -1841,7 +1842,7 @@ |
1390 | } |
1391 | |
1392 | static void |
1393 | -@@ -3537,6 +3820,8 @@ constructor (GType type, |
1394 | +@@ -3537,6 +3820,8 @@ |
1395 | GCONF_CLIENT_PRELOAD_ONELEVEL, |
1396 | NULL); |
1397 | |
1398 | @@ -1850,7 +1851,7 @@ |
1399 | /* Load pixmaps and create applet widgets */ |
1400 | if (!setup_widgets (applet)) |
1401 | goto error; |
1402 | -@@ -3555,6 +3840,13 @@ constructor (GType type, |
1403 | +@@ -3555,6 +3840,13 @@ |
1404 | /* Move user connections to the system */ |
1405 | nm_gconf_move_connections_to_system (import_cb, applet); |
1406 | |
1407 | @@ -1864,7 +1865,7 @@ |
1408 | applet->agent = applet_agent_new (); |
1409 | g_assert (applet->agent); |
1410 | g_signal_connect (applet->agent, APPLET_AGENT_GET_SECRETS, |
1411 | -@@ -3583,8 +3875,6 @@ constructor (GType type, |
1412 | +@@ -3583,8 +3875,6 @@ |
1413 | applet->wimax_class = applet_device_wimax_get_class (applet); |
1414 | g_assert (applet->wimax_class); |
1415 | |
1416 | @@ -1873,7 +1874,7 @@ |
1417 | /* Track embedding to help debug issues where user has removed the |
1418 | * notification area applet from the panel, and thus nm-applet too. |
1419 | */ |
1420 | -@@ -3630,6 +3920,11 @@ static void finalize (GObject *object) |
1421 | +@@ -3630,6 +3920,11 @@ |
1422 | if (applet->update_icon_id) |
1423 | g_source_remove (applet->update_icon_id); |
1424 | |
1425 | @@ -1885,7 +1886,7 @@ |
1426 | if (applet->menu) |
1427 | g_object_unref (applet->menu); |
1428 | nma_icons_free (applet); |
1429 | -@@ -3657,6 +3952,11 @@ static void finalize (GObject *object) |
1430 | +@@ -3657,6 +3952,11 @@ |
1431 | if (applet->status_icon) |
1432 | g_object_unref (applet->status_icon); |
1433 | |
1434 | @@ -1897,10 +1898,10 @@ |
1435 | if (applet->nm_client) |
1436 | g_object_unref (applet->nm_client); |
1437 | |
1438 | -Index: b/src/applet.h |
1439 | +Index: network-manager-applet-0.9.4.1/src/applet.h |
1440 | =================================================================== |
1441 | ---- a/src/applet.h |
1442 | -+++ b/src/applet.h |
1443 | +--- network-manager-applet-0.9.4.1.orig/src/applet.h 2012-11-21 16:19:08.971734142 -0800 |
1444 | ++++ network-manager-applet-0.9.4.1/src/applet.h 2012-11-21 16:19:33.239854478 -0800 |
1445 | @@ -38,6 +38,10 @@ |
1446 | |
1447 | #include <libnotify/notify.h> |
1448 | @@ -1912,7 +1913,7 @@ |
1449 | #include <nm-connection.h> |
1450 | #include <nm-client.h> |
1451 | #include <nm-access-point.h> |
1452 | -@@ -148,6 +152,11 @@ typedef struct |
1453 | +@@ -148,6 +152,11 @@ |
1454 | guint animation_id; |
1455 | |
1456 | /* Direct UI elements */ |
1457 | @@ -1924,7 +1925,7 @@ |
1458 | GtkStatusIcon * status_icon; |
1459 | int icon_size; |
1460 | |
1461 | -@@ -234,13 +243,15 @@ struct NMADeviceClass { |
1462 | +@@ -234,13 +243,15 @@ |
1463 | NMDeviceStateReason reason, |
1464 | NMApplet *applet); |
1465 | |
1466 | @@ -1942,7 +1943,7 @@ |
1467 | char **tip, |
1468 | NMApplet *applet); |
1469 | |
1470 | -@@ -255,6 +266,10 @@ NMApplet *nm_applet_new (GMainLoop *loop |
1471 | +@@ -255,6 +266,10 @@ |
1472 | |
1473 | void applet_schedule_update_icon (NMApplet *applet); |
1474 | |
1475 | @@ -1953,10 +1954,10 @@ |
1476 | NMRemoteSettings *applet_get_settings (NMApplet *applet); |
1477 | |
1478 | GSList *applet_get_all_connections (NMApplet *applet); |
1479 | -Index: b/src/mobile-helpers.c |
1480 | +Index: network-manager-applet-0.9.4.1/src/mobile-helpers.c |
1481 | =================================================================== |
1482 | ---- a/src/mobile-helpers.c |
1483 | -+++ b/src/mobile-helpers.c |
1484 | +--- network-manager-applet-0.9.4.1.orig/src/mobile-helpers.c 2012-03-19 11:41:12.000000000 -0700 |
1485 | ++++ network-manager-applet-0.9.4.1/src/mobile-helpers.c 2012-11-21 16:19:09.079734683 -0800 |
1486 | @@ -21,6 +21,7 @@ |
1487 | */ |
1488 | |
1489 | @@ -1965,7 +1966,7 @@ |
1490 | |
1491 | GdkPixbuf * |
1492 | mobile_helper_get_status_pixbuf (guint32 quality, |
1493 | -@@ -35,7 +36,11 @@ mobile_helper_get_status_pixbuf (guint32 |
1494 | +@@ -35,7 +36,11 @@ |
1495 | |
1496 | if (!quality_valid) |
1497 | quality = 0; |
1498 | @@ -1977,7 +1978,7 @@ |
1499 | |
1500 | pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, |
1501 | TRUE, |
1502 | -@@ -83,9 +88,14 @@ mobile_helper_get_status_pixbuf (guint32 |
1503 | +@@ -83,9 +88,14 @@ |
1504 | return pixbuf; |
1505 | } |
1506 | |
1507 | @@ -1992,7 +1993,7 @@ |
1508 | if (quality > 80) |
1509 | return nma_icon_check_and_load ("nm-signal-100", &applet->wireless_100_icon, applet); |
1510 | else if (quality > 55) |
1511 | -@@ -96,7 +106,132 @@ mobile_helper_get_quality_icon (guint32 |
1512 | +@@ -96,7 +106,132 @@ |
1513 | return nma_icon_check_and_load ("nm-signal-25", &applet->wireless_25_icon, applet); |
1514 | |
1515 | return nma_icon_check_and_load ("nm-signal-00", &applet->wireless_00_icon, applet); |
1516 | @@ -2125,11 +2126,11 @@ |
1517 | |
1518 | GdkPixbuf * |
1519 | mobile_helper_get_tech_icon (guint32 tech, NMApplet *applet) |
1520 | -Index: b/src/mobile-helpers.h |
1521 | +Index: network-manager-applet-0.9.4.1/src/mobile-helpers.h |
1522 | =================================================================== |
1523 | ---- a/src/mobile-helpers.h |
1524 | -+++ b/src/mobile-helpers.h |
1525 | -@@ -56,9 +56,20 @@ GdkPixbuf *mobile_helper_get_status_pixb |
1526 | +--- network-manager-applet-0.9.4.1.orig/src/mobile-helpers.h 2012-03-13 16:04:00.000000000 -0700 |
1527 | ++++ network-manager-applet-0.9.4.1/src/mobile-helpers.h 2012-11-21 16:19:09.079734683 -0800 |
1528 | +@@ -56,9 +56,20 @@ |
1529 | guint32 access_tech, |
1530 | NMApplet *applet); |
1531 | |
1532 | @@ -2150,11 +2151,11 @@ |
1533 | + |
1534 | #endif /* APPLET_MOBILE_HELPERS_H */ |
1535 | |
1536 | -Index: b/src/mb-menu-item.c |
1537 | +Index: network-manager-applet-0.9.4.1/src/mb-menu-item.c |
1538 | =================================================================== |
1539 | ---- a/src/mb-menu-item.c |
1540 | -+++ b/src/mb-menu-item.c |
1541 | -@@ -180,11 +180,14 @@ nm_mb_menu_item_new (const char *connect |
1542 | +--- network-manager-applet-0.9.4.1.orig/src/mb-menu-item.c 2012-03-20 13:32:44.000000000 -0700 |
1543 | ++++ network-manager-applet-0.9.4.1/src/mb-menu-item.c 2012-11-21 16:19:09.079734683 -0800 |
1544 | +@@ -180,11 +180,14 @@ |
1545 | gtk_label_set_text (GTK_LABEL (priv->desc), priv->desc_string); |
1546 | } |
1547 | |
1548 | @@ -2169,11 +2170,11 @@ |
1549 | |
1550 | return GTK_WIDGET (item); |
1551 | } |
1552 | -Index: b/src/gconf-helpers/Makefile.am |
1553 | +Index: network-manager-applet-0.9.4.1/src/gconf-helpers/Makefile.am |
1554 | =================================================================== |
1555 | ---- a/src/gconf-helpers/Makefile.am |
1556 | -+++ b/src/gconf-helpers/Makefile.am |
1557 | -@@ -16,6 +16,7 @@ libgconf_helpers_la_CPPFLAGS = \ |
1558 | +--- network-manager-applet-0.9.4.1.orig/src/gconf-helpers/Makefile.am 2012-03-13 16:03:59.000000000 -0700 |
1559 | ++++ network-manager-applet-0.9.4.1/src/gconf-helpers/Makefile.am 2012-11-21 16:19:09.083734694 -0800 |
1560 | +@@ -16,6 +16,7 @@ |
1561 | -I$(top_srcdir)/src/utils \ |
1562 | $(GTK_CFLAGS) \ |
1563 | $(NMA_CFLAGS) \ |
1564 | @@ -2181,7 +2182,7 @@ |
1565 | $(GCONF_CFLAGS) \ |
1566 | $(GNOME_KEYRING_CFLAGS) \ |
1567 | $(DISABLE_DEPRECATED) |
1568 | -@@ -23,6 +24,7 @@ libgconf_helpers_la_CPPFLAGS = \ |
1569 | +@@ -23,6 +24,7 @@ |
1570 | libgconf_helpers_la_LIBADD = \ |
1571 | $(GTK_LIBS) \ |
1572 | $(NMA_LIBS) \ |
1573 | @@ -2189,10 +2190,10 @@ |
1574 | $(GCONF_LIBS) \ |
1575 | $(GNOME_KEYRING_LIBS) |
1576 | |
1577 | -Index: b/src/applet-device-wimax.c |
1578 | +Index: network-manager-applet-0.9.4.1/src/applet-device-wimax.c |
1579 | =================================================================== |
1580 | ---- a/src/applet-device-wimax.c |
1581 | -+++ b/src/applet-device-wimax.c |
1582 | +--- network-manager-applet-0.9.4.1.orig/src/applet-device-wimax.c 2012-03-19 07:53:53.000000000 -0700 |
1583 | ++++ network-manager-applet-0.9.4.1/src/applet-device-wimax.c 2012-11-21 16:19:09.083734694 -0800 |
1584 | @@ -36,6 +36,7 @@ |
1585 | #include "applet.h" |
1586 | #include "applet-device-wimax.h" |
1587 | @@ -2201,7 +2202,7 @@ |
1588 | #include "applet-dialogs.h" |
1589 | #include "nma-marshal.h" |
1590 | #include "mb-menu-item.h" |
1591 | -@@ -141,9 +142,14 @@ new_nsp_menu_item (NMDeviceWimax *device |
1592 | +@@ -141,9 +142,14 @@ |
1593 | { |
1594 | GtkWidget *item; |
1595 | WimaxMenuItemInfo *info; |
1596 | @@ -2216,7 +2217,7 @@ |
1597 | item = nm_mb_menu_item_new (nm_wimax_nsp_get_name (nsp), |
1598 | nm_wimax_nsp_get_signal_quality (nsp), |
1599 | NULL, |
1600 | -@@ -152,6 +158,16 @@ new_nsp_menu_item (NMDeviceWimax *device |
1601 | +@@ -152,6 +158,16 @@ |
1602 | nsp_type_to_mb_state (nm_wimax_nsp_get_network_type (nsp)), |
1603 | TRUE, |
1604 | applet); |
1605 | @@ -2233,7 +2234,7 @@ |
1606 | gtk_widget_set_sensitive (GTK_WIDGET (item), TRUE); |
1607 | |
1608 | info = g_slice_new0 (WimaxMenuItemInfo); |
1609 | -@@ -305,7 +321,12 @@ wimax_add_menu_item (NMDevice *device, |
1610 | +@@ -305,7 +321,12 @@ |
1611 | static void |
1612 | nsp_quality_changed (NMWimaxNsp *nsp, GParamSpec *pspec, gpointer user_data) |
1613 | { |
1614 | @@ -2247,7 +2248,7 @@ |
1615 | } |
1616 | |
1617 | static NMWimaxNsp * |
1618 | -@@ -367,8 +388,12 @@ active_nsp_changed_cb (NMDeviceWimax *de |
1619 | +@@ -367,8 +388,12 @@ |
1620 | if (!s_wimax) |
1621 | return; |
1622 | |
1623 | @@ -2261,7 +2262,7 @@ |
1624 | } |
1625 | |
1626 | static void |
1627 | -@@ -384,6 +409,9 @@ nsp_removed_cb (NMDeviceWimax *device, |
1628 | +@@ -384,6 +409,9 @@ |
1629 | if (old == nsp) { |
1630 | g_object_set_data (G_OBJECT (device), ACTIVE_NSP_TAG, NULL); |
1631 | applet_schedule_update_icon (applet); |
1632 | @@ -2271,7 +2272,7 @@ |
1633 | } |
1634 | } |
1635 | |
1636 | -@@ -432,15 +460,16 @@ wimax_device_state_changed (NMDevice *de |
1637 | +@@ -432,15 +460,16 @@ |
1638 | } |
1639 | } |
1640 | |
1641 | @@ -2290,7 +2291,7 @@ |
1642 | const char *id; |
1643 | NMWimaxNsp *nsp; |
1644 | guint32 quality = 0; |
1645 | -@@ -474,7 +503,7 @@ wimax_get_icon (NMDevice *device, |
1646 | +@@ -474,7 +503,7 @@ |
1647 | break; |
1648 | case NM_DEVICE_STATE_ACTIVATED: |
1649 | roaming = (nsp_type == NM_WIMAX_NSP_NETWORK_TYPE_ROAMING_PARTNER); |
1650 | @@ -2299,7 +2300,7 @@ |
1651 | TRUE, |
1652 | nsp_type_to_mb_state (nsp_type), |
1653 | MB_TECH_WIMAX, |
1654 | -@@ -483,12 +512,11 @@ wimax_get_icon (NMDevice *device, |
1655 | +@@ -483,12 +512,11 @@ |
1656 | id, quality, |
1657 | roaming ? ", " : "", |
1658 | roaming ? _("roaming") : ""); |
1659 | |
1660 | === modified file 'debian/patches/series' |
1661 | --- debian/patches/series 2012-03-27 14:17:07 +0000 |
1662 | +++ debian/patches/series 2012-11-23 16:30:42 +0000 |
1663 | @@ -1,3 +1,5 @@ |
1664 | +git_fix_some_leaks_80ef61b.patch |
1665 | +git_mac_addr_string_leakage_6dae878.patch |
1666 | lp289466_always_show_tray_icon.patch |
1667 | lp328572-dxteam-connect-text.patch |
1668 | lp330571_dxteam_wired_connect_text.patch |
Looking good, with the only exception (at first glance) that the version should be 2.1 instead of 3. I'll do a more thorough review tomorrow ;)