~ubuntu-branches/ubuntu/lucid/network-manager-applet/lucid-updates

« back to all changes in this revision

Viewing changes to debian/patches/lp341684_device_sensitive_disconnect_notify.patch

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Sack, Alexander Sack, Tony Espy
  • Date: 2009-09-14 11:32:57 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20090914113257-47x5o2kfwwm95w3l
Tags: 0.8~a~git.20090913t161448.cc2f6be-0ubuntu1
* upstream snapshot 2009-09-13 16:14:48 (GMT)
  + cc2f6bea12daec5f0caf535a3534f07ade5b5cf2

[ Alexander Sack <asac@ubuntu.com> ]
* build depend on libpolkit-gobject-1-dev instead of libpolkit-dbus-dev
  - update debian/control

[ Tony Espy <espy@ubuntu.com> ]
* adjust patches for upstream code base
  - update debian/patches/20_use_full_vpn_dialog_service_name_path.patch
  - update debian/patches/lp328572_dxteam_connect_text.patch
  - update debian/patches/lp337960_dxteam_notification_icon_names.diff
  - update debian/patches/lp341684_device_sensitive_disconnect_notify.patch
* adjust build and runtime depends due to ABI changes in latest NM
  - update debian/control

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
=== modified file 'src/applet-device-wifi.c'
2
2
---
3
3
 src/applet-device-wifi.c |    4 +
4
 
 src/applet.c             |  138 +++++++++++++++++++++++++++++++++++++++++++++--
 
4
 src/applet.c             |  137 +++++++++++++++++++++++++++++++++++++++++++++++++--
5
5
 src/applet.h             |    3 +
6
 
 3 files changed, 140 insertions(+), 5 deletions(-)
 
6
 3 files changed, 139 insertions(+), 5 deletions(-)
7
7
 
8
 
Index: network-manager-applet-0.7.1.git.2.8ed7940cd3/src/applet-device-wifi.c
 
8
Index: network-manager-applet-0.8~a~git.20090830t224938.0334788/src/applet-device-wifi.c
9
9
===================================================================
10
 
--- network-manager-applet-0.7.1.git.2.8ed7940cd3.orig/src/applet-device-wifi.c
11
 
+++ network-manager-applet-0.7.1.git.2.8ed7940cd3/src/applet-device-wifi.c
12
 
@@ -1166,18 +1166,20 @@ wireless_device_state_changed (NMDevice 
13
 
                queue_avail_access_point_notification (device);
14
 
 
15
 
        if (new_state != NM_DEVICE_STATE_ACTIVATED)
16
 
                return;
17
 
 
 
10
--- network-manager-applet-0.8~a~git.20090830t224938.0334788.orig/src/applet-device-wifi.c      2009-08-31 18:35:03.000000000 -0400
 
11
+++ network-manager-applet-0.8~a~git.20090830t224938.0334788/src/applet-device-wifi.c   2009-08-31 18:37:52.000000000 -0400
 
12
@@ -1177,8 +1177,10 @@
18
13
        if (new) {
19
14
                const GByteArray *ssid = nm_access_point_get_ssid (new);
20
15
 
25
20
+               }
26
21
 
27
22
                /* Save this BSSID to seen-bssids list */
28
 
                gconf_connection = applet_get_exported_connection_for_device (device, applet);
29
 
                if (gconf_connection && add_seen_bssid (gconf_connection, new))
30
 
                        nma_gconf_connection_save (gconf_connection);
31
 
        }
32
 
 
33
 
        applet_do_notify_with_pref (applet,
34
 
Index: network-manager-applet-0.7.1.git.2.8ed7940cd3/src/applet.c
 
23
                connection = applet_get_exported_connection_for_device (device, applet);
 
24
Index: network-manager-applet-0.8~a~git.20090830t224938.0334788/src/applet.c
35
25
===================================================================
36
 
--- network-manager-applet-0.7.1.git.2.8ed7940cd3.orig/src/applet.c
37
 
+++ network-manager-applet-0.7.1.git.2.8ed7940cd3/src/applet.c
38
 
@@ -36,16 +36,17 @@
39
 
 #include <strings.h>
40
 
 #include <gtk/gtk.h>
41
 
 #include <glib/gi18n.h>
42
 
 #include "wireless-helper.h"
43
 
 #include <unistd.h>
 
26
--- network-manager-applet-0.8~a~git.20090830t224938.0334788.orig/src/applet.c  2009-08-31 18:35:15.000000000 -0400
 
27
+++ network-manager-applet-0.8~a~git.20090830t224938.0334788/src/applet.c       2009-08-31 18:49:48.000000000 -0400
 
28
@@ -41,6 +41,7 @@
44
29
 #include <sys/socket.h>
45
30
 
46
31
 #include <NetworkManagerVPN.h>
48
33
 #include <nm-device-ethernet.h>
49
34
 #include <nm-device-wifi.h>
50
35
 #include <nm-gsm-device.h>
51
 
 #include <nm-cdma-device.h>
52
 
 #include <nm-device-bt.h>
53
 
 #include <nm-utils.h>
54
 
 #include <nm-connection.h>
55
 
 #include <nm-vpn-connection.h>
56
 
@@ -69,16 +70,29 @@
57
 
 #include "applet-dbus-manager.h"
58
 
 #include "utils.h"
59
 
 #include "gconf-helpers.h"
60
 
 
61
 
 #define NOTIFY_CAPS_ACTIONS_KEY "actions"
 
36
@@ -75,6 +76,19 @@
62
37
 
63
38
 G_DEFINE_TYPE(NMApplet, nma, G_TYPE_OBJECT)
64
39
 
65
40
+struct _OfflineNotificationContextInfo {
66
 
+  NMState state;
67
 
+  NMDeviceState device_state;
68
 
+  NMDeviceStateReason device_state_reason;
69
 
+  NMDeviceType device_type;
70
 
+  gchar* title;
71
 
+  const gchar* text;
72
 
+  const gchar* icon;
73
 
+  NotifyUrgency urgency;
 
41
+       NMState state;
 
42
+       NMDeviceState device_state;
 
43
+       NMDeviceStateReason device_state_reason;
 
44
+       NMDeviceType device_type;
 
45
+       gchar* title;
 
46
+       const gchar* text;
 
47
+       const gchar* icon;
 
48
+       NotifyUrgency urgency;
74
49
+};
75
50
+
76
51
+typedef struct _OfflineNotificationContextInfo OfflineNotificationContextInfo;
78
53
 static NMActiveConnection *
79
54
 applet_get_best_activating_connection (NMApplet *applet, NMDevice **device)
80
55
 {
81
 
        NMActiveConnection *best = NULL;
82
 
        NMDevice *best_dev = NULL;
83
 
        const GPtrArray *connections;
84
 
        int i;
85
 
 
86
 
@@ -1649,27 +1663,130 @@ applet_get_exported_connection_for_devic
87
 
                if (!gconf_connection || !nm_exported_connection_get_connection (NM_EXPORTED_CONNECTION (gconf_connection)))
88
 
                        continue;
89
 
 
90
 
                return gconf_connection;
91
 
        }
 
56
@@ -1656,6 +1670,59 @@
92
57
        return NULL;
93
58
 }
