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

« back to all changes in this revision

Viewing changes to debian/patches/lp1048520_delay_pin_dialog_in_greeter.patch

  • Committer: Package Import Robot
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2013-02-05 16:15:00 UTC
  • mfrom: (1.2.33)
  • Revision ID: package-import@ubuntu.com-20130205161500-nax1yrh7klr0o8ir
Tags: 0.9.7.995+git201301311844.0376019-0ubuntu1
* upstream snapshot 2013-01-31 18:44:13 (GMT)
  + 03760194e54eaeaf493e9b45c4835e84524d8650
* debian/patches/nm-applet-use-indicator.patch: refreshed.
* debian/patches/lp1048516_dont_req_keyring_in_greeter.patch: refreshed.
* debian/patches/lp289466_always_show_tray_icon.patch: refreshed.
* debian/patches/lp829673_gconf_hide_applet.patch: refreshed.
* debian/patches/position_dialogs_to_center_of_the_screen.patch: refreshed.
* debian/patches/hide_policy_items_env_var.patch: refreshed.
* debian/patches/lp1048520_delay_pin_dialog_in_greeter.patch: refreshed.
* debian/patches/nm-applet-use-indicator.patch: fix the addition of separator
  menu items to avoid multiple separators added in a block.
* debian/control: bump network-manager Depends and Build-Depends to the
  appropriate snapshot version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
Subject: Delay showing the pin dialog in greeter mode; only show it when
3
3
 the user actually activates a connection instead of on modem detect.
4
4
 
 
5
---
 
6
 src/applet-device-gsm.c |  126 ++++++++++++++++++++++++++++++++++++++++++++++--
 
7
 1 file changed, 122 insertions(+), 4 deletions(-)
 
8
 
5
9
Index: b/src/applet-device-gsm.c
6
10
===================================================================
7
11
--- a/src/applet-device-gsm.c
8
12
+++ b/src/applet-device-gsm.c
9
 
@@ -95,8 +95,11 @@ typedef struct {
 
13
@@ -97,8 +97,11 @@ typedef struct {
10
14
        /* Unlock dialog stuff */
11
15
        GtkWidget *dialog;
12
16
        gpointer keyring_id;
18
22
 static void unlock_dialog_destroy (GsmDeviceInfo *info);
19
23
 static void check_start_polling (GsmDeviceInfo *info);
20
24
 
21
 
@@ -280,10 +283,117 @@ applet_gsm_connect_network (NMApplet *ap
22
 
        do_mobile_wizard (dbus_connect_3g_cb, info);
 
25
@@ -193,10 +196,117 @@ applet_gsm_connect_network (NMApplet *ap
 
26
        }
23
27
 }
24
28
 
25
29
+typedef struct {
33
37
+gboolean delayed_activation_cb(gpointer user_data)
34
38
+{
35
39
+       DelayedActivationHelper *helper = user_data;
36
 
+       
 
40
+
37
41
+       if (!NM_IS_DEVICE (helper->device)) {
38
42
+               // the device has been unplugged.
39
43
+               return FALSE;
52
56
+               return FALSE;
53
57
+       }
54
58
+
55
 
+       helper->wait_retry -= 1; 
 
59
+       helper->wait_retry -= 1;
56
60
+       if (helper->wait_retry == 0) {
57
61
+               return FALSE;
58
62
+       }
66
70
+       GSMMenuItemInfo *info = (GSMMenuItemInfo *) user_data;
67
71
+       GsmDeviceInfo *devinfo;
68
72
+       DelayedActivationHelper *helper;
69
 
+       
 
73
+
70
74
+       /*
71
75
+        * The dialog is destroyed. Either the PIN code was successfully
72
76
+        * forwarded to ModemManager or the dialog was cancelled.
114
118
+               /* We need to delay the activation until the modem is unlocked. */
115
119
+
116
120
+               unlock_dialog_new(devinfo->device, devinfo);
117
 
+               /* 
 
121
+               /*
118
122
+                * The dialog gets destroyed if
119
123
+                *
120
124
+                * A) User enters the correct PIN and ModemManager tells nm-applet
126
130
+                *
127
131
+                *    All this happens in the dialogs response handler or callback that
128
132
+                *    handles the PIN activation return value from ModemManager.
129
 
+                *    See the relevant functions later in this file. 
 
133
+                *    See the relevant functions later in this file.
130
134
+                *
131
135
+                * B) The user cancels the dialog.
132
136
+                */
136
140
 
137
141
        applet_menu_item_activate_helper (info->device,
138
142
                                          info->connection,
139
 
@@ -1395,8 +1505,10 @@ keyring_pin_check_cb (GnomeKeyringResult
 
143
@@ -879,8 +989,10 @@ keyring_pin_check_cb (GnomeKeyringResult
140
144
        info->keyring_id = NULL;
141
145
 
142
146
        if (result != GNOME_KEYRING_RESULT_OK) {
149
153
                return;
150
154
        }
151
155
 
152
 
@@ -1478,8 +1590,10 @@ simid_reply (DBusGProxy *proxy, DBusGPro
 
156
@@ -962,8 +1074,10 @@ simid_reply (DBusGProxy *proxy, DBusGPro
153
157
                                                                      info->devid,
154
158
                                                                      NULL);
155
159
                } else {
162
166
                }
163
167
        }
164
168
 
165
 
@@ -1721,6 +1835,10 @@ gsm_device_added (NMDevice *device, NMAp
 
169
@@ -1207,6 +1321,10 @@ gsm_device_added (NMDevice *device, NMAp
166
170
        info->device = device;
167
171
        info->bus = bus;
168
172