[network-manager-applet/jk/wifi-ap-mode-bgo755663: 3/4] editor: allow changes on one page modify other pages
- From: Jiří Klimeš <jklimes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/jk/wifi-ap-mode-bgo755663: 3/4] editor: allow changes on one page modify other pages
- Date: Wed, 7 Oct 2015 08:50:11 +0000 (UTC)
commit e406efba18b7e938d51721a0ed082216df80834e
Author: Jiří Klimeš <jklimes redhat com>
Date: Fri Oct 2 11:33:17 2015 +0200
editor: allow changes on one page modify other pages
Changes in properties on a page may require changes on other pages. Let's add
an infrastructure for that.
When a change should influence other page(s), the information is set using
nm_connection_editor_inter_page_set_value(). And then that can be retrieved by
nm_connection_editor_inter_page_get_value() in another page in method
inter_page_change().
src/connection-editor/ce-page.c | 20 +++++++++++++
src/connection-editor/ce-page.h | 10 ++++++-
src/connection-editor/nm-connection-editor.c | 39 +++++++++++++++++++++++++-
src/connection-editor/nm-connection-editor.h | 14 +++++++++
src/connection-editor/page-8021x-security.c | 4 ++-
src/connection-editor/page-8021x-security.h | 3 +-
src/connection-editor/page-bluetooth.c | 4 ++-
src/connection-editor/page-bluetooth.h | 3 +-
src/connection-editor/page-bond.c | 12 ++++---
src/connection-editor/page-bond.h | 3 +-
src/connection-editor/page-bridge-port.c | 4 ++-
src/connection-editor/page-bridge-port.h | 3 +-
src/connection-editor/page-bridge.c | 4 ++-
src/connection-editor/page-bridge.h | 3 +-
src/connection-editor/page-dcb.c | 4 ++-
src/connection-editor/page-dcb.h | 3 +-
src/connection-editor/page-dsl.c | 4 ++-
src/connection-editor/page-dsl.h | 3 +-
src/connection-editor/page-ethernet.c | 4 ++-
src/connection-editor/page-ethernet.h | 3 +-
src/connection-editor/page-general.c | 4 ++-
src/connection-editor/page-general.h | 13 ++++----
src/connection-editor/page-infiniband.c | 4 ++-
src/connection-editor/page-infiniband.h | 3 +-
src/connection-editor/page-ip4.c | 4 ++-
src/connection-editor/page-ip4.h | 3 +-
src/connection-editor/page-ip6.c | 4 ++-
src/connection-editor/page-ip6.h | 3 +-
src/connection-editor/page-mobile.c | 4 ++-
src/connection-editor/page-mobile.h | 3 +-
src/connection-editor/page-ppp.c | 4 ++-
src/connection-editor/page-ppp.h | 3 +-
src/connection-editor/page-team-port.c | 14 +++++----
src/connection-editor/page-team-port.h | 3 +-
src/connection-editor/page-team.c | 12 ++++---
src/connection-editor/page-team.h | 3 +-
src/connection-editor/page-vlan.c | 4 ++-
src/connection-editor/page-vlan.h | 3 +-
src/connection-editor/page-vpn.c | 4 ++-
src/connection-editor/page-vpn.h | 3 +-
src/connection-editor/page-wifi-security.c | 4 ++-
src/connection-editor/page-wifi-security.h | 3 +-
src/connection-editor/page-wifi.c | 5 ++-
src/connection-editor/page-wifi.h | 3 +-
src/connection-editor/page-wimax.c | 4 ++-
src/connection-editor/page-wimax.h | 3 +-
46 files changed, 205 insertions(+), 62 deletions(-)
---
diff --git a/src/connection-editor/ce-page.c b/src/connection-editor/ce-page.c
index 0543558..f837a22 100644
--- a/src/connection-editor/ce-page.c
+++ b/src/connection-editor/ce-page.c
@@ -155,6 +155,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 int
hwaddr_binary_len (const char *asc)
{
@@ -884,6 +902,7 @@ ce_page_new_connection (const char *format,
CEPage *
ce_page_new (GType page_type,
+ NMConnectionEditor *editor,
NMConnection *connection,
GtkWindow *parent_window,
NMClient *client,
@@ -906,6 +925,7 @@ ce_page_new (GType page_type,
self->title = g_strdup (title);
self->client = client;
self->settings = settings;
+ 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 fe5e8bd..69955f5 100644
--- a/src/connection-editor/ce-page.h
+++ b/src/connection-editor/ce-page.h
@@ -32,6 +32,7 @@
#include <nm-connection.h>
#include <nm-client.h>
#include <nm-remote-settings.h>
+#include "nm-connection-editor.h"
#include "utils.h"
/* for ARPHRD_ETHER / ARPHRD_INFINIBAND for MAC utilies */
@@ -65,6 +66,7 @@ typedef struct {
GObject parent;
gboolean initialized;
+ gboolean inter_page_change_running;
GtkBuilder *builder;
GtkWidget *page;
char *title;
@@ -72,6 +74,7 @@ typedef struct {
DBusGProxy *proxy;
gulong secrets_done_validate;
+ NMConnectionEditor *editor;
NMConnection *connection;
GtkWindow *parent_window;
NMClient *client;
@@ -84,6 +87,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);
@@ -91,7 +95,8 @@ typedef struct {
} CEPageClass;
-typedef CEPage* (*CEPageNewFunc)(NMConnection *connection,
+typedef CEPage* (*CEPageNewFunc)(NMConnectionEditor *editor,
+ NMConnection *connection,
GtkWindow *parent,
NMClient *client,
NMRemoteSettings *settings,
@@ -107,6 +112,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 GByteArray *mac, int type, char **mac_list);
@@ -154,6 +160,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,
@@ -162,5 +169,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 5997ea1..580ccc5 100644
--- a/src/connection-editor/nm-connection-editor.c
+++ b/src/connection-editor/nm-connection-editor.c
@@ -281,6 +281,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;
@@ -313,6 +319,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
@@ -386,6 +394,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);
}
@@ -535,6 +545,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);
}
@@ -721,7 +739,8 @@ 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, editor->settings,
+ page = (*func) (editor, connection, GTK_WINDOW (editor->window),
+ editor->client, editor->settings,
&secrets_setting_name, error);
if (page) {
g_object_set_data_full (G_OBJECT (page),
@@ -1140,3 +1159,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 cf5671a..5636cc5 100644
--- a/src/connection-editor/nm-connection-editor.h
+++ b/src/connection-editor/nm-connection-editor.h
@@ -67,6 +67,8 @@ typedef struct {
guint validate_id;
char *last_validation_error;
+
+ GHashTable *inter_page_hash;
} NMConnectionEditor;
typedef struct {
@@ -76,6 +78,10 @@ typedef struct {
void (*done) (NMConnectionEditor *editor, gint result, GError *error);
} NMConnectionEditorClass;
+typedef enum {
+ /* Add item for inter-page changes here */
+} InterPageChangeType;
+
GType nm_connection_editor_get_type (void);
NMConnectionEditor *nm_connection_editor_new (GtkWindow *parent_window,
NMConnection *connection,
@@ -100,4 +106,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 eec4216..94ab375 100644
--- a/src/connection-editor/page-8021x-security.c
+++ b/src/connection-editor/page-8021x-security.c
@@ -98,7 +98,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,
NMRemoteSettings *settings,
@@ -110,6 +111,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 fc749e3..9bdf47e 100644
--- a/src/connection-editor/page-8021x-security.h
+++ b/src/connection-editor/page-8021x-security.h
@@ -49,7 +49,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,
NMRemoteSettings *settings,
diff --git a/src/connection-editor/page-bluetooth.c b/src/connection-editor/page-bluetooth.c
index 4c697b8..d2b3ae4 100644
--- a/src/connection-editor/page-bluetooth.c
+++ b/src/connection-editor/page-bluetooth.c
@@ -89,7 +89,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,
NMRemoteSettings *settings,
@@ -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 fb98865..01890c4 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,
NMRemoteSettings *settings,
diff --git a/src/connection-editor/page-bond.c b/src/connection-editor/page-bond.c
index bc66e0a..0dffd9d 100644
--- a/src/connection-editor/page-bond.c
+++ b/src/connection-editor/page-bond.c
@@ -430,17 +430,19 @@ finish_setup (CEPageBond *self, gpointer unused, GError *error, gpointer user_da
}
CEPage *
-ce_page_bond_new (NMConnection *connection,
- GtkWindow *parent_window,
- NMClient *client,
+ce_page_bond_new (NMConnectionEditor *editor,
+ NMConnection *connection,
+ GtkWindow *parent_window,
+ NMClient *client,
NMRemoteSettings *settings,
- const char **out_secrets_setting_name,
- GError **error)
+ 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 dcc8e1f..fdaa97e 100644
--- a/src/connection-editor/page-bond.h
+++ b/src/connection-editor/page-bond.h
@@ -45,7 +45,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,
NMRemoteSettings *settings,
diff --git a/src/connection-editor/page-bridge-port.c b/src/connection-editor/page-bridge-port.c
index 0070689..f9a4ea4 100644
--- a/src/connection-editor/page-bridge-port.c
+++ b/src/connection-editor/page-bridge-port.c
@@ -92,7 +92,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,
NMRemoteSettings *settings,
@@ -103,6 +104,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 2a35240..eecda9d 100644
--- a/src/connection-editor/page-bridge-port.h
+++ b/src/connection-editor/page-bridge-port.h
@@ -47,7 +47,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,
NMRemoteSettings *settings,
diff --git a/src/connection-editor/page-bridge.c b/src/connection-editor/page-bridge.c
index e4ce500..a159993 100644
--- a/src/connection-editor/page-bridge.c
+++ b/src/connection-editor/page-bridge.c
@@ -189,7 +189,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,
NMRemoteSettings *settings,
@@ -200,6 +201,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 fa6d927..1fe4e5f 100644
--- a/src/connection-editor/page-bridge.h
+++ b/src/connection-editor/page-bridge.h
@@ -45,7 +45,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,
NMRemoteSettings *settings,
diff --git a/src/connection-editor/page-dcb.c b/src/connection-editor/page-dcb.c
index 2306ec5..e666047 100644
--- a/src/connection-editor/page-dcb.c
+++ b/src/connection-editor/page-dcb.c
@@ -583,7 +583,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,
NMRemoteSettings *settings,
@@ -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 2420b26..2bc5dca 100644
--- a/src/connection-editor/page-dcb.h
+++ b/src/connection-editor/page-dcb.h
@@ -49,7 +49,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,
NMRemoteSettings *settings,
diff --git a/src/connection-editor/page-dsl.c b/src/connection-editor/page-dsl.c
index 17fbc34..c06dfff 100644
--- a/src/connection-editor/page-dsl.c
+++ b/src/connection-editor/page-dsl.c
@@ -115,7 +115,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,
NMRemoteSettings *settings,
@@ -126,6 +127,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 514699a..f3b0b30 100644
--- a/src/connection-editor/page-dsl.h
+++ b/src/connection-editor/page-dsl.h
@@ -47,7 +47,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,
NMRemoteSettings *settings,
diff --git a/src/connection-editor/page-ethernet.c b/src/connection-editor/page-ethernet.c
index c4da0e8..92404c8 100644
--- a/src/connection-editor/page-ethernet.c
+++ b/src/connection-editor/page-ethernet.c
@@ -218,7 +218,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,
NMRemoteSettings *settings,
@@ -229,6 +230,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 4dd4a5c..edc331d 100644
--- a/src/connection-editor/page-ethernet.h
+++ b/src/connection-editor/page-ethernet.h
@@ -47,7 +47,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,
NMRemoteSettings *settings,
diff --git a/src/connection-editor/page-general.c b/src/connection-editor/page-general.c
index be206b0..23e8801 100644
--- a/src/connection-editor/page-general.c
+++ b/src/connection-editor/page-general.c
@@ -302,7 +302,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,
NMRemoteSettings *settings,
@@ -313,6 +314,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 d8a2a2f..f927d9a 100644
--- a/src/connection-editor/page-general.h
+++ b/src/connection-editor/page-general.h
@@ -45,12 +45,13 @@ typedef struct {
GType ce_page_general_get_type (void);
-CEPage *ce_page_general_new (NMConnection *connection,
- GtkWindow *parent,
- NMClient *client,
- NMRemoteSettings *settings,
- const char **out_secrets_setting_name,
- GError **error);
+CEPage *ce_page_general_new (NMConnectionEditor *editor,
+ NMConnection *connection,
+ GtkWindow *parent,
+ NMClient *client,
+ NMRemoteSettings *settings,
+ const char **out_secrets_setting_name,
+ GError **error);
#endif /* __PAGE_GENERAL_H__ */
diff --git a/src/connection-editor/page-infiniband.c b/src/connection-editor/page-infiniband.c
index bb6013e..8e1eae6 100644
--- a/src/connection-editor/page-infiniband.c
+++ b/src/connection-editor/page-infiniband.c
@@ -138,7 +138,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,
NMRemoteSettings *settings,
@@ -149,6 +150,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 e895a98..af6d7aa 100644
--- a/src/connection-editor/page-infiniband.h
+++ b/src/connection-editor/page-infiniband.h
@@ -45,7 +45,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,
NMRemoteSettings *settings,
diff --git a/src/connection-editor/page-ip4.c b/src/connection-editor/page-ip4.c
index bb47ee5..4c5574e 100644
--- a/src/connection-editor/page-ip4.c
+++ b/src/connection-editor/page-ip4.c
@@ -988,7 +988,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,
NMRemoteSettings *settings,
@@ -1000,6 +1001,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 4fcad4c..dad8458 100644
--- a/src/connection-editor/page-ip4.h
+++ b/src/connection-editor/page-ip4.h
@@ -47,7 +47,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,
NMRemoteSettings *settings,
diff --git a/src/connection-editor/page-ip6.c b/src/connection-editor/page-ip6.c
index 1353d25..eb252e3 100644
--- a/src/connection-editor/page-ip6.c
+++ b/src/connection-editor/page-ip6.c
@@ -983,7 +983,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,
NMRemoteSettings *settings,
@@ -995,6 +996,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 433fa14..d91c4a2 100644
--- a/src/connection-editor/page-ip6.h
+++ b/src/connection-editor/page-ip6.h
@@ -47,7 +47,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,
NMRemoteSettings *settings,
diff --git a/src/connection-editor/page-mobile.c b/src/connection-editor/page-mobile.c
index 0a7704f..541a364 100644
--- a/src/connection-editor/page-mobile.c
+++ b/src/connection-editor/page-mobile.c
@@ -298,7 +298,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,
NMRemoteSettings *settings,
@@ -309,6 +310,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 ab2903c..d370ca4 100644
--- a/src/connection-editor/page-mobile.h
+++ b/src/connection-editor/page-mobile.h
@@ -47,7 +47,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,
NMRemoteSettings *settings,
diff --git a/src/connection-editor/page-ppp.c b/src/connection-editor/page-ppp.c
index fe67bca..14f9a05 100644
--- a/src/connection-editor/page-ppp.c
+++ b/src/connection-editor/page-ppp.c
@@ -265,7 +265,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,
NMRemoteSettings *settings,
@@ -277,6 +278,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 9b53575..604ace0 100644
--- a/src/connection-editor/page-ppp.h
+++ b/src/connection-editor/page-ppp.h
@@ -47,7 +47,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,
NMRemoteSettings *settings,
diff --git a/src/connection-editor/page-team-port.c b/src/connection-editor/page-team-port.c
index 3b965de..f6b2bf5 100644
--- a/src/connection-editor/page-team-port.c
+++ b/src/connection-editor/page-team-port.c
@@ -134,17 +134,19 @@ finish_setup (CEPageTeamPort *self, gpointer unused, GError *error, gpointer use
}
CEPage *
-ce_page_team_port_new (NMConnection *connection,
- GtkWindow *parent_window,
- NMClient *client,
- NMRemoteSettings *settings,
- const char **out_secrets_setting_name,
- GError **error)
+ce_page_team_port_new (NMConnectionEditor *editor,
+ NMConnection *connection,
+ GtkWindow *parent_window,
+ NMClient *client,
+ NMRemoteSettings *settings,
+ const char **out_secrets_setting_name,
+ GError **error)
{
CEPageTeamPort *self;
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 6eccb15..91df050 100644
--- a/src/connection-editor/page-team-port.h
+++ b/src/connection-editor/page-team-port.h
@@ -44,7 +44,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,
NMRemoteSettings *settings,
diff --git a/src/connection-editor/page-team.c b/src/connection-editor/page-team.c
index edec9d0..700f87d 100644
--- a/src/connection-editor/page-team.c
+++ b/src/connection-editor/page-team.c
@@ -250,17 +250,19 @@ finish_setup (CEPageTeam *self, gpointer unused, GError *error, gpointer user_da
}
CEPage *
-ce_page_team_new (NMConnection *connection,
- GtkWindow *parent_window,
- NMClient *client,
+ce_page_team_new (NMConnectionEditor *editor,
+ NMConnection *connection,
+ GtkWindow *parent_window,
+ NMClient *client,
NMRemoteSettings *settings,
- const char **out_secrets_setting_name,
- GError **error)
+ 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 d1936b3..e3cb133 100644
--- a/src/connection-editor/page-team.h
+++ b/src/connection-editor/page-team.h
@@ -44,7 +44,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,
NMRemoteSettings *settings,
diff --git a/src/connection-editor/page-vlan.c b/src/connection-editor/page-vlan.c
index 7e97525..3f24fc7 100644
--- a/src/connection-editor/page-vlan.c
+++ b/src/connection-editor/page-vlan.c
@@ -481,7 +481,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,
NMRemoteSettings *settings,
@@ -492,6 +493,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 0e66a06..80c73c0 100644
--- a/src/connection-editor/page-vlan.h
+++ b/src/connection-editor/page-vlan.h
@@ -45,7 +45,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,
NMRemoteSettings *settings,
diff --git a/src/connection-editor/page-vpn.c b/src/connection-editor/page-vpn.c
index fac255d..6596c0e 100644
--- a/src/connection-editor/page-vpn.c
+++ b/src/connection-editor/page-vpn.c
@@ -91,7 +91,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,
NMRemoteSettings *settings,
@@ -103,6 +104,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 2339732..7d74930 100644
--- a/src/connection-editor/page-vpn.h
+++ b/src/connection-editor/page-vpn.h
@@ -47,7 +47,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,
NMRemoteSettings *settings,
diff --git a/src/connection-editor/page-wifi-security.c b/src/connection-editor/page-wifi-security.c
index d52498c..e39da1a 100644
--- a/src/connection-editor/page-wifi-security.c
+++ b/src/connection-editor/page-wifi-security.c
@@ -406,7 +406,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,
NMRemoteSettings *settings,
@@ -425,6 +426,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 db35836..ba0ddde 100644
--- a/src/connection-editor/page-wifi-security.h
+++ b/src/connection-editor/page-wifi-security.h
@@ -50,7 +50,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,
NMRemoteSettings *settings,
diff --git a/src/connection-editor/page-wifi.c b/src/connection-editor/page-wifi.c
index 3ac3481..cbcd3b0 100644
--- a/src/connection-editor/page-wifi.c
+++ b/src/connection-editor/page-wifi.c
@@ -33,6 +33,7 @@
#include <nm-device-wifi.h>
#include <nm-utils.h>
+#include "nm-connection-editor.h"
#include "page-wifi.h"
G_DEFINE_TYPE (CEPageWifi, ce_page_wifi, CE_TYPE_PAGE)
@@ -430,7 +431,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,
NMRemoteSettings *settings,
@@ -443,6 +445,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 c039b00..eee167c 100644
--- a/src/connection-editor/page-wifi.h
+++ b/src/connection-editor/page-wifi.h
@@ -47,7 +47,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,
NMRemoteSettings *settings,
diff --git a/src/connection-editor/page-wimax.c b/src/connection-editor/page-wimax.c
index 77245e6..e7a470e 100644
--- a/src/connection-editor/page-wimax.c
+++ b/src/connection-editor/page-wimax.c
@@ -99,7 +99,8 @@ finish_setup (CEPageWimax *self, gpointer unused, GError *error, gpointer user_d
}
CEPage *
-ce_page_wimax_new (NMConnection *connection,
+ce_page_wimax_new (NMConnectionEditor *editor,
+ NMConnection *connection,
GtkWindow *parent_window,
NMClient *client,
NMRemoteSettings *settings,
@@ -112,6 +113,7 @@ ce_page_wimax_new (NMConnection *connection,
g_return_val_if_fail (NM_IS_CONNECTION (connection), NULL);
self = CE_PAGE_WIMAX (ce_page_new (CE_TYPE_PAGE_WIMAX,
+ editor,
connection,
parent_window,
client,
diff --git a/src/connection-editor/page-wimax.h b/src/connection-editor/page-wimax.h
index 6938284..4a40048 100644
--- a/src/connection-editor/page-wimax.h
+++ b/src/connection-editor/page-wimax.h
@@ -45,7 +45,8 @@ typedef struct {
GType ce_page_wimax_get_type (void);
-CEPage *ce_page_wimax_new (NMConnection *connection,
+CEPage *ce_page_wimax_new (NMConnectionEditor *editor,
+ NMConnection *connection,
GtkWindow *parent,
NMClient *client,
NMRemoteSettings *settings,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]