CEPage * ce_page_wired_new (NMConnection *connection, GtkWindow *parent_window, NMClient *client, const char **out_secrets_setting_name, GError **error) { CEPageWired *self; CEPageWiredPrivate *priv; self = CE_PAGE_WIRED (ce_page_new (CE_TYPE_PAGE_WIRED, connection, parent_window, client, UIDIR "/ce-page-wired.ui", "WiredPage", _("Wired"))); if (!self) { g_set_error_literal (error, NMA_ERROR, NMA_ERROR_GENERIC, _("Could not load wired user interface.")); return NULL; } wired_private_init (self); priv = CE_PAGE_WIRED_GET_PRIVATE (self); priv->setting = nm_connection_get_setting_wired (connection); if (!priv->setting) { priv->setting = NM_SETTING_WIRED (nm_setting_wired_new ()); nm_connection_add_setting (connection, NM_SETTING (priv->setting)); } g_signal_connect (self, "initialized", G_CALLBACK (finish_setup), NULL); return CE_PAGE (self); }
CEPage * ce_page_wired_new (NMConnection *connection, GtkWindow *parent_window, const char **out_secrets_setting_name, GError **error) { CEPageWired *self; CEPageWiredPrivate *priv; CEPage *parent; self = CE_PAGE_WIRED (g_object_new (CE_TYPE_PAGE_WIRED, CE_PAGE_CONNECTION, connection, CE_PAGE_PARENT_WINDOW, parent_window, NULL)); parent = CE_PAGE (self); parent->xml = glade_xml_new (GLADEDIR "/ce-page-wired.glade", "WiredPage", NULL); if (!parent->xml) { g_set_error (error, 0, 0, "%s", _("Could not load wired user interface.")); g_object_unref (self); return NULL; } parent->page = glade_xml_get_widget (parent->xml, "WiredPage"); if (!parent->page) { g_set_error (error, 0, 0, "%s", _("Could not load wired user interface.")); g_object_unref (self); return NULL; } g_object_ref_sink (parent->page); parent->title = g_strdup (_("Wired")); wired_private_init (self); priv = CE_PAGE_WIRED_GET_PRIVATE (self); priv->setting = (NMSettingWired *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED); if (!priv->setting) { priv->setting = NM_SETTING_WIRED (nm_setting_wired_new ()); nm_connection_add_setting (connection, NM_SETTING (priv->setting)); } g_signal_connect (self, "initialized", G_CALLBACK (finish_setup), NULL); return CE_PAGE (self); }