~khurshid-alam/unity-control-center/libnm-port-test

« back to all changes in this revision

Viewing changes to panels/network/connection-editor/ce-page-security.c

  • Committer: Khurshid Alam
  • Date: 2018-06-05 14:47:56 UTC
  • Revision ID: khurshid.alam@linuxmail.org-20180605144756-or0tftb2kddhvhq2
Update connection editor pages and wireless security from Gnome-3.26

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
#include "wireless-security.h"
30
30
#include "ce-page-security.h"
31
 
#include "firewall-helpers.h"
32
31
 
33
32
G_DEFINE_TYPE (CEPageSecurity, ce_page_security, CE_TYPE_PAGE)
34
33
 
148
147
                        gtk_container_remove (GTK_CONTAINER (parent), sec_widget);
149
148
 
150
149
                gtk_size_group_add_widget (page->group, page->security_heading);
151
 
                gtk_size_group_add_widget (page->group, page->firewall_heading);
152
150
                wireless_security_add_to_size_group (sec, page->group);
153
151
 
154
152
                gtk_container_add (GTK_CONTAINER (vbox), sec_widget);
205
203
        NMConnection *connection = CE_PAGE (page)->connection;
206
204
        NMSettingWireless *sw;
207
205
        NMSettingWirelessSecurity *sws;
208
 
        NMSettingConnection *sc;
209
206
        gboolean is_adhoc = FALSE;
210
207
        GtkListStore *sec_model;
211
208
        GtkTreeIter iter;
241
238
        if (sws)
242
239
                default_type = get_default_type_for_security (sws);
243
240
 
244
 
        sec_model = gtk_list_store_new (3, G_TYPE_STRING, wireless_security_get_type (), G_TYPE_BOOLEAN);
 
241
        sec_model = gtk_list_store_new (3, G_TYPE_STRING, WIRELESS_TYPE_SECURITY, G_TYPE_BOOLEAN);
245
242
 
246
243
        if (nm_utils_security_valid (NMU_SEC_NONE, dev_caps, FALSE, is_adhoc, 0, 0, 0)) {
247
244
                gtk_list_store_insert_with_values (sec_model, &iter, -1,
352
349
 
353
350
        page->security_combo = combo;
354
351
 
355
 
        page->firewall_heading = GTK_WIDGET (gtk_builder_get_object (CE_PAGE (page)->builder, "heading_zone"));
356
 
        page->firewall_combo = GTK_COMBO_BOX (gtk_builder_get_object (CE_PAGE (page)->builder, "combo_zone"));
357
 
 
358
 
        sc = nm_connection_get_setting_connection (CE_PAGE (page)->connection);
359
 
        firewall_ui_setup (sc, GTK_WIDGET (page->firewall_combo), page->firewall_heading, CE_PAGE (page)->cancellable);
360
 
        g_signal_connect_swapped (page->firewall_combo, "changed", G_CALLBACK (ce_page_changed), page);
361
 
 
362
352
        security_combo_changed (combo, page);
363
353
        g_signal_connect (combo, "changed",
364
354
                          G_CALLBACK (security_combo_changed), page);
370
360
          GError       **error)
371
361
{
372
362
        NMSettingWireless *sw;
373
 
        NMSettingConnection *sc;
374
363
        WirelessSecurity *sec;
375
364
        gboolean valid = FALSE;
376
365
        const char *mode;
413
402
                valid = TRUE;
414
403
        }
415
404
 
416
 
        sc = nm_connection_get_setting_connection (connection);
417
 
        firewall_ui_to_setting (sc, GTK_WIDGET (CE_PAGE_SECURITY (page)->firewall_combo));
418
 
 
419
405
        return valid;
420
406
}
421
407