94
59
 
145
110
+       return FALSE;
146
111
+}
147
112
+
148
 
+
149
113
 static void
150
114
 applet_common_device_state_changed (NMDevice *device,
151
115
                                     NMDeviceState new_state,
152
 
                                     NMDeviceState old_state,
153
 
                                     NMDeviceStateReason reason,
154
 
                                     NMApplet *applet)
 
116
@@ -1665,8 +1732,57 @@
155
117
 {
156
118
        NMConnection *connection;
157
119
        NMActiveConnection *active = NULL;
199
161
+                       if (applet->deferred_id)
200
162
+                               g_source_remove (applet->deferred_id);
201
163
+                       applet->deferred_id = g_timeout_add (1000, foo_online_offline_deferred_notify, applet);
202
 
+       
 
164
+
203
165
+                       clear_animation_timeout (applet);
204
166
+               } else {
205
167
+                       g_debug ("old state indicates that this was not a disconnect %d", old_state);
209
171
        case NM_DEVICE_STATE_PREPARE:
210
172
        case NM_DEVICE_STATE_CONFIG:
211
173
        case NM_DEVICE_STATE_NEED_AUTH:
212
 
        case NM_DEVICE_STATE_IP_CONFIG:
213
 
                start_animation_timeout (applet);
214
 
                break;
215
 
        case NM_DEVICE_STATE_ACTIVATED:
216
 
                /* If the device activation was successful, update the corresponding
217
 
@@ -1727,23 +1844,36 @@ foo_device_added_cb (NMClient *client, N
218
 
                                     applet);
219
 
 }
220
 
 
221
 
 static void
222
 
 foo_client_state_changed_cb (NMClient *client, GParamSpec *pspec, gpointer user_data)
 
174
@@ -1734,13 +1850,26 @@
223
175
 {
224
176
        NMApplet *applet = NM_APPLET (user_data);
225
177
 
250
202
        default:
251
203
                break;
252
204
        }
253
 
 
254
 
        applet_schedule_update_icon (applet);
255
 
 }
256
 
 
257
 
 static void
258
 
Index: network-manager-applet-0.7.1.git.2.8ed7940cd3/src/applet.h
 
205
Index: network-manager-applet-0.8~a~git.20090830t224938.0334788/src/applet.h
259
206
===================================================================
260
 
--- network-manager-applet-0.7.1.git.2.8ed7940cd3.orig/src/applet.h
261
 
+++ network-manager-applet-0.7.1.git.2.8ed7940cd3/src/applet.h
262
 
@@ -139,16 +139,19 @@ typedef struct
263
 
        GtkWidget *             wifi_enabled_item;
264
 
        guint           wifi_enabled_toggled_id;
265
 
        GtkWidget *             info_menu_item;
266
 
        GtkWidget *             connections_menu_item;
267
 
 
 
207
--- network-manager-applet-0.8~a~git.20090830t224938.0334788.orig/src/applet.h  2009-08-31 18:35:25.000000000 -0400
 
208
+++ network-manager-applet-0.8~a~git.20090830t224938.0334788/src/applet.h       2009-08-31 18:47:50.000000000 -0400
 
209
@@ -145,6 +145,9 @@
268
210
        GladeXML *              info_dialog_xml;
269
211
        NotifyNotification*     notification;
270
212
        gboolean                notify_with_actions;
274
216
 } NMApplet;
275
217
 
276
218
 typedef void (*AppletNewAutoConnectionCallback) (NMConnection *connection,
277
 
                                                  gboolean created,
278
 
                                                  gboolean canceled,
279
 
                                                  gpointer user_data);
280
 
 
281
 
 struct NMADeviceClass {