Commit 7eb484ec authored by Lubomir Rintel's avatar Lubomir Rintel
Browse files

editor/connection-editor: propagate the new-editor signal

parent b73e046a
......@@ -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;
}
......
......@@ -32,7 +32,8 @@
#define NM_IS_CONNECTION_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_CONNECTION_EDITOR))
#define NM_CONNECTION_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_CONNECTION_EDITOR, NMConnectionEditor))
#define NM_CONNECTION_EDITOR_DONE "done"
#define NM_CONNECTION_EDITOR_DONE "done"
#define NM_CONNECTION_EDITOR_NEW_EDITOR "new-editor"
typedef struct GetSecretsInfo GetSecretsInfo;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment