network: Fix crash creating a VPN

The listing of VPN plugins was done using the nm-glib API instead of the
new libnm 1.2 one.

https://bugzilla.gnome.org/show_bug.cgi?id=767614
This commit is contained in:
Bastien Nocera 2016-06-13 16:56:27 +02:00
parent 7d21e69d65
commit 2a7b19202b

View file

@ -743,13 +743,14 @@ select_vpn_type (NetConnectionEditor *editor, GtkListBox *list)
/* Add the VPN types */
for (iter = vpn_plugins; iter; iter = iter->next) {
NMVpnEditorPlugin *plugin = nm_vpn_plugin_info_get_editor_plugin (iter->data);
char *name, *desc, *desc_markup, *service_name;
GtkStyleContext *context;
g_object_get (iter->data,
"name", &name,
"desc", &desc,
"service", &service_name,
g_object_get (plugin,
NM_VPN_EDITOR_PLUGIN_NAME, &name,
NM_VPN_EDITOR_PLUGIN_DESCRIPTION, &desc,
NM_VPN_EDITOR_PLUGIN_SERVICE, &service_name,
NULL);
desc_markup = g_markup_printf_escaped ("<span size='smaller'>%s</span>", desc);