1
=== modified file 'src/applet-device-gsm.c'
3
src/applet-device-broadband.c | 17 ++++++-----------
4
src/applet-device-bt.c | 12 ++++--------
5
src/applet-device-cdma.c | 17 ++++++-----------
6
src/applet-device-gsm.c | 13 ++++---------
7
src/applet-device-wimax.c | 13 ++++---------
8
5 files changed, 24 insertions(+), 48 deletions(-)
10
Index: b/src/applet-device-gsm.c
11
===================================================================
12
--- a/src/applet-device-gsm.c
13
+++ b/src/applet-device-gsm.c
14
@@ -387,24 +387,19 @@ gsm_device_state_changed (NMDevice *devi
15
if (new_state == NM_DEVICE_STATE_ACTIVATED) {
16
NMConnection *connection;
17
NMSettingConnection *s_con = NULL;
19
+ const char *str = NULL;
21
connection = applet_find_active_connection_for_device (device, applet, NULL);
25
s_con = nm_connection_get_setting_connection (connection);
26
- id = s_con ? nm_setting_connection_get_id (s_con) : NULL;
28
- str = g_strdup_printf (_("You are now connected to '%s'."), id);
29
+ str = s_con ? nm_setting_connection_get_id (s_con) : NULL;
32
applet_do_notify_with_pref (applet,
33
- _("Connection Established"),
34
- str ? str : _("You are now connected to the GSM network."),
36
+ str ? str : _("GSM network."),
38
PREF_DISABLE_CONNECTED_NOTIFICATIONS);
42
/* Start/stop polling of quality and registration when device state changes */
43
Index: b/src/applet-device-cdma.c
44
===================================================================
45
--- a/src/applet-device-cdma.c
46
+++ b/src/applet-device-cdma.c
47
@@ -333,24 +333,19 @@ cdma_device_state_changed (NMDevice *dev
48
if (new_state == NM_DEVICE_STATE_ACTIVATED) {
49
NMConnection *connection;
50
NMSettingConnection *s_con = NULL;
52
+ const char *str = NULL;
54
connection = applet_find_active_connection_for_device (device, applet, NULL);
58
s_con = nm_connection_get_setting_connection (connection);
59
- id = s_con ? nm_setting_connection_get_id (s_con) : NULL;
61
- str = g_strdup_printf (_("You are now connected to '%s'."), id);
62
+ str = s_con ? nm_setting_connection_get_id (s_con) : NULL;
65
applet_do_notify_with_pref (applet,
66
- _("Connection Established"),
67
- str ? str : _("You are now connected to the CDMA network."),
69
+ str ? str : _("CDMA network"),
71
PREF_DISABLE_CONNECTED_NOTIFICATIONS);
75
/* Start/stop polling of quality and registration when device state changes */
76
@@ -414,13 +409,13 @@ notify_user_of_cdma_reg_change (CdmaDevi
78
if (mb_state == MB_STATE_HOME) {
79
applet_do_notify_with_pref (info->applet,
82
_("You are now registered on the home network."),
84
PREF_DISABLE_CONNECTED_NOTIFICATIONS);
85
} else if (mb_state == MB_STATE_ROAMING) {
86
applet_do_notify_with_pref (info->applet,
89
_("You are now registered on a roaming network."),
91
PREF_DISABLE_CONNECTED_NOTIFICATIONS);
92
Index: b/src/applet-device-bt.c
93
===================================================================
94
--- a/src/applet-device-bt.c
95
+++ b/src/applet-device-bt.c
96
@@ -184,23 +184,19 @@ bt_device_state_changed (NMDevice *devic
97
if (new_state == NM_DEVICE_STATE_ACTIVATED) {
98
NMConnection *connection;
99
NMSettingConnection *s_con = NULL;
101
+ const char *str = NULL;
103
connection = applet_find_active_connection_for_device (device, applet, NULL);
106
s_con = nm_connection_get_setting_connection (connection);
107
- id = s_con ? nm_setting_connection_get_id (s_con) : NULL;
109
- str = g_strdup_printf (_("You are now connected to '%s'."), id);
110
+ str = s_con ? nm_setting_connection_get_id (s_con) : NULL;
113
applet_do_notify_with_pref (applet,
114
- _("Connection Established"),
115
- str ? str : _("You are now connected to the mobile broadband network."),
117
+ str ? str : _("Mobile Broadband network"),
119
PREF_DISABLE_CONNECTED_NOTIFICATIONS);
124
Index: b/src/applet-device-broadband.c
125
===================================================================
126
--- a/src/applet-device-broadband.c
127
+++ b/src/applet-device-broadband.c
128
@@ -796,27 +796,22 @@ device_state_changed (NMDevice *device,
130
NMConnection *connection;
131
NMSettingConnection *s_con = NULL;
133
+ const char *str = NULL;
135
if (new_state != NM_DEVICE_STATE_ACTIVATED)
138
connection = applet_find_active_connection_for_device (device, applet, NULL);
142
s_con = nm_connection_get_setting_connection (connection);
143
- id = s_con ? nm_setting_connection_get_id (s_con) : NULL;
145
- str = g_strdup_printf (_("You are now connected to '%s'."), id);
146
+ str = s_con ? nm_setting_connection_get_id (s_con) : NULL;
149
applet_do_notify_with_pref (applet,
150
- _("Connection Established"),
151
- str ? str : _("You are now connected to the Mobile Broadband network."),
153
+ str ? str : _("Mobile Broadband network"),
155
PREF_DISABLE_CONNECTED_NOTIFICATIONS);
159
/********************************************************************/
160
@@ -949,13 +944,13 @@ modem_state_changed (MMModem *object,
161
mb_state = broadband_state_to_mb_state (info);
162
if (mb_state == MB_STATE_HOME) {
163
applet_do_notify_with_pref (info->applet,
164
- _("Mobile Broadband network."),
165
+ _("Mobile Broadband network"),
166
_("You are now registered on the home network."),
168
PREF_DISABLE_CONNECTED_NOTIFICATIONS);
169
} else if (mb_state == MB_STATE_ROAMING) {
170
applet_do_notify_with_pref (info->applet,
171
- _("Mobile Broadband network."),
172
+ _("Mobile Broadband network"),
173
_("You are now registered on a roaming network."),
175
PREF_DISABLE_CONNECTED_NOTIFICATIONS);
176
Index: b/src/applet-device-wimax.c
177
===================================================================
178
--- a/src/applet-device-wimax.c
179
+++ b/src/applet-device-wimax.c
180
@@ -407,24 +407,19 @@ wimax_device_state_changed (NMDevice *de
181
if (new_state == NM_DEVICE_STATE_ACTIVATED) {
182
NMConnection *connection;
183
NMSettingConnection *s_con = NULL;
185
+ const char *str = NULL;
187
connection = applet_find_active_connection_for_device (device, applet, NULL);
191
s_con = nm_connection_get_setting_connection (connection);
192
- id = s_con ? nm_setting_connection_get_id (s_con) : NULL;
194
- str = g_strdup_printf (_("You are now connected to '%s'."), id);
195
+ str = s_con ? nm_setting_connection_get_id (s_con) : NULL;
198
applet_do_notify_with_pref (applet,
199
- _("Connection Established"),
200
- str ? str : _("You are now connected to the WiMAX network."),
202
+ str ? str : _("WiMAX network"),
204
PREF_DISABLE_CONNECTED_NOTIFICATIONS);