summaryrefslogtreecommitdiff
path: root/src/connection-editor/nm-connection-editor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/connection-editor/nm-connection-editor.c')
-rw-r--r--src/connection-editor/nm-connection-editor.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/connection-editor/nm-connection-editor.c b/src/connection-editor/nm-connection-editor.c
index f668d01f..b0c9ab6f 100644
--- a/src/connection-editor/nm-connection-editor.c
+++ b/src/connection-editor/nm-connection-editor.c
@@ -72,6 +72,7 @@ G_DEFINE_TYPE (NMConnectionEditor, nm_connection_editor, G_TYPE_OBJECT)
enum {
EDITOR_DONE,
+ NEW_EDITOR,
EDITOR_LAST_SIGNAL
};
@@ -543,6 +544,13 @@ nm_connection_editor_class_init (NMConnectionEditorClass *klass)
G_SIGNAL_RUN_FIRST,
0, NULL, NULL, NULL,
G_TYPE_NONE, 1, GTK_TYPE_RESPONSE_TYPE);
+
+ editor_signals[NEW_EDITOR] =
+ g_signal_new (NM_CONNECTION_EDITOR_NEW_EDITOR,
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ 0, NULL, NULL, NULL,
+ G_TYPE_NONE, 1, G_TYPE_POINTER);
}
NMConnectionEditor *
@@ -788,6 +796,14 @@ page_initialized (CEPage *page, GError *error, gpointer user_data)
recheck_initialization (editor);
}
+static void
+page_new_editor (CEPage *page, NMConnectionEditor *new_editor, gpointer user_data)
+{
+ NMConnectionEditor *self = NM_CONNECTION_EDITOR (user_data);
+
+ g_signal_emit (self, editor_signals[NEW_EDITOR], 0, new_editor);
+}
+
static void request_secrets (GetSecretsInfo *info);
static void
@@ -898,6 +914,7 @@ add_page (NMConnectionEditor *editor,
editor->initializing_pages = g_slist_append (editor->initializing_pages, page);
g_signal_connect (page, CE_PAGE_CHANGED, G_CALLBACK (page_changed), editor);
g_signal_connect (page, CE_PAGE_INITIALIZED, G_CALLBACK (page_initialized), editor);
+ g_signal_connect (page, CE_PAGE_NEW_EDITOR, G_CALLBACK (page_new_editor), editor);
}
return !!page;
}