Skip to content

Commit

Permalink
network: Could not load editor VPN plugin warning (#346)
Browse files Browse the repository at this point in the history
Produces warning using the same format as nm-connection-editor
when a VPN connection editor plugin cannot be loaded.
  • Loading branch information
dkosovic authored Nov 26, 2024
1 parent 8f1dd1e commit b44d9ec
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion panels/network/connection-editor/ce-page-vpn.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,22 @@ load_vpn_plugin (CEPageVpn *page, NMConnection *connection)
{
CEPage *parent = CE_PAGE (page);
GtkWidget *ui_widget, *failure;
GError *err = NULL;

page->editor = nm_vpn_editor_plugin_get_editor (page->plugin,
connection,
NULL);
&err);
ui_widget = NULL;
if (page->editor)
ui_widget = GTK_WIDGET (nm_vpn_editor_get_widget (page->editor));

if (!ui_widget) {
g_clear_object (&page->editor);
page->plugin = NULL;
g_warning ("Could not load editor VPN plugin for '%s' (%s).",
nm_setting_vpn_get_service_type (nm_connection_get_setting_vpn (connection)),
err ? err->message : "Unknown error");
g_error_free (err);
return;
}
vpn_cinnamonify_editor (ui_widget);
Expand Down

0 comments on commit b44d9ec

Please sign in to comment.