Merge lp:~jm-leddy/network-manager-applet/enable-disable-disconnect-notification into lp:~network-manager/network-manager-applet/ubuntu.precise

Proposed by James M. Leddy
Status: Merged
Approved by: Mathieu Trudel-Lapierre
Approved revision: 339
Merged at revision: 340
Proposed branch: lp:~jm-leddy/network-manager-applet/enable-disable-disconnect-notification
Merge into: lp:~network-manager/network-manager-applet/ubuntu.precise
Diff against target: 98 lines (+23/-9)
2 files modified
debian/changelog (+8/-0)
debian/patches/lp341684_device_sensitive_disconnect_notify.patch (+15/-9)
To merge this branch: bzr merge lp:~jm-leddy/network-manager-applet/enable-disable-disconnect-notification
Reviewer Review Type Date Requested Status
Mathieu Trudel-Lapierre Approve
Review via email: mp+137044@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Looks good, approve.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2012-11-23 21:48:30 +0000
+++ debian/changelog 2012-11-29 20:52:43 +0000
@@ -1,3 +1,11 @@
1network-manager-applet (0.9.4.1-0ubuntu2.2) UNRELEASED; urgency=low
2
3 [Matvey Marinin]
4 * debian/patches/lp341684_device_sensitive_disconnect_notify.patch: updated
5 to respect the "disable-disconnected-notifications" settings. (LP: #445872)
6
7 -- James M Leddy <james.leddy@canonical.com> Mon, 26 Nov 2012 17:20:19 -0500
8
1network-manager-applet (0.9.4.1-0ubuntu2.1) precise-proposed; urgency=low9network-manager-applet (0.9.4.1-0ubuntu2.1) precise-proposed; urgency=low
210
3 * Backport r355, r364, r368 from trunk (LP: #780602)11 * Backport r355, r364, r368 from trunk (LP: #780602)
412
=== modified file 'debian/patches/lp341684_device_sensitive_disconnect_notify.patch'
--- debian/patches/lp341684_device_sensitive_disconnect_notify.patch 2012-03-29 16:12:17 +0000
+++ debian/patches/lp341684_device_sensitive_disconnect_notify.patch 2012-11-29 20:52:43 +0000
@@ -1,15 +1,15 @@
1=== modified file 'src/applet-device-wifi.c'1=== modified file 'src/applet-device-wifi.c'
2---2---
3 src/applet-device-wifi.c | 1 3 src/applet-device-wifi.c | 1
4 src/applet.c | 135 +++++++++++++++++++++++++++++++++++++++++++++--4 src/applet.c | 141 +++++++++++++++++++++++++++++++++++++++++++++--
5 src/applet.h | 3 +5 src/applet.h | 3 +
6 3 files changed, 135 insertions(+), 4 deletions(-)6 3 files changed, 141 insertions(+), 4 deletions(-)
77
8Index: b/src/applet-device-wifi.c8Index: b/src/applet-device-wifi.c
9===================================================================9===================================================================
10--- a/src/applet-device-wifi.c10--- a/src/applet-device-wifi.c
11+++ b/src/applet-device-wifi.c11+++ b/src/applet-device-wifi.c
12@@ -1263,6 +1263,7 @@ wireless_device_state_changed (NMDevice12@@ -1259,6 +1259,7 @@ wireless_device_state_changed (NMDevice
13 return;13 return;
14 14
15 esc_ssid = get_ssid_utf8 (new);15 esc_ssid = get_ssid_utf8 (new);
@@ -29,7 +29,7 @@
29 #include <nm-device-ethernet.h>29 #include <nm-device-ethernet.h>
30 #include <nm-device-wifi.h>30 #include <nm-device-wifi.h>
31 #include <nm-device-modem.h>31 #include <nm-device-modem.h>
32@@ -210,6 +211,19 @@ impl_dbus_connect_to_3g_network (NMApple32@@ -209,6 +210,19 @@ impl_dbus_connect_to_3g_network (NMApple
33 33
34 /********************************************************************/34 /********************************************************************/
35 35
@@ -49,7 +49,7 @@
49 static NMActiveConnection *49 static NMActiveConnection *
50 applet_get_best_activating_connection (NMApplet *applet, NMDevice **device)50 applet_get_best_activating_connection (NMApplet *applet, NMDevice **device)
51 {51 {
52@@ -2227,6 +2241,58 @@ applet_get_exported_connection_for_devic52@@ -2222,6 +2236,64 @@ applet_get_exported_connection_for_devic
53 return NULL;53 return NULL;
54 }54 }
55 55
@@ -93,7 +93,13 @@
93+ NMApplet *applet = NM_APPLET (user_data);93+ NMApplet *applet = NM_APPLET (user_data);
94+ OfflineNotificationContextInfo *info = applet->notification_queue_data;94+ OfflineNotificationContextInfo *info = applet->notification_queue_data;
95+ if(select_merged_notification_text (info))95+ if(select_merged_notification_text (info))
96+ applet_do_notify (applet, info->urgency, info->title, info->text, info->icon, NULL, NULL, NULL, applet);96+ if (!gconf_client_get_bool (applet->gconf_client, PREF_DISABLE_DISCONNECTED_NOTIFICATIONS, NULL))
97+ applet_do_notify (applet, info->urgency, info->title,
98+ info->text, info->icon,
99+ PREF_DISABLE_DISCONNECTED_NOTIFICATIONS,
100+ _("Don't show this message again"),
101+ notify_dont_show_cb,
102+ applet);
97+ else103+ else
98+ g_debug("no notification because merged found that we have nothing to say (e.g. not offline)");104+ g_debug("no notification because merged found that we have nothing to say (e.g. not offline)");
99+ if (info->title)105+ if (info->title)
@@ -108,7 +114,7 @@
108 static void114 static void
109 applet_common_device_state_changed (NMDevice *device,115 applet_common_device_state_changed (NMDevice *device,
110 NMDeviceState new_state,116 NMDeviceState new_state,
111@@ -2240,6 +2306,54 @@ applet_common_device_state_changed (NMDe117@@ -2235,6 +2307,54 @@ applet_common_device_state_changed (NMDe
112 vpn_activating = applet_is_any_vpn_activating (applet);118 vpn_activating = applet_is_any_vpn_activating (applet);
113 119
114 switch (new_state) {120 switch (new_state) {
@@ -163,7 +169,7 @@
163 case NM_DEVICE_STATE_PREPARE:169 case NM_DEVICE_STATE_PREPARE:
164 case NM_DEVICE_STATE_CONFIG:170 case NM_DEVICE_STATE_CONFIG:
165 case NM_DEVICE_STATE_NEED_AUTH:171 case NM_DEVICE_STATE_NEED_AUTH:
166@@ -2310,13 +2424,26 @@ foo_client_state_changed_cb (NMClient *c172@@ -2305,13 +2425,26 @@ foo_client_state_changed_cb (NMClient *c
167 {173 {
168 NMApplet *applet = NM_APPLET (user_data);174 NMApplet *applet = NM_APPLET (user_data);
169 175
@@ -198,7 +204,7 @@
198===================================================================204===================================================================
199--- a/src/applet.h205--- a/src/applet.h
200+++ b/src/applet.h206+++ b/src/applet.h
201@@ -175,6 +175,9 @@ typedef struct207@@ -174,6 +174,9 @@ typedef struct
202 208
203 /* Tracker objects for secrets requests */209 /* Tracker objects for secrets requests */
204 GSList * secrets_reqs;210 GSList * secrets_reqs;

Subscribers

People subscribed via source and target branches