diff --git a/clients/tui/Makefile.am b/clients/tui/Makefile.am index e92ab772c0..18f2b37b96 100644 --- a/clients/tui/Makefile.am +++ b/clients/tui/Makefile.am @@ -85,8 +85,6 @@ nmtui_SOURCES = \ nmt-page-ip4.h \ nmt-page-ip6.c \ nmt-page-ip6.h \ - nmt-page-main.c \ - nmt-page-main.h \ nmt-page-ppp.c \ nmt-page-ppp.h \ nmt-page-team.c \ diff --git a/clients/tui/nmt-editor.c b/clients/tui/nmt-editor.c index bd1c77e339..29fb529e78 100644 --- a/clients/tui/nmt-editor.c +++ b/clients/tui/nmt-editor.c @@ -34,9 +34,26 @@ #include "nmtui.h" #include "nm-editor-utils.h" -#include "nmt-page-main.h" #include "nmt-utils.h" +#include "nmt-device-entry.h" +#include "nmt-mac-entry.h" +#include "nmt-mtu-entry.h" + +#include "nmt-page-bond.h" +#include "nmt-page-bridge.h" +#include "nmt-page-bridge-port.h" +#include "nmt-page-dsl.h" +#include "nmt-page-ethernet.h" +#include "nmt-page-infiniband.h" +#include "nmt-page-ip4.h" +#include "nmt-page-ip6.h" +#include "nmt-page-ppp.h" +#include "nmt-page-team.h" +#include "nmt-page-team-port.h" +#include "nmt-page-vlan.h" +#include "nmt-page-wifi.h" + G_DEFINE_TYPE (NmtEditor, nmt_editor, NMT_TYPE_NEWT_FORM) #define NMT_EDITOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NMT_TYPE_EDITOR, NmtEditorPrivate)) @@ -217,12 +234,88 @@ build_edit_connection (NMConnection *orig_connection) return edit_connection; } +static gboolean +permissions_transform_to_allusers (GBinding *binding, + const GValue *source_value, + GValue *target_value, + gpointer user_data) +{ + char **perms = g_value_get_boxed (source_value); + + g_value_set_boolean (target_value, g_strv_length (perms) == 0); + return TRUE; +} + +static gboolean +permissions_transform_from_allusers (GBinding *binding, + const GValue *source_value, + GValue *target_value, + gpointer user_data) +{ + gboolean allusers = g_value_get_boolean (source_value); + char **perms = NULL; + + if (allusers) { + perms = g_new (char *, 2); + + perms[0] = g_strdup_printf ("user:%s:", g_get_user_name ()); + perms[1] = NULL; + } + g_value_take_boxed (target_value, perms); + return TRUE; +} + +static NmtNewtWidget * +add_section_for_page (NmtEditorGrid *grid, NmtNewtWidget *widget) +{ + NmtEditorPage *page; + NmtNewtWidget *section, *header, *toggle; + + g_return_val_if_fail (NMT_IS_EDITOR_PAGE (widget), NULL); + g_return_val_if_fail (nmt_newt_widget_get_parent (widget) == NULL, NULL); + + page = NMT_EDITOR_PAGE (widget); + + section = nmt_newt_section_new (TRUE); + + toggle = nmt_newt_toggle_button_new (_("Hide"), _("Show")); + + header = nmt_editor_grid_new (); + nmt_editor_grid_append (NMT_EDITOR_GRID (header), + nmt_editor_page_get_title (page), + nmt_editor_page_get_header_widget (page), + toggle); + nmt_editor_grid_set_row_flags (NMT_EDITOR_GRID (header), + nmt_editor_page_get_header_widget (page), + NMT_EDITOR_GRID_ROW_LABEL_ALIGN_LEFT | + NMT_EDITOR_GRID_ROW_EXTRA_ALIGN_RIGHT); + nmt_newt_section_set_header (NMT_NEWT_SECTION (section), header); + + nmt_newt_section_set_body (NMT_NEWT_SECTION (section), widget); + + g_object_bind_property (toggle, "active", + section, "open", + G_BINDING_SYNC_CREATE); + + if (nmt_editor_page_show_by_default (page) || !nmt_newt_widget_get_valid (section)) + nmt_newt_toggle_button_set_active (NMT_NEWT_TOGGLE_BUTTON (toggle), TRUE); + + nmt_editor_grid_append (grid, NULL, section, NULL); + return section; +} + static void nmt_editor_constructed (GObject *object) { NmtEditor *editor = NMT_EDITOR (object); NmtEditorPrivate *priv = NMT_EDITOR_GET_PRIVATE (editor); - NmtNewtWidget *vbox, *buttons, *page; + NMSettingConnection *s_con; + NmtNewtWidget *vbox, *widget, *buttons; + NmtEditorGrid *grid; + const char *deventry_label; + NmtDeviceEntry *deventry; + GType hardware_type; + const char *slave_type; if (G_OBJECT_CLASS (nmt_editor_parent_class)->constructed) G_OBJECT_CLASS (nmt_editor_parent_class)->constructed (object); @@ -231,8 +324,103 @@ nmt_editor_constructed (GObject *object) vbox = nmt_newt_grid_new (); - page = nmt_page_main_new (priv->edit_connection, priv->type_data); - nmt_newt_grid_add (NMT_NEWT_GRID (vbox), page, 0, 0); + s_con = nm_connection_get_setting_connection (priv->edit_connection); + + grid = NMT_EDITOR_GRID (nmt_editor_grid_new ()); + nmt_newt_grid_add (NMT_NEWT_GRID (vbox), NMT_NEWT_WIDGET (grid), 0, 0); + + /* Add the top widgets */ + + widget = nmt_newt_entry_new (40, NMT_NEWT_ENTRY_NONEMPTY); + g_object_bind_property (s_con, NM_SETTING_CONNECTION_ID, + widget, "text", + G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE); + nmt_editor_grid_append (grid, _("Profile name"), widget, NULL); + + if (priv->type_data->virtual) + hardware_type = G_TYPE_NONE; + else + hardware_type = priv->type_data->device_type; + + /* For connections involving multiple network devices, clarify which one + * NMSettingConnection:interface-name refers to. + */ + if (nm_connection_is_type (priv->edit_connection, NM_SETTING_PPPOE_SETTING_NAME)) + deventry_label = _("Ethernet device"); + else + deventry_label = _("Device"); + + widget = nmt_device_entry_new (deventry_label, 40, hardware_type); + nmt_editor_grid_append (grid, NULL, widget, NULL); + deventry = NMT_DEVICE_ENTRY (widget); + g_object_bind_property (s_con, NM_SETTING_CONNECTION_INTERFACE_NAME, + deventry, "interface-name", + G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE); + + nmt_editor_grid_append (grid, NULL, nmt_newt_separator_new (), NULL); + + /* Now add the various pages... */ + + if (nm_connection_is_type (priv->edit_connection, NM_SETTING_BOND_SETTING_NAME)) + add_section_for_page (grid, nmt_page_bond_new (priv->edit_connection, deventry)); + else if (nm_connection_is_type (priv->edit_connection, NM_SETTING_BRIDGE_SETTING_NAME)) + add_section_for_page (grid, nmt_page_bridge_new (priv->edit_connection, deventry)); + else if (nm_connection_is_type (priv->edit_connection, NM_SETTING_INFINIBAND_SETTING_NAME)) + add_section_for_page (grid, nmt_page_infiniband_new (priv->edit_connection, deventry)); + else if (nm_connection_is_type (priv->edit_connection, NM_SETTING_PPPOE_SETTING_NAME)) { + add_section_for_page (grid, nmt_page_dsl_new (priv->edit_connection)); + add_section_for_page (grid, nmt_page_ethernet_new (priv->edit_connection, deventry)); + add_section_for_page (grid, nmt_page_ppp_new (priv->edit_connection)); + } else if (nm_connection_is_type (priv->edit_connection, NM_SETTING_TEAM_SETTING_NAME)) + add_section_for_page (grid, nmt_page_team_new (priv->edit_connection, deventry)); + else if (nm_connection_is_type (priv->edit_connection, NM_SETTING_VLAN_SETTING_NAME)) + add_section_for_page (grid, nmt_page_vlan_new (priv->edit_connection, deventry)); + else if (nm_connection_is_type (priv->edit_connection, NM_SETTING_WIRED_SETTING_NAME)) + add_section_for_page (grid, nmt_page_ethernet_new (priv->edit_connection, deventry)); + else if (nm_connection_is_type (priv->edit_connection, NM_SETTING_WIRELESS_SETTING_NAME)) + add_section_for_page (grid, nmt_page_wifi_new (priv->edit_connection, deventry)); + + nmt_editor_grid_append (grid, NULL, nmt_newt_separator_new (), NULL); + + slave_type = nm_setting_connection_get_slave_type (s_con); + if (slave_type) { + if (!strcmp (slave_type, NM_SETTING_BRIDGE_SETTING_NAME)) + add_section_for_page (grid, nmt_page_bridge_port_new (priv->edit_connection)); + else if (!strcmp (slave_type, NM_SETTING_TEAM_SETTING_NAME)) + add_section_for_page (grid, nmt_page_team_port_new (priv->edit_connection)); + } else { + NmtNewtWidget *section; + + section = add_section_for_page (grid, nmt_page_ip4_new (priv->edit_connection)); + + /* Add a separator between ip4 and ip6 that's only visible if ip4 is open */ + widget = nmt_newt_separator_new (); + g_object_bind_property (section, "open", widget, "visible", G_BINDING_SYNC_CREATE); + nmt_editor_grid_append (grid, NULL, widget, NULL); + + add_section_for_page (grid, nmt_page_ip6_new (priv->edit_connection)); + + nmt_editor_grid_append (grid, NULL, nmt_newt_separator_new (), NULL); + } + + /* And finally the bottom widgets */ + + widget = nmt_newt_checkbox_new (_("Automatically connect")); + g_object_bind_property (s_con, NM_SETTING_CONNECTION_AUTOCONNECT, + widget, "active", + G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE); + nmt_editor_grid_append (grid, NULL, widget, NULL); + + widget = nmt_newt_checkbox_new (_("Available to all users")); + g_object_bind_property_full (s_con, NM_SETTING_CONNECTION_PERMISSIONS, + widget, "active", + G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE, + permissions_transform_to_allusers, + permissions_transform_from_allusers, + NULL, NULL); + nmt_editor_grid_append (grid, NULL, widget, NULL); + + /* And the button box */ buttons = nmt_newt_button_box_new (NMT_NEWT_BUTTON_BOX_HORIZONTAL); nmt_newt_grid_add (NMT_NEWT_GRID (vbox), buttons, 0, 1); @@ -243,7 +431,7 @@ nmt_editor_constructed (GObject *object) priv->ok = nmt_newt_button_box_add_end (NMT_NEWT_BUTTON_BOX (buttons), _("OK")); g_signal_connect (priv->ok, "clicked", G_CALLBACK (save_connection_and_exit), editor); - g_object_bind_property (page, "valid", + g_object_bind_property (NMT_NEWT_WIDGET (grid), "valid", priv->ok, "sensitive", G_BINDING_SYNC_CREATE); diff --git a/clients/tui/nmt-page-main.c b/clients/tui/nmt-page-main.c deleted file mode 100644 index 74d6460533..0000000000 --- a/clients/tui/nmt-page-main.c +++ /dev/null @@ -1,328 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * Copyright 2013 Red Hat, Inc. - */ - -/** - * SECTION:nmt-page-main - * @short_description: The top-level #NmtEditorPage for a connection - * - * #NmtPageMain is the top-level #NmtEditorPage for a connection. It - * handles #NMSettingConnection properties, and embeds the other pages - * within itself. - */ - -#include "config.h" - -#include -#include - -#include - -#include "nmt-page-main.h" -#include "nmt-device-entry.h" -#include "nmt-mac-entry.h" -#include "nmt-mtu-entry.h" -#include "nmtui.h" - -#include "nmt-page-bond.h" -#include "nmt-page-bridge.h" -#include "nmt-page-bridge-port.h" -#include "nmt-page-dsl.h" -#include "nmt-page-ethernet.h" -#include "nmt-page-infiniband.h" -#include "nmt-page-ip4.h" -#include "nmt-page-ip6.h" -#include "nmt-page-ppp.h" -#include "nmt-page-team.h" -#include "nmt-page-team-port.h" -#include "nmt-page-vlan.h" -#include "nmt-page-wifi.h" - -G_DEFINE_TYPE (NmtPageMain, nmt_page_main, NMT_TYPE_EDITOR_PAGE) - -#define NMT_PAGE_MAIN_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NMT_TYPE_PAGE_MAIN, NmtPageMainPrivate)) - -typedef struct { - NMEditorConnectionTypeData *type_data; -} NmtPageMainPrivate; - -enum { - PROP_0, - - PROP_TYPE_DATA, - - LAST_PROP -}; - -/** - * nmt_page_main_new: - * @conn: the #NMConnection to display - * @type_data: @conn's #NMEditorConnectionTypeData - * - * Creates a new #NmtPageMain - * - * Returns: a new #NmtPageMain - */ -NmtNewtWidget * -nmt_page_main_new (NMConnection *conn, - NMEditorConnectionTypeData *type_data) -{ - return g_object_new (NMT_TYPE_PAGE_MAIN, - "connection", conn, - "type-data", type_data, - NULL); -} - -static void -nmt_page_main_init (NmtPageMain *page) -{ -} - -static gboolean -permissions_transform_to_allusers (GBinding *binding, - const GValue *source_value, - GValue *target_value, - gpointer user_data) -{ - char **perms = g_value_get_boxed (source_value); - - g_value_set_boolean (target_value, g_strv_length (perms) == 0); - return TRUE; -} - -static gboolean -permissions_transform_from_allusers (GBinding *binding, - const GValue *source_value, - GValue *target_value, - gpointer user_data) -{ - gboolean allusers = g_value_get_boolean (source_value); - char **perms = NULL; - - if (allusers) { - perms = g_new (char *, 2); - - perms[0] = g_strdup_printf ("user:%s:", g_get_user_name ()); - perms[1] = NULL; - } - g_value_take_boxed (target_value, perms); - return TRUE; -} - -static NmtNewtWidget * -add_section_for_page (NmtEditorGrid *grid, NmtNewtWidget *widget) -{ - NmtEditorPage *page; - NmtNewtWidget *section, *header, *toggle; - - g_return_val_if_fail (NMT_IS_EDITOR_PAGE (widget), NULL); - g_return_val_if_fail (nmt_newt_widget_get_parent (widget) == NULL, NULL); - - page = NMT_EDITOR_PAGE (widget); - - section = nmt_newt_section_new (TRUE); - - toggle = nmt_newt_toggle_button_new (_("Hide"), _("Show")); - - header = nmt_editor_grid_new (); - nmt_editor_grid_append (NMT_EDITOR_GRID (header), - nmt_editor_page_get_title (page), - nmt_editor_page_get_header_widget (page), - toggle); - nmt_editor_grid_set_row_flags (NMT_EDITOR_GRID (header), - nmt_editor_page_get_header_widget (page), - NMT_EDITOR_GRID_ROW_LABEL_ALIGN_LEFT | - NMT_EDITOR_GRID_ROW_EXTRA_ALIGN_RIGHT); - nmt_newt_section_set_header (NMT_NEWT_SECTION (section), header); - - nmt_newt_section_set_body (NMT_NEWT_SECTION (section), widget); - - g_object_bind_property (toggle, "active", - section, "open", - G_BINDING_SYNC_CREATE); - - if (nmt_editor_page_show_by_default (page) || !nmt_newt_widget_get_valid (section)) - nmt_newt_toggle_button_set_active (NMT_NEWT_TOGGLE_BUTTON (toggle), TRUE); - - nmt_editor_grid_append (grid, NULL, section, NULL); - return section; -} - -static void -nmt_page_main_constructed (GObject *object) -{ - NmtPageMain *page_main = NMT_PAGE_MAIN (object); - NmtPageMainPrivate *priv = NMT_PAGE_MAIN_GET_PRIVATE (page_main); - NmtEditorGrid *grid; - NMConnection *conn; - NMSettingConnection *s_con; - NmtNewtWidget *widget, *section, *separator; - const char *deventry_label; - NmtDeviceEntry *deventry; - GType hardware_type; - const char *slave_type; - - conn = nmt_editor_page_get_connection (NMT_EDITOR_PAGE (page_main)); - s_con = nm_connection_get_setting_connection (conn); - - grid = NMT_EDITOR_GRID (page_main); - - widget = nmt_newt_entry_new (40, NMT_NEWT_ENTRY_NONEMPTY); - g_object_bind_property (s_con, NM_SETTING_CONNECTION_ID, - widget, "text", - G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE); - nmt_editor_grid_append (grid, _("Profile name"), widget, NULL); - - if (priv->type_data->virtual) - hardware_type = G_TYPE_NONE; - else - hardware_type = priv->type_data->device_type; - - /* For connections involving multiple network devices, clarify which one - * NMSettingConnection:interface-name refers to. - */ - if (nm_connection_is_type (conn, NM_SETTING_PPPOE_SETTING_NAME)) - deventry_label = _("Ethernet device"); - else - deventry_label = _("Device"); - - widget = nmt_device_entry_new (deventry_label, 40, hardware_type); - nmt_editor_grid_append (grid, NULL, widget, NULL); - deventry = NMT_DEVICE_ENTRY (widget); - g_object_bind_property (s_con, NM_SETTING_CONNECTION_INTERFACE_NAME, - deventry, "interface-name", - G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE); - - nmt_editor_grid_append (grid, NULL, nmt_newt_separator_new (), NULL); - - if (nm_connection_is_type (conn, NM_SETTING_BOND_SETTING_NAME)) - add_section_for_page (grid, nmt_page_bond_new (conn, deventry)); - else if (nm_connection_is_type (conn, NM_SETTING_BRIDGE_SETTING_NAME)) - add_section_for_page (grid, nmt_page_bridge_new (conn, deventry)); - else if (nm_connection_is_type (conn, NM_SETTING_INFINIBAND_SETTING_NAME)) - add_section_for_page (grid, nmt_page_infiniband_new (conn, deventry)); - else if (nm_connection_is_type (conn, NM_SETTING_PPPOE_SETTING_NAME)) { - add_section_for_page (grid, nmt_page_dsl_new (conn)); - add_section_for_page (grid, nmt_page_ethernet_new (conn, deventry)); - add_section_for_page (grid, nmt_page_ppp_new (conn)); - } else if (nm_connection_is_type (conn, NM_SETTING_TEAM_SETTING_NAME)) - add_section_for_page (grid, nmt_page_team_new (conn, deventry)); - else if (nm_connection_is_type (conn, NM_SETTING_VLAN_SETTING_NAME)) - add_section_for_page (grid, nmt_page_vlan_new (conn, deventry)); - else if (nm_connection_is_type (conn, NM_SETTING_WIRED_SETTING_NAME)) - add_section_for_page (grid, nmt_page_ethernet_new (conn, deventry)); - else if (nm_connection_is_type (conn, NM_SETTING_WIRELESS_SETTING_NAME)) - add_section_for_page (grid, nmt_page_wifi_new (conn, deventry)); - - nmt_editor_grid_append (grid, NULL, nmt_newt_separator_new (), NULL); - - slave_type = nm_setting_connection_get_slave_type (s_con); - if (slave_type) { - if (!strcmp (slave_type, NM_SETTING_BRIDGE_SETTING_NAME)) - add_section_for_page (grid, nmt_page_bridge_port_new (conn)); - else if (!strcmp (slave_type, NM_SETTING_TEAM_SETTING_NAME)) - add_section_for_page (grid, nmt_page_team_port_new (conn)); - } else { - section = add_section_for_page (grid, nmt_page_ip4_new (conn)); - - /* Add a separator between ip4 and ip6 that's only visible if ip4 is open */ - separator = nmt_newt_separator_new (); - g_object_bind_property (section, "open", separator, "visible", G_BINDING_SYNC_CREATE); - nmt_editor_grid_append (grid, NULL, separator, NULL); - - add_section_for_page (grid, nmt_page_ip6_new (conn)); - - nmt_editor_grid_append (grid, NULL, nmt_newt_separator_new (), NULL); - } - - widget = nmt_newt_checkbox_new (_("Automatically connect")); - g_object_bind_property (s_con, NM_SETTING_CONNECTION_AUTOCONNECT, - widget, "active", - G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE); - nmt_editor_grid_append (grid, NULL, widget, NULL); - - widget = nmt_newt_checkbox_new (_("Available to all users")); - g_object_bind_property_full (s_con, NM_SETTING_CONNECTION_PERMISSIONS, - widget, "active", - G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE, - permissions_transform_to_allusers, - permissions_transform_from_allusers, - NULL, NULL); - nmt_editor_grid_append (grid, NULL, widget, NULL); - - G_OBJECT_CLASS (nmt_page_main_parent_class)->constructed (object); -} - -static void -nmt_page_main_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) -{ - NmtPageMainPrivate *priv = NMT_PAGE_MAIN_GET_PRIVATE (object); - - switch (prop_id) { - case PROP_TYPE_DATA: - priv->type_data = g_value_get_pointer (value); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static void -nmt_page_main_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec) -{ - NmtPageMainPrivate *priv = NMT_PAGE_MAIN_GET_PRIVATE (object); - - switch (prop_id) { - case PROP_TYPE_DATA: - g_value_set_pointer (value, priv->type_data); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static void -nmt_page_main_class_init (NmtPageMainClass *main_class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (main_class); - - g_type_class_add_private (main_class, sizeof (NmtPageMainPrivate)); - - object_class->constructed = nmt_page_main_constructed; - object_class->set_property = nmt_page_main_set_property; - object_class->get_property = nmt_page_main_get_property; - - /** - * NmtPageMain:type-data: - * - * The page's connection's #NMEditorConnectionTypeData - */ - g_object_class_install_property - (object_class, PROP_TYPE_DATA, - g_param_spec_pointer ("type-data", "", "", - G_PARAM_READWRITE | - G_PARAM_CONSTRUCT_ONLY | - G_PARAM_STATIC_STRINGS)); -} diff --git a/clients/tui/nmt-page-main.h b/clients/tui/nmt-page-main.h deleted file mode 100644 index 20de14f36a..0000000000 --- a/clients/tui/nmt-page-main.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * Copyright 2013 Red Hat, Inc. - */ - -#ifndef NMT_PAGE_MAIN_H -#define NMT_PAGE_MAIN_H - -#include "nmt-editor-page.h" -#include "nm-editor-utils.h" - -G_BEGIN_DECLS - -#define NMT_TYPE_PAGE_MAIN (nmt_page_main_get_type ()) -#define NMT_PAGE_MAIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NMT_TYPE_PAGE_MAIN, NmtPageMain)) -#define NMT_PAGE_MAIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NMT_TYPE_PAGE_MAIN, NmtPageMainClass)) -#define NMT_IS_PAGE_MAIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NMT_TYPE_PAGE_MAIN)) -#define NMT_IS_PAGE_MAIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NMT_TYPE_PAGE_MAIN)) -#define NMT_PAGE_MAIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NMT_TYPE_PAGE_MAIN, NmtPageMainClass)) - -typedef struct { - NmtEditorPage parent; - -} NmtPageMain; - -typedef struct { - NmtEditorPageClass parent; - -} NmtPageMainClass; - -GType nmt_page_main_get_type (void); - -NmtNewtWidget *nmt_page_main_new (NMConnection *conn, - NMEditorConnectionTypeData *type_data); - -G_END_DECLS - -#endif /* NMT_PAGE_MAIN_H */ diff --git a/po/POTFILES.in b/po/POTFILES.in index 0571f0e238..7234e54bf3 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -28,7 +28,6 @@ clients/tui/nmt-page-ethernet.c clients/tui/nmt-page-infiniband.c clients/tui/nmt-page-ip4.c clients/tui/nmt-page-ip6.c -clients/tui/nmt-page-main.c clients/tui/nmt-page-ppp.c clients/tui/nmt-page-team-port.c clients/tui/nmt-page-team.c