~network-manager/network-manager-applet/ubuntu.quantal

« back to all changes in this revision

Viewing changes to debian/patches/lp1048520_delay_pin_dialog_in_greeter.patch

  • Committer: Antti Kaijanmäki
  • Date: 2012-09-27 20:02:58 UTC
  • mto: This revision was merged to the branch mainline in revision 370.
  • Revision ID: antti.kaijanmaki@canonical.com-20120927200258-lshpwl3o4n4lhboi
* Make Wi-Fi networks the user can't connect to insensitive. (LP:#1048586)
* Split out the detection of Greeter Mode to it's own patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
===================================================================
7
7
--- a/src/applet-device-gsm.c
8
8
+++ b/src/applet-device-gsm.c
9
 
@@ -95,8 +95,11 @@ typedef struct {
10
 
        /* Unlock dialog stuff */
11
 
        GtkWidget *dialog;
 
9
@@ -97,6 +97,7 @@ typedef struct {
12
10
        gpointer keyring_id;
13
 
+
14
 
+       gboolean greeter_mode;
15
11
 } GsmDeviceInfo;
16
12
 
17
13
+static void unlock_dialog_new (NMDevice *device, GsmDeviceInfo *info);
18
14
 static void unlock_dialog_destroy (GsmDeviceInfo *info);
19
15
 static void check_start_polling (GsmDeviceInfo *info);
20
16
 
21
 
@@ -280,10 +283,117 @@ applet_gsm_connect_network (NMApplet *ap
 
17
@@ -280,10 +281,117 @@ applet_gsm_connect_network (NMApplet *ap
22
18
        do_mobile_wizard (dbus_connect_3g_cb, info);
23
19
 }
24
20
 
109
105
+       GsmDeviceInfo *devinfo;
110
106
+
111
107
+       devinfo = g_object_get_data (G_OBJECT (info->device), "devinfo");
112
 
+       if (devinfo->greeter_mode && devinfo->unlock_required != NULL) {
 
108
+       if (devinfo->applet->greeter_mode && devinfo->unlock_required != NULL) {
113
109
+
114
110
+               /* We need to delay the activation until the modem is unlocked. */
115
111
+
136
132
 
137
133
        applet_menu_item_activate_helper (info->device,
138
134
                                          info->connection,
139
 
@@ -1395,8 +1505,10 @@ keyring_pin_check_cb (GnomeKeyringResult
 
135
@@ -1395,8 +1503,10 @@ keyring_pin_check_cb (GnomeKeyringResult
140
136
        info->keyring_id = NULL;
141
137
 
142
138
        if (result != GNOME_KEYRING_RESULT_OK) {
143
139
-               /* No saved PIN, just ask the user */
144
140
-               unlock_dialog_new (info->device, info);
145
 
+               if (!info->greeter_mode) {
 
141
+               if (!info->applet->greeter_mode) {
146
142
+                       /* No saved PIN, just ask the user */
147
143
+                       unlock_dialog_new (info->device, info);
148
144
+               }
149
145
                return;
150
146
        }
151
147
 
152
 
@@ -1478,8 +1590,10 @@ simid_reply (DBusGProxy *proxy, DBusGPro
 
148
@@ -1478,8 +1588,10 @@ simid_reply (DBusGProxy *proxy, DBusGPro
153
149
                                                                      info->devid,
154
150
                                                                      NULL);
155
151
                } else {
156
152
-                       /* Couldn't get a device ID, but unlock required; present dialog */
157
153
-                       unlock_dialog_new (info->device, info);
158
 
+                       if (!info->greeter_mode) {
 
154
+                       if (!info->applet->greeter_mode) {
159
155
+                               /* Couldn't get a device ID, but unlock required; present dialog */
160
156
+                               unlock_dialog_new (info->device, info);
161
157
+                       }
162
158
                }
163
159
        }
164
160
 
165
 
@@ -1721,6 +1835,10 @@ gsm_device_added (NMDevice *device, NMAp
166
 
        info->device = device;
167
 
        info->bus = bus;
168
 
 
169
 
+       info->greeter_mode = FALSE;
170
 
+       if (getenv ("INDICATOR_GREETER_MODE"))
171
 
+               info->greeter_mode = TRUE;
172
 
+
173
 
        info->props_proxy = dbus_g_proxy_new_for_name (info->bus,
174
 
                                                       "org.freedesktop.ModemManager",
175
 
                                                       udi,