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 */
9
@@ -97,6 +97,7 @@ typedef struct {
12
10
gpointer keyring_id;
14
+ gboolean greeter_mode;
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);
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);
109
105
+ GsmDeviceInfo *devinfo;
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) {
114
110
+ /* We need to delay the activation until the modem is unlocked. */
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;
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);
152
@@ -1478,8 +1590,10 @@ simid_reply (DBusGProxy *proxy, DBusGPro
148
@@ -1478,8 +1588,10 @@ simid_reply (DBusGProxy *proxy, DBusGPro
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);
165
@@ -1721,6 +1835,10 @@ gsm_device_added (NMDevice *device, NMAp
166
info->device = device;
169
+ info->greeter_mode = FALSE;
170
+ if (getenv ("INDICATOR_GREETER_MODE"))
171
+ info->greeter_mode = TRUE;
173
info->props_proxy = dbus_g_proxy_new_for_name (info->bus,
174
"org.freedesktop.ModemManager",