~ubuntu-branches/ubuntu/precise/network-manager-applet/precise

« back to all changes in this revision

Viewing changes to src/connection-editor/page-wireless-security.c

  • Committer: Package Import Robot
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2012-03-14 16:03:22 UTC
  • mfrom: (1.2.27)
  • Revision ID: package-import@ubuntu.com-20120314160322-wdd419cyddzw00ib
Tags: 0.9.3.995+git.20120313t141231.c89224f-0ubuntu1
* upstream snapshot 2012-03-13 14:12:31 (GMT)
  + c89224f42f7cee4fca7369a890011a67350d8ff6
  - Freeze Exception: (LP: #953123)
  - Adding EAP-FAST support in UI.
  - mobile-wizard: fix sensitizing providers' list (LP: #894249)
* debian/patches/lp912150_lazy_notify_init.patch: dropped, applied upstream.
* debian/patches/lp330571_dxteam_wired_connect_text.patch: refreshed.
* debian/patches/lp330608_dxteam_gsm_connect_text.patch: refreshed.
* debian/patches/nm-applet-use-indicator.patch: refreshed.
* debian/patches/no_Werror.patch: dropped, applied upstream.
* debian/rules: pass --enable-more-warnings=no to retain the same behavior as
  with the no_Werror.patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
155
155
        sec = wireless_security_combo_get_active (self);
156
156
        if (sec) {
157
157
                GtkWidget *sec_widget;
158
 
                GtkWidget *widget;
 
158
                GtkWidget *widget, *parent;
159
159
 
160
160
                sec_widget = wireless_security_get_widget (sec);
161
161
                g_assert (sec_widget);
162
 
                gtk_widget_unparent (sec_widget);
 
162
                parent = gtk_widget_get_parent (sec_widget);
 
163
                if (parent)
 
164
                        gtk_container_remove (GTK_CONTAINER (parent), sec_widget);
163
165
 
164
166
                widget = GTK_WIDGET (gtk_builder_get_object (CE_PAGE (self)->builder, "wireless_security_combo_label"));
165
167
                gtk_size_group_add_widget (self->group, widget);
206
208
        if (error)
207
209
                return;
208
210
 
209
 
        s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
 
211
        s_wireless = nm_connection_get_setting_wireless (connection);
210
212
        g_assert (s_wireless);
211
213
 
212
214
        combo = GTK_COMBO_BOX (GTK_WIDGET (gtk_builder_get_object (parent->builder, "wireless_security_combo")));
222
224
        if (mode && !strcmp (mode, "adhoc"))
223
225
                is_adhoc = TRUE;
224
226
 
225
 
        s_wireless_sec = NM_SETTING_WIRELESS_SECURITY (nm_connection_get_setting (connection, 
226
 
                                                       NM_TYPE_SETTING_WIRELESS_SECURITY));
 
227
        s_wireless_sec = nm_connection_get_setting_wireless_security (connection);
227
228
 
228
229
        security = nm_setting_wireless_get_security (s_wireless);
229
230
        if (!security || strcmp (security, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME))
250
251
                if (default_type == NMU_SEC_STATIC_WEP) {
251
252
                        NMSettingWirelessSecurity *s_wsec;
252
253
 
253
 
                        s_wsec = (NMSettingWirelessSecurity *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY);
 
254
                        s_wsec = nm_connection_get_setting_wireless_security (connection);
254
255
                        if (s_wsec)
255
256
                                wep_type = nm_setting_wireless_security_get_wep_key_type (s_wsec);
256
257
                        if (wep_type == NM_WEP_KEY_TYPE_UNKNOWN)
355
356
        NMUtilsSecurityType default_type = NMU_SEC_NONE;
356
357
        const char *security;
357
358
 
358
 
        s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
 
359
        s_wireless = nm_connection_get_setting_wireless (connection);
359
360
        if (!s_wireless) {
360
 
                g_set_error_literal (error, 0, 0, _("Could not load WiFi security user interface; missing WiFi setting."));
 
361
                g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("Could not load WiFi security user interface; missing WiFi setting."));
361
362
                return NULL;
362
363
        }
363
364
 
369
370
                                                       "WirelessSecurityPage",
370
371
                                                       _("Wireless Security")));
371
372
        if (!self) {
372
 
                g_set_error_literal (error, 0, 0, _("Could not load WiFi security user interface."));
 
373
                g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("Could not load WiFi security user interface."));
373
374
                return NULL;
374
375
        }
375
376
 
376
377
        self->group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
377
378
 
378
 
        s_wsec = NM_SETTING_WIRELESS_SECURITY (nm_connection_get_setting (connection, 
379
 
                                               NM_TYPE_SETTING_WIRELESS_SECURITY));
 
379
        s_wsec = nm_connection_get_setting_wireless_security (connection);
380
380
 
381
381
        security = nm_setting_wireless_get_security (s_wireless);
382
382
        if (!security || strcmp (security, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME))
434
434
        WirelessSecurity *sec;
435
435
        gboolean valid = FALSE;
436
436
 
437
 
        s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
 
437
        s_wireless = nm_connection_get_setting_wireless (connection);
438
438
        g_assert (s_wireless);
439
439
 
440
440
        sec = wireless_security_combo_get_active (self);
447
447
                        if (valid)
448
448
                                wireless_security_fill_connection (sec, connection);
449
449
                        else
450
 
                                g_set_error (error, 0, 0, "Invalid wireless security");
 
450
                                g_set_error (error, NMA_ERROR, NMA_ERROR_GENERIC, "Invalid wireless security");
451
451
                } else
452
 
                        g_set_error (error, 0, 0, "Missing SSID");
 
452
                        g_set_error (error, NMA_ERROR, NMA_ERROR_GENERIC, "Missing SSID");
453
453
        } else {
454
454
                /* No security, unencrypted */
455
455
                g_object_set (s_wireless, NM_SETTING_WIRELESS_SEC, NULL, NULL);