diff options
Diffstat (limited to 'src')
44 files changed, 190 insertions, 50 deletions
diff --git a/src/connection-editor/ce-page.c b/src/connection-editor/ce-page.c index 1194ed90..3f79c22b 100644 --- a/src/connection-editor/ce-page.c +++ b/src/connection-editor/ce-page.c @@ -151,6 +151,24 @@ ce_page_last_update (CEPage *self, NMConnection *connection, GError **error) return TRUE; } +gboolean +ce_page_inter_page_change (CEPage *self) +{ + gboolean ret = FALSE; + + g_return_val_if_fail (CE_IS_PAGE (self), FALSE); + + if (self->inter_page_change_running) + return FALSE; + + self->inter_page_change_running = TRUE; + if (CE_PAGE_GET_CLASS (self)->inter_page_change) + ret = CE_PAGE_GET_CLASS (self)->inter_page_change (self); + self->inter_page_change_running = FALSE; + + return ret; +} + static void _set_active_combo_item (GtkComboBox *combo, const char *item, const char *combo_item, int combo_idx) @@ -766,6 +784,7 @@ ce_page_new_connection (const char *format, CEPage * ce_page_new (GType page_type, + NMConnectionEditor *editor, NMConnection *connection, GtkWindow *parent_window, NMClient *client, @@ -786,6 +805,7 @@ ce_page_new (GType page_type, NULL)); self->title = g_strdup (title); self->client = client; + self->editor = editor; if (ui_file) { if (!gtk_builder_add_from_file (self->builder, ui_file, &error)) { diff --git a/src/connection-editor/ce-page.h b/src/connection-editor/ce-page.h index 2c115142..efafc03f 100644 --- a/src/connection-editor/ce-page.h +++ b/src/connection-editor/ce-page.h @@ -30,6 +30,7 @@ #include <NetworkManager.h> +#include "nm-connection-editor.h" #include "utils.h" /* for ARPHRD_ETHER / ARPHRD_INFINIBAND for MAC utilies */ @@ -63,12 +64,14 @@ typedef struct { GObject parent; gboolean initialized; + gboolean inter_page_change_running; GtkBuilder *builder; GtkWidget *page; char *title; gulong secrets_done_validate; + NMConnectionEditor *editor; NMConnection *connection; GtkWindow *parent_window; NMClient *client; @@ -80,6 +83,7 @@ typedef struct { /* Virtual functions */ gboolean (*ce_page_validate_v) (CEPage *self, NMConnection *connection, GError **error); gboolean (*last_update) (CEPage *self, NMConnection *connection, GError **error); + gboolean (*inter_page_change) (CEPage *self); /* Signals */ void (*changed) (CEPage *self); @@ -87,7 +91,8 @@ typedef struct { } CEPageClass; -typedef CEPage* (*CEPageNewFunc)(NMConnection *connection, +typedef CEPage* (*CEPageNewFunc)(NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent, NMClient *client, const char **out_secrets_setting_name, @@ -102,6 +107,7 @@ const char * ce_page_get_title (CEPage *self); gboolean ce_page_validate (CEPage *self, NMConnection *connection, GError **error); gboolean ce_page_last_update (CEPage *self, NMConnection *connection, GError **error); +gboolean ce_page_inter_page_change (CEPage *self); void ce_page_setup_mac_combo (CEPage *self, GtkComboBox *combo, const char *mac, char **mac_list); @@ -146,6 +152,7 @@ NMConnection *ce_page_new_connection (const char *format, gpointer user_data); CEPage *ce_page_new (GType page_type, + NMConnectionEditor *editor, NMConnection *connection, GtkWindow *parent_window, NMClient *client, @@ -153,5 +160,6 @@ CEPage *ce_page_new (GType page_type, const char *widget_name, const char *title); + #endif /* __CE_PAGE_H__ */ diff --git a/src/connection-editor/nm-connection-editor.c b/src/connection-editor/nm-connection-editor.c index 9c7a1ef4..8de06809 100644 --- a/src/connection-editor/nm-connection-editor.c +++ b/src/connection-editor/nm-connection-editor.c @@ -258,6 +258,12 @@ permissions_changed_cb (NMClient *client, } static void +destroy_inter_page_item (gpointer data) +{ + return; +} + +static void nm_connection_editor_init (NMConnectionEditor *editor) { GtkWidget *dialog; @@ -290,6 +296,8 @@ nm_connection_editor_init (NMConnectionEditor *editor) editor->cancel_button = GTK_WIDGET (gtk_builder_get_object (editor->builder, "cancel_button")); editor->export_button = GTK_WIDGET (gtk_builder_get_object (editor->builder, "export_button")); + + editor->inter_page_hash = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, (GDestroyNotify) destroy_inter_page_item); } static void @@ -361,6 +369,8 @@ dispose (GObject *object) g_clear_pointer (&editor->last_validation_error, g_free); + g_hash_table_destroy (editor->inter_page_hash); + out: G_OBJECT_CLASS (nm_connection_editor_parent_class)->dispose (object); } @@ -507,6 +517,14 @@ static void page_changed (CEPage *page, gpointer user_data) { NMConnectionEditor *editor = NM_CONNECTION_EDITOR (user_data); + GSList *iter; + + /* Do page interdependent changes */ + for (iter = editor->pages; iter; iter = g_slist_next (iter)) + ce_page_inter_page_change (CE_PAGE (iter->data)); + + if (editor_is_initialized (editor)) + nm_connection_editor_inter_page_clear_data (editor); connection_editor_validate (editor); } @@ -695,7 +713,7 @@ add_page (NMConnectionEditor *editor, g_return_val_if_fail (func != NULL, FALSE); g_return_val_if_fail (connection != NULL, FALSE); - page = (*func) (connection, GTK_WINDOW (editor->window), editor->client, + page = (*func) (editor, connection, GTK_WINDOW (editor->window), editor->client, &secrets_setting_name, error); if (page) { g_object_set_data_full (G_OBJECT (page), @@ -1119,3 +1137,21 @@ nm_connection_editor_warning (GtkWindow *parent, const char *heading, const char va_end (args); } +void +nm_connection_editor_inter_page_set_value (NMConnectionEditor *editor, InterPageChangeType type, gpointer value) +{ + g_hash_table_insert (editor->inter_page_hash, GUINT_TO_POINTER (type), value); +} + +gboolean +nm_connection_editor_inter_page_get_value (NMConnectionEditor *editor, InterPageChangeType type, gpointer *value) +{ + return g_hash_table_lookup_extended (editor->inter_page_hash, GUINT_TO_POINTER (type), NULL, value); +} + +void +nm_connection_editor_inter_page_clear_data (NMConnectionEditor *editor) +{ + g_hash_table_remove_all (editor->inter_page_hash); +} + diff --git a/src/connection-editor/nm-connection-editor.h b/src/connection-editor/nm-connection-editor.h index 259e8dc2..bdbab110 100644 --- a/src/connection-editor/nm-connection-editor.h +++ b/src/connection-editor/nm-connection-editor.h @@ -66,6 +66,8 @@ typedef struct { guint validate_id; char *last_validation_error; + + GHashTable *inter_page_hash; } NMConnectionEditor; typedef struct { @@ -75,6 +77,11 @@ typedef struct { void (*done) (NMConnectionEditor *editor, gint result, GError *error); } NMConnectionEditorClass; +typedef enum { + /* Add item for inter-page changes here */ + DUMMY, +} InterPageChangeType; + GType nm_connection_editor_get_type (void); NMConnectionEditor *nm_connection_editor_new (GtkWindow *parent_window, NMConnection *connection, @@ -98,4 +105,12 @@ void nm_connection_editor_warning (GtkWindow *parent, const char *format, ...); +void nm_connection_editor_inter_page_set_value (NMConnectionEditor *editor, + InterPageChangeType type, + gpointer value); +gboolean nm_connection_editor_inter_page_get_value (NMConnectionEditor *editor, + InterPageChangeType type, + gpointer *value); +void nm_connection_editor_inter_page_clear_data (NMConnectionEditor *editor); + #endif diff --git a/src/connection-editor/page-8021x-security.c b/src/connection-editor/page-8021x-security.c index f484a5d2..0ff13aeb 100644 --- a/src/connection-editor/page-8021x-security.c +++ b/src/connection-editor/page-8021x-security.c @@ -91,7 +91,8 @@ finish_setup (CEPage8021xSecurity *self, gpointer unused, GError *error, gpointe } CEPage * -ce_page_8021x_security_new (NMConnection *connection, +ce_page_8021x_security_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent_window, NMClient *client, const char **out_secrets_setting_name, @@ -102,6 +103,7 @@ ce_page_8021x_security_new (NMConnection *connection, CEPage *parent; self = CE_PAGE_8021X_SECURITY (ce_page_new (CE_TYPE_PAGE_8021X_SECURITY, + editor, connection, parent_window, client, diff --git a/src/connection-editor/page-8021x-security.h b/src/connection-editor/page-8021x-security.h index b06e33f0..439360ce 100644 --- a/src/connection-editor/page-8021x-security.h +++ b/src/connection-editor/page-8021x-security.h @@ -45,7 +45,8 @@ typedef struct { GType ce_page_8021x_security_get_type (void); -CEPage *ce_page_8021x_security_new (NMConnection *connection, +CEPage *ce_page_8021x_security_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent, NMClient *client, const char **out_secrets_setting_name, diff --git a/src/connection-editor/page-bluetooth.c b/src/connection-editor/page-bluetooth.c index 23ec596a..de51127b 100644 --- a/src/connection-editor/page-bluetooth.c +++ b/src/connection-editor/page-bluetooth.c @@ -90,7 +90,8 @@ finish_setup (CEPageBluetooth *self, gpointer unused, GError *error, gpointer us } CEPage * -ce_page_bluetooth_new (NMConnection *connection, +ce_page_bluetooth_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent_window, NMClient *client, const char **out_secrets_setting_name, @@ -100,6 +101,7 @@ ce_page_bluetooth_new (NMConnection *connection, CEPageBluetoothPrivate *priv; self = CE_PAGE_BLUETOOTH (ce_page_new (CE_TYPE_PAGE_BLUETOOTH, + editor, connection, parent_window, client, diff --git a/src/connection-editor/page-bluetooth.h b/src/connection-editor/page-bluetooth.h index dd2207a0..ae2df50c 100644 --- a/src/connection-editor/page-bluetooth.h +++ b/src/connection-editor/page-bluetooth.h @@ -47,7 +47,8 @@ typedef struct { GType ce_page_bluetooth_get_type (void); -CEPage *ce_page_bluetooth_new (NMConnection *connection, +CEPage *ce_page_bluetooth_new (NMConnectionEditor *edit, + NMConnection *connection, GtkWindow *parent, NMClient *client, const char **out_secrets_setting_name, diff --git a/src/connection-editor/page-bond.c b/src/connection-editor/page-bond.c index 9d3b7898..af608d0a 100644 --- a/src/connection-editor/page-bond.c +++ b/src/connection-editor/page-bond.c @@ -426,16 +426,18 @@ finish_setup (CEPageBond *self, gpointer unused, GError *error, gpointer user_da } CEPage * -ce_page_bond_new (NMConnection *connection, - GtkWindow *parent_window, - NMClient *client, - const char **out_secrets_setting_name, - GError **error) +ce_page_bond_new (NMConnectionEditor *editor, + NMConnection *connection, + GtkWindow *parent_window, + NMClient *client, + const char **out_secrets_setting_name, + GError **error) { CEPageBond *self; CEPageBondPrivate *priv; self = CE_PAGE_BOND (ce_page_new (CE_TYPE_PAGE_BOND, + editor, connection, parent_window, client, diff --git a/src/connection-editor/page-bond.h b/src/connection-editor/page-bond.h index 646abe1c..5b75e090 100644 --- a/src/connection-editor/page-bond.h +++ b/src/connection-editor/page-bond.h @@ -43,7 +43,8 @@ typedef struct { GType ce_page_bond_get_type (void); -CEPage *ce_page_bond_new (NMConnection *connection, +CEPage *ce_page_bond_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent, NMClient *client, const char **out_secrets_setting_name, diff --git a/src/connection-editor/page-bridge-port.c b/src/connection-editor/page-bridge-port.c index 52e62601..129f73dd 100644 --- a/src/connection-editor/page-bridge-port.c +++ b/src/connection-editor/page-bridge-port.c @@ -88,7 +88,8 @@ finish_setup (CEPageBridgePort *self, gpointer unused, GError *error, gpointer u } CEPage * -ce_page_bridge_port_new (NMConnection *connection, +ce_page_bridge_port_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent_window, NMClient *client, const char **out_secrets_setting_name, @@ -98,6 +99,7 @@ ce_page_bridge_port_new (NMConnection *connection, CEPageBridgePortPrivate *priv; self = CE_PAGE_BRIDGE_PORT (ce_page_new (CE_TYPE_PAGE_BRIDGE_PORT, + editor, connection, parent_window, client, diff --git a/src/connection-editor/page-bridge-port.h b/src/connection-editor/page-bridge-port.h index a74f7f85..748d269b 100644 --- a/src/connection-editor/page-bridge-port.h +++ b/src/connection-editor/page-bridge-port.h @@ -45,7 +45,8 @@ typedef struct { GType ce_page_bridge_port_get_type (void); -CEPage *ce_page_bridge_port_new (NMConnection *connection, +CEPage *ce_page_bridge_port_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent, NMClient *client, const char **out_secrets_setting_name, diff --git a/src/connection-editor/page-bridge.c b/src/connection-editor/page-bridge.c index d3007a41..1ec84ea2 100644 --- a/src/connection-editor/page-bridge.c +++ b/src/connection-editor/page-bridge.c @@ -192,7 +192,8 @@ finish_setup (CEPageBridge *self, gpointer unused, GError *error, gpointer user_ } CEPage * -ce_page_bridge_new (NMConnection *connection, +ce_page_bridge_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent_window, NMClient *client, const char **out_secrets_setting_name, @@ -202,6 +203,7 @@ ce_page_bridge_new (NMConnection *connection, CEPageBridgePrivate *priv; self = CE_PAGE_BRIDGE (ce_page_new (CE_TYPE_PAGE_BRIDGE, + editor, connection, parent_window, client, diff --git a/src/connection-editor/page-bridge.h b/src/connection-editor/page-bridge.h index 4b1873fa..3581b063 100644 --- a/src/connection-editor/page-bridge.h +++ b/src/connection-editor/page-bridge.h @@ -43,7 +43,8 @@ typedef struct { GType ce_page_bridge_get_type (void); -CEPage *ce_page_bridge_new (NMConnection *connection, +CEPage *ce_page_bridge_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent, NMClient *client, const char **out_secrets_setting_name, diff --git a/src/connection-editor/page-dcb.c b/src/connection-editor/page-dcb.c index b8405fe1..632a2879 100644 --- a/src/connection-editor/page-dcb.c +++ b/src/connection-editor/page-dcb.c @@ -584,7 +584,8 @@ finish_setup (CEPageDcb *self, gpointer unused, GError *error, gpointer user_dat } CEPage * -ce_page_dcb_new (NMConnection *connection, +ce_page_dcb_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent_window, NMClient *client, const char **out_secrets_setting_name, @@ -596,6 +597,7 @@ ce_page_dcb_new (NMConnection *connection, NMSettingDcb *s_dcb; self = CE_PAGE_DCB (ce_page_new (CE_TYPE_PAGE_DCB, + editor, connection, parent_window, client, diff --git a/src/connection-editor/page-dcb.h b/src/connection-editor/page-dcb.h index ad34520e..9019cc64 100644 --- a/src/connection-editor/page-dcb.h +++ b/src/connection-editor/page-dcb.h @@ -45,7 +45,8 @@ typedef struct { GType ce_page_dcb_get_type (void); -CEPage *ce_page_dcb_new (NMConnection *connection, +CEPage *ce_page_dcb_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent, NMClient *client, const char **out_secrets_setting_name, diff --git a/src/connection-editor/page-dsl.c b/src/connection-editor/page-dsl.c index aeb9f55e..7177a06b 100644 --- a/src/connection-editor/page-dsl.c +++ b/src/connection-editor/page-dsl.c @@ -110,7 +110,8 @@ finish_setup (CEPageDsl *self, gpointer unused, GError *error, gpointer user_dat } CEPage * -ce_page_dsl_new (NMConnection *connection, +ce_page_dsl_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent_window, NMClient *client, const char **out_secrets_setting_name, @@ -120,6 +121,7 @@ ce_page_dsl_new (NMConnection *connection, CEPageDslPrivate *priv; self = CE_PAGE_DSL (ce_page_new (CE_TYPE_PAGE_DSL, + editor, connection, parent_window, client, diff --git a/src/connection-editor/page-dsl.h b/src/connection-editor/page-dsl.h index e893c9a3..b5c6f1bf 100644 --- a/src/connection-editor/page-dsl.h +++ b/src/connection-editor/page-dsl.h @@ -45,7 +45,8 @@ typedef struct { GType ce_page_dsl_get_type (void); -CEPage *ce_page_dsl_new (NMConnection *connection, +CEPage *ce_page_dsl_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent, NMClient *client, const char **out_secrets_setting_name, diff --git a/src/connection-editor/page-ethernet.c b/src/connection-editor/page-ethernet.c index 7a56d356..cc754b99 100644 --- a/src/connection-editor/page-ethernet.c +++ b/src/connection-editor/page-ethernet.c @@ -298,7 +298,8 @@ finish_setup (CEPageEthernet *self, gpointer unused, GError *error, gpointer use } CEPage * -ce_page_ethernet_new (NMConnection *connection, +ce_page_ethernet_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent_window, NMClient *client, const char **out_secrets_setting_name, @@ -308,6 +309,7 @@ ce_page_ethernet_new (NMConnection *connection, CEPageEthernetPrivate *priv; self = CE_PAGE_ETHERNET (ce_page_new (CE_TYPE_PAGE_ETHERNET, + editor, connection, parent_window, client, diff --git a/src/connection-editor/page-ethernet.h b/src/connection-editor/page-ethernet.h index 0a06a57b..68ff57d2 100644 --- a/src/connection-editor/page-ethernet.h +++ b/src/connection-editor/page-ethernet.h @@ -45,7 +45,8 @@ typedef struct { GType ce_page_ethernet_get_type (void); -CEPage *ce_page_ethernet_new (NMConnection *connection, +CEPage *ce_page_ethernet_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent, NMClient *client, const char **out_secrets_setting_name, diff --git a/src/connection-editor/page-general.c b/src/connection-editor/page-general.c index 1f713287..13e8aa22 100644 --- a/src/connection-editor/page-general.c +++ b/src/connection-editor/page-general.c @@ -331,7 +331,8 @@ finish_setup (CEPageGeneral *self, gpointer unused, GError *error, gpointer user } CEPage * -ce_page_general_new (NMConnection *connection, +ce_page_general_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent_window, NMClient *client, const char **out_secrets_setting_name, @@ -341,6 +342,7 @@ ce_page_general_new (NMConnection *connection, CEPageGeneralPrivate *priv; self = CE_PAGE_GENERAL (ce_page_new (CE_TYPE_PAGE_GENERAL, + editor, connection, parent_window, client, diff --git a/src/connection-editor/page-general.h b/src/connection-editor/page-general.h index 23ee94d5..1e2f3bef 100644 --- a/src/connection-editor/page-general.h +++ b/src/connection-editor/page-general.h @@ -43,7 +43,8 @@ typedef struct { GType ce_page_general_get_type (void); -CEPage *ce_page_general_new (NMConnection *connection, +CEPage *ce_page_general_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent, NMClient *client, const char **out_secrets_setting_name, diff --git a/src/connection-editor/page-infiniband.c b/src/connection-editor/page-infiniband.c index 09c9b8f9..a0ce48ad 100644 --- a/src/connection-editor/page-infiniband.c +++ b/src/connection-editor/page-infiniband.c @@ -133,7 +133,8 @@ finish_setup (CEPageInfiniband *self, gpointer unused, GError *error, gpointer u } CEPage * -ce_page_infiniband_new (NMConnection *connection, +ce_page_infiniband_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent_window, NMClient *client, const char **out_secrets_setting_name, @@ -143,6 +144,7 @@ ce_page_infiniband_new (NMConnection *connection, CEPageInfinibandPrivate *priv; self = CE_PAGE_INFINIBAND (ce_page_new (CE_TYPE_PAGE_INFINIBAND, + editor, connection, parent_window, client, diff --git a/src/connection-editor/page-infiniband.h b/src/connection-editor/page-infiniband.h index ab452773..9feca14b 100644 --- a/src/connection-editor/page-infiniband.h +++ b/src/connection-editor/page-infiniband.h @@ -43,7 +43,8 @@ typedef struct { GType ce_page_infiniband_get_type (void); -CEPage *ce_page_infiniband_new (NMConnection *connection, +CEPage *ce_page_infiniband_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent, NMClient *client, const char **out_secrets_setting_name, diff --git a/src/connection-editor/page-ip4.c b/src/connection-editor/page-ip4.c index 48d6041f..e7c4fdd4 100644 --- a/src/connection-editor/page-ip4.c +++ b/src/connection-editor/page-ip4.c @@ -1128,7 +1128,8 @@ finish_setup (CEPageIP4 *self, gpointer unused, GError *error, gpointer user_dat } CEPage * -ce_page_ip4_new (NMConnection *connection, +ce_page_ip4_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent_window, NMClient *client, const char **out_secrets_setting_name, @@ -1139,6 +1140,7 @@ ce_page_ip4_new (NMConnection *connection, NMSettingConnection *s_con; self = CE_PAGE_IP4 (ce_page_new (CE_TYPE_PAGE_IP4, + editor, connection, parent_window, client, diff --git a/src/connection-editor/page-ip4.h b/src/connection-editor/page-ip4.h index e9886cf8..64903931 100644 --- a/src/connection-editor/page-ip4.h +++ b/src/connection-editor/page-ip4.h @@ -45,7 +45,8 @@ typedef struct { GType ce_page_ip4_get_type (void); -CEPage *ce_page_ip4_new (NMConnection *connection, +CEPage *ce_page_ip4_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent, NMClient *client, const char **out_secrets_setting_name, diff --git a/src/connection-editor/page-ip6.c b/src/connection-editor/page-ip6.c index 439858ab..8a71d17a 100644 --- a/src/connection-editor/page-ip6.c +++ b/src/connection-editor/page-ip6.c @@ -1136,7 +1136,8 @@ finish_setup (CEPageIP6 *self, gpointer unused, GError *error, gpointer user_dat } CEPage * -ce_page_ip6_new (NMConnection *connection, +ce_page_ip6_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent_window, NMClient *client, const char **out_secrets_setting_name, @@ -1147,6 +1148,7 @@ ce_page_ip6_new (NMConnection *connection, NMSettingConnection *s_con; self = CE_PAGE_IP6 (ce_page_new (CE_TYPE_PAGE_IP6, + editor, connection, parent_window, client, diff --git a/src/connection-editor/page-ip6.h b/src/connection-editor/page-ip6.h index defc23cb..4a671f4d 100644 --- a/src/connection-editor/page-ip6.h +++ b/src/connection-editor/page-ip6.h @@ -45,7 +45,8 @@ typedef struct { GType ce_page_ip6_get_type (void); -CEPage *ce_page_ip6_new (NMConnection *connection, +CEPage *ce_page_ip6_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent, NMClient *client, const char **out_secrets_setting_name, diff --git a/src/connection-editor/page-mobile.c b/src/connection-editor/page-mobile.c index 375b7173..671ece19 100644 --- a/src/connection-editor/page-mobile.c +++ b/src/connection-editor/page-mobile.c @@ -291,7 +291,8 @@ finish_setup (CEPageMobile *self, gpointer unused, GError *error, gpointer user_ } CEPage * -ce_page_mobile_new (NMConnection *connection, +ce_page_mobile_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent_window, NMClient *client, const char **out_secrets_setting_name, @@ -301,6 +302,7 @@ ce_page_mobile_new (NMConnection *connection, CEPageMobilePrivate *priv; self = CE_PAGE_MOBILE (ce_page_new (CE_TYPE_PAGE_MOBILE, + editor, connection, parent_window, client, diff --git a/src/connection-editor/page-mobile.h b/src/connection-editor/page-mobile.h index 914e8cdb..750c736d 100644 --- a/src/connection-editor/page-mobile.h +++ b/src/connection-editor/page-mobile.h @@ -45,7 +45,8 @@ typedef struct { GType ce_page_mobile_get_type (void); -CEPage *ce_page_mobile_new (NMConnection *connection, +CEPage *ce_page_mobile_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent, NMClient *client, const char **out_secrets_setting_name, diff --git a/src/connection-editor/page-ppp.c b/src/connection-editor/page-ppp.c index a6e28ee8..1a0363a7 100644 --- a/src/connection-editor/page-ppp.c +++ b/src/connection-editor/page-ppp.c @@ -262,7 +262,8 @@ finish_setup (CEPagePpp *self, gpointer unused, GError *error, gpointer user_dat } CEPage * -ce_page_ppp_new (NMConnection *connection, +ce_page_ppp_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent_window, NMClient *client, const char **out_secrets_setting_name, @@ -273,6 +274,7 @@ ce_page_ppp_new (NMConnection *connection, NMSettingConnection *s_con; self = CE_PAGE_PPP (ce_page_new (CE_TYPE_PAGE_PPP, + editor, connection, parent_window, client, diff --git a/src/connection-editor/page-ppp.h b/src/connection-editor/page-ppp.h index b7315359..c8e92467 100644 --- a/src/connection-editor/page-ppp.h +++ b/src/connection-editor/page-ppp.h @@ -45,7 +45,8 @@ typedef struct { GType ce_page_ppp_get_type (void); -CEPage *ce_page_ppp_new (NMConnection *connection, +CEPage *ce_page_ppp_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent, NMClient *client, const char **out_secrets_setting_name, diff --git a/src/connection-editor/page-team-port.c b/src/connection-editor/page-team-port.c index ebf86e01..dbad57fe 100644 --- a/src/connection-editor/page-team-port.c +++ b/src/connection-editor/page-team-port.c @@ -131,7 +131,8 @@ finish_setup (CEPageTeamPort *self, gpointer unused, GError *error, gpointer use } CEPage * -ce_page_team_port_new (NMConnection *connection, +ce_page_team_port_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent_window, NMClient *client, const char **out_secrets_setting_name, @@ -141,6 +142,7 @@ ce_page_team_port_new (NMConnection *connection, CEPageTeamPortPrivate *priv; self = CE_PAGE_TEAM_PORT (ce_page_new (CE_TYPE_PAGE_TEAM_PORT, + editor, connection, parent_window, client, diff --git a/src/connection-editor/page-team-port.h b/src/connection-editor/page-team-port.h index e086de40..62d24cdc 100644 --- a/src/connection-editor/page-team-port.h +++ b/src/connection-editor/page-team-port.h @@ -43,7 +43,8 @@ typedef struct { GType ce_page_team_port_get_type (void); -CEPage *ce_page_team_port_new (NMConnection *connection, +CEPage *ce_page_team_port_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent, NMClient *client, const char **out_secrets_setting_name, diff --git a/src/connection-editor/page-team.c b/src/connection-editor/page-team.c index 1ac337fb..2ddf4d15 100644 --- a/src/connection-editor/page-team.c +++ b/src/connection-editor/page-team.c @@ -249,16 +249,18 @@ finish_setup (CEPageTeam *self, gpointer unused, GError *error, gpointer user_da } CEPage * -ce_page_team_new (NMConnection *connection, - GtkWindow *parent_window, - NMClient *client, - const char **out_secrets_setting_name, - GError **error) +ce_page_team_new (NMConnectionEditor *editor, + NMConnection *connection, + GtkWindow *parent_window, + NMClient *client, + const char **out_secrets_setting_name, + GError **error) { CEPageTeam *self; CEPageTeamPrivate *priv; self = CE_PAGE_TEAM (ce_page_new (CE_TYPE_PAGE_TEAM, + editor, connection, parent_window, client, diff --git a/src/connection-editor/page-team.h b/src/connection-editor/page-team.h index d3a5270a..68f5ff2a 100644 --- a/src/connection-editor/page-team.h +++ b/src/connection-editor/page-team.h @@ -43,7 +43,8 @@ typedef struct { GType ce_page_team_get_type (void); -CEPage *ce_page_team_new (NMConnection *connection, +CEPage *ce_page_team_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent, NMClient *client, const char **out_secrets_setting_name, diff --git a/src/connection-editor/page-vlan.c b/src/connection-editor/page-vlan.c index 5df091c4..ea2891c5 100644 --- a/src/connection-editor/page-vlan.c +++ b/src/connection-editor/page-vlan.c @@ -571,7 +571,8 @@ finish_setup (CEPageVlan *self, gpointer unused, GError *error, gpointer user_da } CEPage * -ce_page_vlan_new (NMConnection *connection, +ce_page_vlan_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent_window, NMClient *client, const char **out_secrets_setting_name, @@ -581,6 +582,7 @@ ce_page_vlan_new (NMConnection *connection, CEPageVlanPrivate *priv; self = CE_PAGE_VLAN (ce_page_new (CE_TYPE_PAGE_VLAN, + editor, connection, parent_window, client, diff --git a/src/connection-editor/page-vlan.h b/src/connection-editor/page-vlan.h index 5a96e02f..f0f72380 100644 --- a/src/connection-editor/page-vlan.h +++ b/src/connection-editor/page-vlan.h @@ -43,7 +43,8 @@ typedef struct { GType ce_page_vlan_get_type (void); -CEPage *ce_page_vlan_new (NMConnection *connection, +CEPage *ce_page_vlan_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent, NMClient *client, const char **out_secrets_setting_name, diff --git a/src/connection-editor/page-vpn.c b/src/connection-editor/page-vpn.c index 376a40a3..6e100f60 100644 --- a/src/connection-editor/page-vpn.c +++ b/src/connection-editor/page-vpn.c @@ -84,7 +84,8 @@ finish_setup (CEPageVpn *self, gpointer unused, GError *error, gpointer user_dat } CEPage * -ce_page_vpn_new (NMConnection *connection, +ce_page_vpn_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent_window, NMClient *client, const char **out_secrets_setting_name, @@ -95,6 +96,7 @@ ce_page_vpn_new (NMConnection *connection, const char *service_type; self = CE_PAGE_VPN (ce_page_new (CE_TYPE_PAGE_VPN, + editor, connection, parent_window, client, diff --git a/src/connection-editor/page-vpn.h b/src/connection-editor/page-vpn.h index d9df6a14..62a4d9d0 100644 --- a/src/connection-editor/page-vpn.h +++ b/src/connection-editor/page-vpn.h @@ -45,7 +45,8 @@ typedef struct { GType ce_page_vpn_get_type (void); -CEPage *ce_page_vpn_new (NMConnection *connection, +CEPage *ce_page_vpn_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent, NMClient *client, const char **out_secrets_setting_name, diff --git a/src/connection-editor/page-wifi-security.c b/src/connection-editor/page-wifi-security.c index 671011cb..b6fade01 100644 --- a/src/connection-editor/page-wifi-security.c +++ b/src/connection-editor/page-wifi-security.c @@ -399,7 +399,8 @@ finish_setup (CEPageWifiSecurity *self, gpointer unused, GError *error, gpointer } CEPage * -ce_page_wifi_security_new (NMConnection *connection, +ce_page_wifi_security_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent_window, NMClient *client, const char **out_secrets_setting_name, @@ -417,6 +418,7 @@ ce_page_wifi_security_new (NMConnection *connection, } self = CE_PAGE_WIFI_SECURITY (ce_page_new (CE_TYPE_PAGE_WIFI_SECURITY, + editor, connection, parent_window, client, diff --git a/src/connection-editor/page-wifi-security.h b/src/connection-editor/page-wifi-security.h index a4b2d489..1565cc1f 100644 --- a/src/connection-editor/page-wifi-security.h +++ b/src/connection-editor/page-wifi-security.h @@ -46,7 +46,8 @@ typedef struct { GType ce_page_wifi_security_get_type (void); -CEPage *ce_page_wifi_security_new (NMConnection *connection, +CEPage *ce_page_wifi_security_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent, NMClient *client, const char **out_secrets_setting_name, diff --git a/src/connection-editor/page-wifi.c b/src/connection-editor/page-wifi.c index 1724ec30..d9dcb695 100644 --- a/src/connection-editor/page-wifi.c +++ b/src/connection-editor/page-wifi.c @@ -28,6 +28,7 @@ #include <gtk/gtk.h> #include <glib/gi18n.h> +#include "nm-connection-editor.h" #include "page-wifi.h" G_DEFINE_TYPE (CEPageWifi, ce_page_wifi, CE_TYPE_PAGE) @@ -422,7 +423,8 @@ finish_setup (CEPageWifi *self, gpointer unused, GError *error, gpointer user_da } CEPage * -ce_page_wifi_new (NMConnection *connection, +ce_page_wifi_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent_window, NMClient *client, const char **out_secrets_setting_name, @@ -434,6 +436,7 @@ ce_page_wifi_new (NMConnection *connection, g_return_val_if_fail (NM_IS_CONNECTION (connection), NULL); self = CE_PAGE_WIFI (ce_page_new (CE_TYPE_PAGE_WIFI, + editor, connection, parent_window, client, diff --git a/src/connection-editor/page-wifi.h b/src/connection-editor/page-wifi.h index c12c0290..d1f0d63e 100644 --- a/src/connection-editor/page-wifi.h +++ b/src/connection-editor/page-wifi.h @@ -45,7 +45,8 @@ typedef struct { GType ce_page_wifi_get_type (void); -CEPage *ce_page_wifi_new (NMConnection *connection, +CEPage *ce_page_wifi_new (NMConnectionEditor *editor, + NMConnection *connection, GtkWindow *parent, NMClient *client, const char **out_secrets_setting_name, |