Commit 277ed5be authored by Dan Winship's avatar Dan Winship Committed by Dan Winship

tui: rename two classes

Rename NmtPageDevice to NmtEditorPageDevice, and rename NmtPageGrid to
NmtEditorGrid.

Now all types with names starting with "NmtPage" are instantiable page
types, not abstract classes or low-level widgets.
parent b5ef9177
......@@ -55,8 +55,12 @@ nmtui_SOURCES = \
nmt-device-entry.h \
nmt-edit-connection-list.c \
nmt-edit-connection-list.h \
nmt-editor-grid.c \
nmt-editor-grid.h \
nmt-editor-page.c \
nmt-editor-page.h \
nmt-editor-page-device.c \
nmt-editor-page-device.h \
nmt-editor.c \
nmt-editor.h \
nmt-ip-entry.c \
......@@ -71,14 +75,10 @@ nmtui_SOURCES = \
nmt-page-bridge.h \
nmt-page-bridge-port.c \
nmt-page-bridge-port.h \
nmt-page-device.c \
nmt-page-device.h \
nmt-page-dsl.c \
nmt-page-dsl.h \
nmt-page-ethernet.c \
nmt-page-ethernet.h \
nmt-page-grid.c \
nmt-page-grid.h \
nmt-page-infiniband.c \
nmt-page-infiniband.h \
nmt-page-ip4.c \
......
......@@ -28,7 +28,7 @@
* matching a known #NMDevice, then it will also display the other
* property in parentheses.
*
* FIXME: #NmtDeviceEntry is currently an #NmtPageGrid object, so that
* FIXME: #NmtDeviceEntry is currently an #NmtEditorGrid object, so that
* we can possibly eventually add a button to its "extra" field, that
* would pop up a form for selecting a device. But if we're not going
* to implement that then we should make it just an #NmtNewtEntry.
......@@ -46,7 +46,7 @@
#include "nmtui.h"
#include "nmt-device-entry.h"
G_DEFINE_TYPE (NmtDeviceEntry, nmt_device_entry, NMT_TYPE_PAGE_GRID)
G_DEFINE_TYPE (NmtDeviceEntry, nmt_device_entry, NMT_TYPE_EDITOR_GRID)
#define NMT_DEVICE_ENTRY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NMT_TYPE_DEVICE_ENTRY, NmtDeviceEntryPrivate))
......@@ -379,7 +379,7 @@ nmt_device_entry_constructed (GObject *object)
{
NmtDeviceEntryPrivate *priv = NMT_DEVICE_ENTRY_GET_PRIVATE (object);
nmt_page_grid_append (NMT_PAGE_GRID (object), priv->label, NMT_NEWT_WIDGET (priv->entry), NULL);
nmt_editor_grid_append (NMT_EDITOR_GRID (object), priv->label, NMT_NEWT_WIDGET (priv->entry), NULL);
G_OBJECT_CLASS (nmt_device_entry_parent_class)->constructed (object);
}
......
......@@ -19,7 +19,7 @@
#ifndef NMT_DEVICE_ENTRY_H
#define NMT_DEVICE_ENTRY_H
#include "nmt-page-grid.h"
#include "nmt-editor-grid.h"
#include <NetworkManager.h>
......@@ -33,12 +33,12 @@ G_BEGIN_DECLS
#define NMT_DEVICE_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NMT_TYPE_DEVICE_ENTRY, NmtDeviceEntryClass))
typedef struct {
NmtPageGrid parent;
NmtEditorGrid parent;
} NmtDeviceEntry;
typedef struct {
NmtPageGridClass parent;
NmtEditorGridClass parent;
} NmtDeviceEntryClass;
......
......@@ -16,47 +16,47 @@
* Copyright 2013 Red Hat, Inc.
*/
#ifndef NMT_PAGE_GRID_H
#define NMT_PAGE_GRID_H
#ifndef NMT_EDITOR_GRID_H
#define NMT_EDITOR_GRID_H
#include "nmt-newt.h"
G_BEGIN_DECLS
#define NMT_TYPE_PAGE_GRID (nmt_page_grid_get_type ())
#define NMT_PAGE_GRID(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NMT_TYPE_PAGE_GRID, NmtPageGrid))
#define NMT_PAGE_GRID_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NMT_TYPE_PAGE_GRID, NmtPageGridClass))
#define NMT_IS_PAGE_GRID(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NMT_TYPE_PAGE_GRID))
#define NMT_IS_PAGE_GRID_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NMT_TYPE_PAGE_GRID))
#define NMT_PAGE_GRID_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NMT_TYPE_PAGE_GRID, NmtPageGridClass))
#define NMT_TYPE_EDITOR_GRID (nmt_editor_grid_get_type ())
#define NMT_EDITOR_GRID(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NMT_TYPE_EDITOR_GRID, NmtEditorGrid))
#define NMT_EDITOR_GRID_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NMT_TYPE_EDITOR_GRID, NmtEditorGridClass))
#define NMT_IS_EDITOR_GRID(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NMT_TYPE_EDITOR_GRID))
#define NMT_IS_EDITOR_GRID_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NMT_TYPE_EDITOR_GRID))
#define NMT_EDITOR_GRID_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NMT_TYPE_EDITOR_GRID, NmtEditorGridClass))
typedef struct {
NmtNewtContainer parent;
} NmtPageGrid;
} NmtEditorGrid;
typedef struct {
NmtNewtContainerClass parent;
} NmtPageGridClass;
} NmtEditorGridClass;
GType nmt_page_grid_get_type (void);
GType nmt_editor_grid_get_type (void);
typedef enum {
NMT_PAGE_GRID_ROW_LABEL_ALIGN_LEFT = (1 << 0),
NMT_PAGE_GRID_ROW_EXTRA_ALIGN_RIGHT = (1 << 1)
} NmtPageGridRowFlags;
NMT_EDITOR_GRID_ROW_LABEL_ALIGN_LEFT = (1 << 0),
NMT_EDITOR_GRID_ROW_EXTRA_ALIGN_RIGHT = (1 << 1)
} NmtEditorGridRowFlags;
NmtNewtWidget *nmt_page_grid_new (void);
NmtNewtWidget *nmt_editor_grid_new (void);
void nmt_page_grid_append (NmtPageGrid *grid,
void nmt_editor_grid_append (NmtEditorGrid *grid,
const char *label,
NmtNewtWidget *widget,
NmtNewtWidget *extra);
void nmt_page_grid_set_row_flags (NmtPageGrid *grid,
void nmt_editor_grid_set_row_flags (NmtEditorGrid *grid,
NmtNewtWidget *widget,
NmtPageGridRowFlags flags);
NmtEditorGridRowFlags flags);
G_END_DECLS
#endif /* NMT_PAGE_GRID_H */
#endif /* NMT_EDITOR_GRID_H */
......@@ -17,10 +17,10 @@
*/
/**
* SECTION:nmt-page-device
* SECTION:nmt-editor-page-device
* @short_description: Abstract base class for "device" editor pages
*
* #NmtPageDevice is the base class for #NmtEditorPage subclasses
* #NmtEditorPageDevice is the base class for #NmtEditorPage subclasses
* representing device-type-specific data. (Eg, #NmtPageEthernet,
* #NmtPageVlan, etc).
*
......@@ -30,16 +30,16 @@
#include "config.h"
#include "nmt-page-device.h"
#include "nmt-editor-page-device.h"
G_DEFINE_TYPE (NmtPageDevice, nmt_page_device, NMT_TYPE_EDITOR_PAGE)
G_DEFINE_TYPE (NmtEditorPageDevice, nmt_editor_page_device, NMT_TYPE_EDITOR_PAGE)
#define NMT_PAGE_DEVICE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NMT_TYPE_PAGE_DEVICE, NmtPageDevicePrivate))
#define NMT_EDITOR_PAGE_DEVICE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NMT_TYPE_EDITOR_PAGE_DEVICE, NmtEditorPageDevicePrivate))
typedef struct {
NmtDeviceEntry *device_entry;
gboolean show_by_default;
} NmtPageDevicePrivate;
} NmtEditorPageDevicePrivate;
enum {
PROP_0,
......@@ -51,43 +51,43 @@ enum {
};
static void
nmt_page_device_init (NmtPageDevice *device)
nmt_editor_page_device_init (NmtEditorPageDevice *device)
{
}
static void
nmt_page_device_finalize (GObject *object)
nmt_editor_page_device_finalize (GObject *object)
{
NmtPageDevicePrivate *priv = NMT_PAGE_DEVICE_GET_PRIVATE (object);
NmtEditorPageDevicePrivate *priv = NMT_EDITOR_PAGE_DEVICE_GET_PRIVATE (object);
g_clear_object (&priv->device_entry);
G_OBJECT_CLASS (nmt_page_device_parent_class)->finalize (object);
G_OBJECT_CLASS (nmt_editor_page_device_parent_class)->finalize (object);
}
NmtDeviceEntry *
nmt_page_device_get_device_entry (NmtPageDevice *page)
nmt_editor_page_device_get_device_entry (NmtEditorPageDevice *page)
{
NmtPageDevicePrivate *priv = NMT_PAGE_DEVICE_GET_PRIVATE (page);
NmtEditorPageDevicePrivate *priv = NMT_EDITOR_PAGE_DEVICE_GET_PRIVATE (page);
return priv->device_entry;
}
static gboolean
nmt_page_device_show_by_default (NmtEditorPage *page)
nmt_editor_page_device_show_by_default (NmtEditorPage *page)
{
NmtPageDevicePrivate *priv = NMT_PAGE_DEVICE_GET_PRIVATE (page);
NmtEditorPageDevicePrivate *priv = NMT_EDITOR_PAGE_DEVICE_GET_PRIVATE (page);
return priv->show_by_default;
}
static void
nmt_page_device_set_property (GObject *object,
nmt_editor_page_device_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
NmtPageDevicePrivate *priv = NMT_PAGE_DEVICE_GET_PRIVATE (object);
NmtEditorPageDevicePrivate *priv = NMT_EDITOR_PAGE_DEVICE_GET_PRIVATE (object);
switch (prop_id) {
case PROP_DEVICE_ENTRY:
......@@ -103,12 +103,12 @@ nmt_page_device_set_property (GObject *object,
}
static void
nmt_page_device_get_property (GObject *object,
nmt_editor_page_device_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
NmtPageDevicePrivate *priv = NMT_PAGE_DEVICE_GET_PRIVATE (object);
NmtEditorPageDevicePrivate *priv = NMT_EDITOR_PAGE_DEVICE_GET_PRIVATE (object);
switch (prop_id) {
case PROP_DEVICE_ENTRY:
......@@ -124,19 +124,19 @@ nmt_page_device_get_property (GObject *object,
}
static void
nmt_page_device_class_init (NmtPageDeviceClass *page_device_class)
nmt_editor_page_device_class_init (NmtEditorPageDeviceClass *page_device_class)
{
GObjectClass *object_class = G_OBJECT_CLASS (page_device_class);
NmtEditorPageClass *page_class = NMT_EDITOR_PAGE_CLASS (page_device_class);
g_type_class_add_private (page_device_class, sizeof (NmtPageDevicePrivate));
g_type_class_add_private (page_device_class, sizeof (NmtEditorPageDevicePrivate));
/* virtual methods */
object_class->set_property = nmt_page_device_set_property;
object_class->get_property = nmt_page_device_get_property;
object_class->finalize = nmt_page_device_finalize;
object_class->set_property = nmt_editor_page_device_set_property;
object_class->get_property = nmt_editor_page_device_get_property;
object_class->finalize = nmt_editor_page_device_finalize;
page_class->show_by_default = nmt_page_device_show_by_default;
page_class->show_by_default = nmt_editor_page_device_show_by_default;
/* properties */
g_object_class_install_property
......
......@@ -16,35 +16,35 @@
* Copyright 2013 Red Hat, Inc.
*/
#ifndef NMT_PAGE_DEVICE_H
#define NMT_PAGE_DEVICE_H
#ifndef NMT_EDITOR_PAGE_DEVICE_H
#define NMT_EDITOR_PAGE_DEVICE_H
#include "nmt-editor-page.h"
#include "nmt-device-entry.h"
G_BEGIN_DECLS
#define NMT_TYPE_PAGE_DEVICE (nmt_page_device_get_type ())
#define NMT_PAGE_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NMT_TYPE_PAGE_DEVICE, NmtPageDevice))
#define NMT_PAGE_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NMT_TYPE_PAGE_DEVICE, NmtPageDeviceClass))
#define NMT_IS_PAGE_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NMT_TYPE_PAGE_DEVICE))
#define NMT_IS_PAGE_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NMT_TYPE_PAGE_DEVICE))
#define NMT_PAGE_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NMT_TYPE_PAGE_DEVICE, NmtPageDeviceClass))
#define NMT_TYPE_EDITOR_PAGE_DEVICE (nmt_editor_page_device_get_type ())
#define NMT_EDITOR_PAGE_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NMT_TYPE_EDITOR_PAGE_DEVICE, NmtEditorPageDevice))
#define NMT_EDITOR_PAGE_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NMT_TYPE_EDITOR_PAGE_DEVICE, NmtEditorPageDeviceClass))
#define NMT_IS_EDITOR_PAGE_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NMT_TYPE_EDITOR_PAGE_DEVICE))
#define NMT_IS_EDITOR_PAGE_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NMT_TYPE_EDITOR_PAGE_DEVICE))
#define NMT_EDITOR_PAGE_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NMT_TYPE_EDITOR_PAGE_DEVICE, NmtEditorPageDeviceClass))
typedef struct {
NmtEditorPage parent;
} NmtPageDevice;
} NmtEditorPageDevice;
typedef struct {
NmtEditorPageClass parent;
} NmtPageDeviceClass;
} NmtEditorPageDeviceClass;
GType nmt_page_device_get_type (void);
GType nmt_editor_page_device_get_type (void);
NmtDeviceEntry *nmt_page_device_get_device_entry (NmtPageDevice *page);
NmtDeviceEntry *nmt_editor_page_device_get_device_entry (NmtEditorPageDevice *page);
G_END_DECLS
#endif /* NMT_PAGE_DEVICE_H */
#endif /* NMT_EDITOR_PAGE_DEVICE_H */
......@@ -32,7 +32,7 @@
#include "nmt-editor-page.h"
G_DEFINE_ABSTRACT_TYPE (NmtEditorPage, nmt_editor_page, NMT_TYPE_PAGE_GRID)
G_DEFINE_ABSTRACT_TYPE (NmtEditorPage, nmt_editor_page, NMT_TYPE_EDITOR_GRID)
#define NMT_EDITOR_PAGE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NMT_TYPE_EDITOR_PAGE, NmtEditorPagePrivate))
......
......@@ -21,7 +21,7 @@
#include <NetworkManager.h>
#include "nmt-page-grid.h"
#include "nmt-editor-grid.h"
G_BEGIN_DECLS
......@@ -33,12 +33,12 @@ G_BEGIN_DECLS
#define NMT_EDITOR_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NMT_TYPE_EDITOR_PAGE, NmtEditorPageClass))
typedef struct {
NmtPageGrid parent;
NmtEditorGrid parent;
} NmtEditorPage;
typedef struct {
NmtPageGridClass parent;
NmtEditorGridClass parent;
gboolean (*show_by_default) (NmtEditorPage *);
} NmtEditorPageClass;
......
......@@ -35,7 +35,7 @@
#include "nmt-address-list.h"
#include "nmt-slave-list.h"
G_DEFINE_TYPE (NmtPageBond, nmt_page_bond, NMT_TYPE_PAGE_DEVICE)
G_DEFINE_TYPE (NmtPageBond, nmt_page_bond, NMT_TYPE_EDITOR_PAGE_DEVICE)
#define NMT_PAGE_BOND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NMT_TYPE_PAGE_BOND, NmtPageBondPrivate))
......@@ -338,7 +338,7 @@ nmt_page_bond_constructed (GObject *object)
{
NmtPageBond *bond = NMT_PAGE_BOND (object);
NmtPageBondPrivate *priv = NMT_PAGE_BOND_GET_PRIVATE (bond);
NmtPageGrid *grid;
NmtEditorGrid *grid;
NMSettingBond *s_bond;
NmtNewtWidget *widget, *label;
NMConnection *conn;
......@@ -351,68 +351,68 @@ nmt_page_bond_constructed (GObject *object)
}
priv->s_bond = s_bond;
grid = NMT_PAGE_GRID (bond);
grid = NMT_EDITOR_GRID (bond);
widget = nmt_newt_separator_new ();
nmt_page_grid_append (grid, _("Slaves"), widget, NULL);
nmt_page_grid_set_row_flags (grid, widget, NMT_PAGE_GRID_ROW_LABEL_ALIGN_LEFT);
nmt_editor_grid_append (grid, _("Slaves"), widget, NULL);
nmt_editor_grid_set_row_flags (grid, widget, NMT_EDITOR_GRID_ROW_LABEL_ALIGN_LEFT);
widget = nmt_slave_list_new (conn, bond_connection_type_filter, bond);
g_signal_connect (widget, "notify::connections",
G_CALLBACK (slaves_changed), bond);
nmt_page_grid_append (grid, NULL, widget, NULL);
nmt_editor_grid_append (grid, NULL, widget, NULL);
priv->slaves = NMT_SLAVE_LIST (widget);
widget = nmt_newt_popup_new (bond_mode);
g_signal_connect (widget, "notify::active-id",
G_CALLBACK (mode_widget_changed), bond);
nmt_page_grid_append (grid, _("Mode"), widget, NULL);
nmt_editor_grid_append (grid, _("Mode"), widget, NULL);
priv->mode = NMT_NEWT_POPUP (widget);
widget = nmt_newt_entry_new (40, 0);
g_signal_connect (widget, "notify::text",
G_CALLBACK (primary_widget_changed), bond);
nmt_page_grid_append (grid, _("Primary"), widget, NULL);
nmt_editor_grid_append (grid, _("Primary"), widget, NULL);
priv->primary = NMT_NEWT_ENTRY (widget);
widget = nmt_newt_popup_new (bond_monitoring);
g_signal_connect (widget, "notify::active",
G_CALLBACK (monitoring_widget_changed), bond);
nmt_page_grid_append (grid, _("Link monitoring"), widget, NULL);
nmt_editor_grid_append (grid, _("Link monitoring"), widget, NULL);
priv->monitoring = NMT_NEWT_POPUP (widget);
widget = nmt_newt_entry_numeric_new (10, 0, G_MAXINT);
g_signal_connect (widget, "notify::text",
G_CALLBACK (miimon_widget_changed), bond);
label = nmt_newt_label_new (C_("milliseconds", "ms"));
nmt_page_grid_append (grid, _("Monitoring frequency"), widget, label);
nmt_editor_grid_append (grid, _("Monitoring frequency"), widget, label);
priv->miimon = NMT_NEWT_ENTRY (widget);
widget = nmt_newt_entry_numeric_new (10, 0, G_MAXINT);
g_signal_connect (widget, "notify::text",
G_CALLBACK (updelay_widget_changed), bond);
label = nmt_newt_label_new (C_("milliseconds", "ms"));
nmt_page_grid_append (grid, _("Link up delay"), widget, label);
nmt_editor_grid_append (grid, _("Link up delay"), widget, label);
priv->updelay = NMT_NEWT_ENTRY (widget);
widget = nmt_newt_entry_numeric_new (10, 0, G_MAXINT);
g_signal_connect (widget, "notify::text",
G_CALLBACK (downdelay_widget_changed), bond);
label = nmt_newt_label_new (C_("milliseconds", "ms"));
nmt_page_grid_append (grid, _("Link down delay"), widget, label);
nmt_editor_grid_append (grid, _("Link down delay"), widget, label);
priv->downdelay = NMT_NEWT_ENTRY (widget);
widget = nmt_newt_entry_numeric_new (10, 0, G_MAXINT);
g_signal_connect (widget, "notify::text",
G_CALLBACK (arp_interval_widget_changed), bond);
label = nmt_newt_label_new (C_("milliseconds", "ms"));
nmt_page_grid_append (grid, _("Monitoring frequency"), widget, label);
nmt_editor_grid_append (grid, _("Monitoring frequency"), widget, label);
priv->arp_interval = NMT_NEWT_ENTRY (widget);
widget = nmt_address_list_new (NMT_ADDRESS_LIST_IP4);
g_signal_connect (widget, "notify::strings",
G_CALLBACK (arp_ip_target_widget_changed), bond);
nmt_page_grid_append (grid, _("ARP targets"), widget, NULL);
nmt_editor_grid_append (grid, _("ARP targets"), widget, NULL);
priv->arp_ip_target = NMT_ADDRESS_LIST (widget);
g_signal_connect (s_bond, "notify::" NM_SETTING_BOND_OPTIONS,
......
......@@ -19,7 +19,7 @@
#ifndef NMT_PAGE_BOND_H
#define NMT_PAGE_BOND_H
#include "nmt-page-device.h"
#include "nmt-editor-page-device.h"
G_BEGIN_DECLS
......@@ -31,12 +31,12 @@ G_BEGIN_DECLS
#define NMT_PAGE_BOND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NMT_TYPE_PAGE_BOND, NmtPageBondClass))
typedef struct {
NmtPageDevice parent;
NmtEditorPageDevice parent;
} NmtPageBond;
typedef struct {
NmtPageDeviceClass parent;
NmtEditorPageDeviceClass parent;
} NmtPageBondClass;
......
......@@ -48,7 +48,7 @@ static void
nmt_page_bridge_port_constructed (GObject *object)
{
NmtPageBridgePort *bridge = NMT_PAGE_BRIDGE_PORT (object);
NmtPageGrid *grid;
NmtEditorGrid *grid;
NMSettingBridgePort *s_port;
NmtNewtWidget *widget;
NMConnection *conn;
......@@ -60,25 +60,25 @@ nmt_page_bridge_port_constructed (GObject *object)
s_port = nm_connection_get_setting_bridge_port (conn);
}
grid = NMT_PAGE_GRID (bridge);
grid = NMT_EDITOR_GRID (bridge);
widget = nmt_newt_entry_numeric_new (10, 0, 63);
g_object_bind_property (s_port, NM_SETTING_BRIDGE_PORT_PRIORITY,
widget, "text",
G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
nmt_page_grid_append (grid, _("Priority"), widget, NULL);
nmt_editor_grid_append (grid, _("Priority"), widget, NULL);
widget = nmt_newt_entry_numeric_new (10, 1, 65535);
g_object_bind_property (s_port, NM_SETTING_BRIDGE_PORT_PATH_COST,
widget, "text",
G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
nmt_page_grid_append (grid, _("Path cost"), widget, NULL);
nmt_editor_grid_append (grid, _("Path cost"), widget, NULL);
widget = nmt_newt_checkbox_new (_("Hairpin mode"));
g_object_bind_property (s_port, NM_SETTING_BRIDGE_PORT_HAIRPIN_MODE,
widget, "active",
G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
nmt_page_grid_append (grid, NULL, widget, NULL);
nmt_editor_grid_append (grid, NULL, widget, NULL);
G_OBJECT_CLASS (nmt_page_bridge_port_parent_class)->constructed (object);
}
......
......@@ -31,7 +31,7 @@
#include "nmt-address-list.h"
#include "nmt-slave-list.h"
G_DEFINE_TYPE (NmtPageBridge, nmt_page_bridge, NMT_TYPE_PAGE_DEVICE)
G_DEFINE_TYPE (NmtPageBridge, nmt_page_bridge, NMT_TYPE_EDITOR_PAGE_DEVICE)
NmtNewtWidget *
nmt_page_bridge_new (NMConnection *conn,
......@@ -62,7 +62,7 @@ static void
nmt_page_bridge_constructed (GObject *object)
{
NmtPageBridge *bridge = NMT_PAGE_BRIDGE (object);
NmtPageGrid *grid;
NmtEditorGrid *grid;
NMSettingBridge *s_bridge;
NmtNewtWidget *widget, *label, *stp;
NMConnection *conn;
......@@ -74,27 +74,27 @@ nmt_page_bridge_constructed (GObject *object)
s_bridge = nm_connection_get_setting_bridge (conn);
}
grid = NMT_PAGE_GRID (bridge);
grid = NMT_EDITOR_GRID (bridge);
widget = nmt_newt_separator_new ();
nmt_page_grid_append (grid, _("Slaves"), widget, NULL);
nmt_page_grid_set_row_flags (grid, widget, NMT_PAGE_GRID_ROW_LABEL_ALIGN_LEFT);
nmt_editor_grid_append (grid, _("Slaves"), widget, NULL);
nmt_editor_grid_set_row_flags (grid, widget, NMT_EDITOR_GRID_ROW_LABEL_ALIGN_LEFT);
widget = nmt_slave_list_new (conn, bridge_connection_type_filter, bridge);
nmt_page_grid_append (grid, NULL, widget, NULL);
nmt_editor_grid_append (grid, NULL, widget, NULL);
widget = nmt_newt_entry_numeric_new (10, 0, 1000000);
g_object_bind_property (s_bridge, NM_SETTING_BRIDGE_AGEING_TIME,
widget, "text",
G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
label = nmt_newt_label_new (_("seconds"));
nmt_page_grid_append (grid, _("Aging time"), widget, label);
nmt_editor_grid_append (grid, _("Aging time"), widget, label);
widget = stp = nmt_newt_checkbox_new (_("Enable STP (Spanning Tree Protocol)"));
g_object_bind_property (s_bridge, NM_SETTING_BRIDGE_STP,
widget, "active",
G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
nmt_page_grid_append (grid, NULL, widget, NULL);
nmt_editor_grid_append (grid, NULL, widget, NULL);
widget = nmt_newt_entry_numeric_new (10, 0, G_MAXINT);
g_object_bind_property (s_bridge, NM_SETTING_BRIDGE_PRIORITY,
......@@ -103,7 +103,7 @@ nmt_page_bridge_constructed (GObject *object)
g_object_bind_property (s_bridge, NM_SETTING_BRIDGE_STP,
widget, "sensitive",
G_BINDING_SYNC_CREATE);
nmt_page_grid_append (grid, _("Priority"), widget, NULL);
nmt_editor_grid_append (grid, _("Priority"), widget, NULL);
widget = nmt_newt_entry_numeric_new (10, 2, 30);
g_object_bind_property (s_bridge, NM_SETTING_BRIDGE_FORWARD_DELAY,
......@@ -113,7 +113,7 @@ nmt_page_bridge_constructed (GObject *object)
widget, "sensitive",
G_BINDING_SYNC_CREATE);
label = nmt_newt_label_new (_("seconds"));
nmt_page_grid_append (grid, _("Forward delay"), widget, label);
nmt_editor_grid_append (grid, _("Forward delay"), widget, label);
widget = nmt_newt_entry_numeric_new (10, 1, 10);
g_object_bind_property (s_bridge, NM_SETTING_BRIDGE_HELLO_TIME,
......@@ -123,7 +123,7 @@ nmt_page_bridge_constructed (GObject *object)
widget, "sensitive",
G_BINDING_SYNC_CREATE);
label = nmt_newt_label_new (_("seconds"));
nmt_page_grid_append (grid, _("Hello time"), widget, label);
nmt_editor_grid_append (grid, _("Hello time"), widget, label);
widget = nmt_newt_entry_numeric_new (10, 6, 40);
g_object_bind_property (s_bridge, NM_SETTING_BRIDGE_MAX_AGE,
......@@ -133,7 +133,7 @@ nmt_page_bridge_constructed (GObject *object)
widget, "sensitive",
G_BINDING_SYNC_CREATE);
label = nmt_newt_label_new (_("seconds"));
nmt_page_grid_append (grid, _("Max age"), widget, label);
nmt_editor_grid_append (grid, _("Max age"), widget, label);
G_OBJECT_CLASS (nmt_page_bridge_parent_class)->constructed (object);
}
......
......@@ -19,7 +19,7 @@
#ifndef NMT_PAGE_BRIDGE_H
#define NMT_PAGE_BRIDGE_H
#include "nmt-page-device.h"
#include "nmt-editor-page-device.h"
G_BEGIN_DECLS
......@@ -31,12 +31,12 @@ G_BEGIN_DECLS
#define NMT_PAGE_BRIDGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NMT_TYPE_PAGE_BRIDGE, NmtPageBridgeClass))
typedef struct {
NmtPageDevice parent;
NmtEditorPageDevice parent;
} NmtPageBridge;
typedef struct {
NmtPageDeviceClass parent;
NmtEditorPageDeviceClass parent;
} NmtPageBridgeClass;
......
......@@ -49,7 +49,7 @@ static void
nmt_page_dsl_constructed (GObject *object)
{
NmtPageDsl *dsl = NMT_PAGE_DSL (object);
NmtPageGrid *grid;
NmtEditorGrid *grid;
NMSettingPppoe *s_pppoe;
NmtNewtWidget *widget;
NMConnection *conn;
......@@ -61,10 +61,10 @@ nmt_page_dsl_constructed (GObject *object)
s_pppoe = nm_connection_get_setting_pppoe (conn);
}
grid = NMT_PAGE_GRID (dsl);
grid = NMT_EDITOR_GRID (dsl);
widget = nmt_newt_entry_new (40, 0);
nmt_page_grid_append (grid, _("Username"), widget, NULL);
nmt_editor_grid_append (grid, _("Username"), widget, NULL);
g_object_bind_property (s_pppoe, NM_SETTING_PPPOE_USERNAME,
widget, "text",
G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
......@@ -73,10 +73,10 @@ nmt_page_dsl_constructed (GObject *object)
g_object_bind_property (s_pppoe, NM_SETTING_PPPOE_PASSWORD,
widget, "password",
G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
nmt_page_grid_append (grid, _("Password"), widget, NULL);
nmt_editor_grid_append (grid, _("Password"), widget, NULL);
widget = nmt_newt_entry_new (40, 0);
nmt_page_grid_append (grid, _("Service"), widget, NULL);
nmt_editor_grid_append (grid, _("Service"), widget, NULL);
g_object_bind_property (s_pppoe, NM_SETTING_PPPOE_SERVICE,
widget, "text",
G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
......
......@@ -30,7 +30,7 @@
#include "nmt-mac-entry.h"
#include "nmt-mtu-entry.h"
G_DEFINE_TYPE (NmtPageEthernet, nmt_page_ethernet, NMT_TYPE_PAGE_DEVICE)
G_DEFINE_TYPE (NmtPageEthernet, nmt_page_ethernet, NMT_TYPE_EDITOR_PAGE_DEVICE)
NmtNewtWidget *
nmt_page_ethernet_new (NMConnection *conn,
......@@ -54,7 +54,7 @@ nmt_page_ethernet_constructed (GObject *object)
{
NmtPageEthernet *ethernet = NMT_PAGE_ETHERNET (object);
NmtDeviceEntry *deventry;
NmtPageGrid *grid;