WirelessSecurityWPAEAP *
ws_wpa_eap_new (NMConnection *connection,
                gboolean is_editor,
                gboolean secrets_only)
{
	WirelessSecurity *parent;
	GtkWidget *widget;

	parent = wireless_security_init (sizeof (WirelessSecurityWPAEAP),
	                                 validate,
	                                 add_to_size_group,
	                                 fill_connection,
	                                 update_secrets,
	                                 destroy,
	                                 "/org/cinnamon/control-center/network/ws-wpa-eap.ui",
	                                 "wpa_eap_notebook",
	                                 NULL);
	if (!parent)
		return NULL;

	parent->adhoc_compatible = FALSE;
	parent->hotspot_compatible = FALSE;

	widget = ws_802_1x_auth_combo_init (parent,
	                                    "wpa_eap_auth_combo",
	                                    "wpa_eap_auth_label",
	                                    (GCallback) auth_combo_changed_cb,
	                                    connection,
	                                    is_editor,
	                                    secrets_only);
	auth_combo_changed_cb (widget, parent);

	return (WirelessSecurityWPAEAP *) parent;
}
WirelessSecurityDynamicWEP *
ws_dynamic_wep_new (NMConnection *connection,
                    gboolean is_editor,
                    gboolean secrets_only)
{
	WirelessSecurity *parent;
	GtkWidget *widget;

	parent = wireless_security_init (sizeof (WirelessSecurityDynamicWEP),
	                                 validate,
	                                 add_to_size_group,
	                                 fill_connection,
	                                 update_secrets,
	                                 destroy,
	                                 "/org/gnome/control-center/network/ws-dynamic-wep.ui",
	                                 "dynamic_wep_notebook",
	                                 NULL);
	if (!parent)
		return NULL;

	parent->nag_user = nag_user;
	parent->adhoc_compatible = FALSE;

	widget = ws_802_1x_auth_combo_init (parent,
	                                    "dynamic_wep_auth_combo",
	                                    "dynamic_wep_auth_label",
	                                    (GCallback) auth_combo_changed_cb,
	                                    connection,
	                                    is_editor,
	                                    secrets_only);
	auth_combo_changed_cb (widget, (gpointer) parent);

	return (WirelessSecurityDynamicWEP *) parent;
}
Exemplo n.º 3
0
WirelessSecurityWPAEAP *
ws_wpa_eap_new (NMConnection *connection)
{
	WirelessSecurityWPAEAP *sec;
	GtkWidget *widget;

	sec = g_slice_new0 (WirelessSecurityWPAEAP);
	if (!wireless_security_init (WIRELESS_SECURITY (sec), validate, add_to_size_group,
				     fill_connection, destroy, "wpa-eap.ui", "wpa_eap_notebook")) {
	  g_slice_free (WirelessSecurityWPAEAP, sec);
	  return NULL;
	}

	WIRELESS_SECURITY (sec)->nag_user = nag_user;

	widget = ws_802_1x_auth_combo_init (WIRELESS_SECURITY (sec),
	                                    "wpa_eap_auth_combo",
	                                    (GCallback) auth_combo_changed_cb,
	                                    connection);
	auth_combo_changed_cb (widget, (gpointer) sec);

	return sec;
}