~ubuntu-branches/ubuntu/utopic/network-manager-applet/utopic-proposed

« 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: 2014-01-06 22:29:40 UTC
  • mfrom: (1.2.35) (0.5.25 sid)
  • Revision ID: package-import@ubuntu.com-20140106222940-kxvsf0nrqhukudst
Tags: 0.9.8.4-1ubuntu1
* Merge changes from Debian, remaining changes:
  - Don't keep a postinst script; we don't need to worry about migration
    from versions prior to 0.9.0.
  - Build-Depend on dh-translations, libappindicator3-dev, docbook-to-man.
  - Different Descriptions for libnm-gtk packages.
  - debian/rules: ship extra icons, use --enable-indicators, export
    translations for Launchpad and fail if any files are missing from
    .install files, or not being installed.
  - debian/rules: use -delete to remove .la/.a files.
  - No notice about netdev group in README.Debian.
  - 11-user-connections.patch: don't use this patch, keep secrets system-wide
    as meant by upstream.
  - 12-force-online.patch: don't use this patch, we deal with the online
    state a different way...
  - lp289466_always_show_tray_icon.patch: always show the tray icon, even
    if NM is not running.
  - lp328572-dxteam-connect-text.patch,
    lp330571_dxteam_wired_connect_text.patch,
    lp330608_dxteam_gsm_connect_text.patch: update notification text to be
    prettier.
  - lp341684_device_sensitive_disconnect_notify.patch: show correct
    notification messages for disconnect events, to be in line with the other
    *connect*text patches.
  - lp460144_correctly_update_notification.patch: cleaner notification
    messages, and allow for messages to be updated instead of cleared.
  - applet-wifi-menu-before-vpn.patch: show Create New and Connect to Hidden
    wifi menu items with the other Wifi items, rather than separated by
    the VPN menus.
  - clear-notification-actions.patch: clear notification actions before
    adding new ones, to not append extra "Don't show this again" buttons.
  - key-certificate-extensions.patch: allow for the extra certificate file
    extension ".key".
  - lp829673_gconf_hide_applet.patch: allow for a gsettings key that disables
    ever showing the applet on the notification area.
  - nm-applet-use-indicator.patch: patch to support showing nm-applet as an
    appindicator in Unity.
  - position_dialogs_to_center_of_the_screen.patch: position dialogs to the
    center of the screen.
  - make_menu_items_insensitive_based_on_permissions.patch,
    hide_policy_items_env_var.patch: provide a method to desensitize or hide
    menu items which are useless given the current policykit policy level of
    the user.
  - applet_adhoc_use_wpa_rsn_part1.patch: enable Ad-Hoc using WPA RSN.
  - lp1048516_dont_req_keyring_in_greeter.patch: don't try to load the
    keyring if the user has no permissions to edit their own connections.
  - lp1048520_delay_pin_dialog_in_greeter.patch: only ask for PIN entry when
    a connection is being established rather than when a modem is detected.
  - rebuild_menu_after_init.patch: force a rebuild of the menu to avoid it
    staying empty on login.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 the user actually activates a connection instead of on modem detect.
4
4
 
5
5
---
6
 
 src/applet-device-gsm.c |  126 ++++++++++++++++++++++++++++++++++++++++++++++--
7
 
 1 file changed, 122 insertions(+), 4 deletions(-)
 
6
 src/applet-device-gsm.c |  128 ++++++++++++++++++++++++++++++++++++++++++++++--
 
7
 1 file changed, 123 insertions(+), 5 deletions(-)
8
8
 
9
9
Index: b/src/applet-device-gsm.c
10
10
===================================================================
11
11
--- a/src/applet-device-gsm.c
12
12
+++ b/src/applet-device-gsm.c
13
 
@@ -97,8 +97,11 @@ typedef struct {
 
13
@@ -96,6 +96,8 @@ typedef struct {
 
14
        gboolean skip_reg_poll;
 
15
        gboolean skip_signal_poll;
 
16
 
 
17
+       gboolean greeter_mode;
 
18
+
14
19
        /* Unlock dialog stuff */
15
20
        GtkWidget *dialog;
16
 
        gpointer keyring_id;
17
 
+
18
 
+       gboolean greeter_mode;
19
 
 } GsmDeviceInfo;
 
21
        GCancellable *cancellable;
 
22
@@ -103,6 +105,7 @@ typedef struct {
20
23
 
21
 
+static void unlock_dialog_new (NMDevice *device, GsmDeviceInfo *info);
22
24
 static void unlock_dialog_destroy (GsmDeviceInfo *info);
23
25
 static void check_start_polling (GsmDeviceInfo *info);
 
26
+static void unlock_dialog_new (NMDevice *device, GsmDeviceInfo *info);
24
27
 
25
 
@@ -193,10 +196,117 @@ applet_gsm_connect_network (NMApplet *ap
 
28
 typedef struct {
 
29
        NMApplet *applet;
 
30
@@ -195,10 +198,117 @@ applet_gsm_connect_network (NMApplet *ap
26
31
        }
27
32
 }
28
33
 
140
145
 
141
146
        applet_menu_item_activate_helper (info->device,
142
147
                                          info->connection,
143
 
@@ -879,8 +989,10 @@ keyring_pin_check_cb (GnomeKeyringResult
144
 
        info->keyring_id = NULL;
 
148
@@ -887,9 +997,11 @@ keyring_pin_check_cb (GObject *source,
 
149
        list = secret_service_search_finish (NULL, result, &error);
145
150
 
146
 
        if (result != GNOME_KEYRING_RESULT_OK) {
 
151
        if (!list) {
147
152
-               /* No saved PIN, just ask the user */
148
153
-               unlock_dialog_new (info->device, info);
 
154
-               g_clear_error (&error);
149
155
+               if (!info->greeter_mode) {
150
156
+                       /* No saved PIN, just ask the user */
151
157
+                       unlock_dialog_new (info->device, info);
 
158
+                       g_clear_error (&error);
152
159
+               }
153
160
                return;
154
161
        }
155
162
 
156
 
@@ -962,8 +1074,10 @@ simid_reply (DBusGProxy *proxy, DBusGPro
157
 
                                                                      info->devid,
158
 
                                                                      NULL);
 
163
@@ -967,8 +1079,10 @@ simid_reply (DBusGProxy *proxy, DBusGPro
 
164
                                               info->cancellable, keyring_pin_check_cb, info);
 
165
                        g_hash_table_unref (attrs);
159
166
                } else {
160
167
-                       /* Couldn't get a device ID, but unlock required; present dialog */
161
168
-                       unlock_dialog_new (info->device, info);
166
173
                }
167
174
        }
168
175
 
169
 
@@ -1207,6 +1321,10 @@ gsm_device_added (NMDevice *device, NMAp
170
 
        info->device = device;
 
176
@@ -1213,6 +1327,10 @@ gsm_device_added (NMDevice *device, NMAp
171
177
        info->bus = bus;
 
178
        info->cancellable = g_cancellable_new ();
172
179
 
173
180
+       info->greeter_mode = FALSE;
174
181
+       if (getenv ("INDICATOR_GREETER_MODE"))