# HG changeset patch
# Node ID 51237ea7c337664bb0bf4ee6f66ebe5f69920ff5
# Parent  bd76f53bd582563562ba2def7b77c2aed51a6d54
diff --git a/libpurple/core.c b/libpurple/core.c
--- a/libpurple/core.c
+++ b/libpurple/core.c
@@ -111,9 +111,6 @@
 
 	purple_util_init();
 
-	purple_signal_register(core, "core-initialized", purple_marshal_VOID,
-		G_TYPE_NONE, 0);
-
 	purple_core_print_version();
 
 	/* The prefs subsystem needs to be initialized before static protocols
@@ -182,8 +179,6 @@
 		return FALSE;
 	}
 
-	purple_signal_emit(purple_get_core(), "core-initialized");
-
 	return TRUE;
 }
 
diff --git a/libpurple/purplecredentialmanager.c b/libpurple/purplecredentialmanager.c
--- a/libpurple/purplecredentialmanager.c
+++ b/libpurple/purplecredentialmanager.c
@@ -133,7 +133,9 @@
  * Purple Callbacks
  *****************************************************************************/
 static void
-purple_credential_manager_core_init_cb(gpointer data) {
+purple_credential_manager_ui_started_cb(G_GNUC_UNUSED PurpleUi *ui,
+                                        gpointer data)
+{
 	PurpleCredentialManager *manager = PURPLE_CREDENTIAL_MANAGER(data);
 
 	if(!PURPLE_IS_CREDENTIAL_PROVIDER(manager->active)) {
@@ -272,8 +274,9 @@
 static PurpleCredentialProvider *noop = NULL;
 
 void
-purple_credential_manager_startup(PurpleCore *core) {
+purple_credential_manager_startup(G_GNUC_UNUSED PurpleCore *core) {
 	if(default_manager == NULL) {
+		PurpleUi *ui = NULL;
 		GError *error = NULL;
 		gpointer backend;
 
@@ -283,12 +286,10 @@
 		default_manager->settings = g_settings_new_with_backend("im.pidgin.Purple.Credentials",
 		                                                        backend);
 
-		/* Connect to the core-initialized signal so we can alert the user if
-		 * we were unable to find their credential provider.
-		 */
-		purple_signal_connect(core, "core-initialized", default_manager,
-		                      G_CALLBACK(purple_credential_manager_core_init_cb),
-		                      default_manager);
+		ui = purple_core_get_ui();
+		g_signal_connect_object(ui, "started",
+		                        G_CALLBACK(purple_credential_manager_ui_started_cb),
+		                        default_manager, G_CONNECT_DEFAULT);
 
 		noop = purple_noop_credential_provider_new();
 		if(!purple_credential_manager_register(default_manager, noop, &error)) {
diff --git a/libpurple/purpleui.c b/libpurple/purpleui.c
--- a/libpurple/purpleui.c
+++ b/libpurple/purpleui.c
@@ -45,6 +45,12 @@
 };
 static GParamSpec *properties[N_PROPERTIES] = {NULL, };
 
+enum {
+	SIG_STARTED,
+	N_SIGNALS,
+};
+static guint signals[N_SIGNALS] = {0, };
+
 G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE(PurpleUi, purple_ui, G_TYPE_OBJECT)
 
 /******************************************************************************
@@ -298,6 +304,24 @@
 		G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
 
 	g_object_class_install_properties(obj_class, N_PROPERTIES, properties);
+
+	/**
+	 * PurpleUi::started:
+	 *
+	 * Emitted if [method@Ui.start] completed successfully.
+	 *
+	 * Since: 3.0
+	 */
+	signals[SIG_STARTED] = g_signal_new_class_handler(
+		"started",
+		G_OBJECT_CLASS_TYPE(klass),
+		G_SIGNAL_RUN_LAST,
+		NULL,
+		NULL,
+		NULL,
+		NULL,
+		G_TYPE_NONE,
+		0);
 }
 
 /******************************************************************************
@@ -443,7 +467,13 @@
 
 	klass = PURPLE_UI_GET_CLASS(ui);
 	if(klass != NULL && klass->start != NULL) {
-		return klass->start(ui, error);
+		if(klass->start(ui, error)) {
+			g_signal_emit(ui, signals[SIG_STARTED], 0);
+
+			return TRUE;
+		}
+
+		return FALSE;
 	}
 
 	return FALSE;
diff --git a/libpurple/reference/libpurple.toml.in b/libpurple/reference/libpurple.toml.in
--- a/libpurple/reference/libpurple.toml.in
+++ b/libpurple/reference/libpurple.toml.in
@@ -39,7 +39,6 @@
 content_files = [
 	"contributing.md",
 	"signals_connection.md",
-	"signals_core.md",
 	"tut_c_plugins.md",
 ]
 content_images = [
@@ -68,4 +67,4 @@
 
 [[object]]
 name = "UNAVAILABLE_TYPE"
-hidden = true
\ No newline at end of file
+hidden = true
diff --git a/libpurple/reference/meson.build b/libpurple/reference/meson.build
--- a/libpurple/reference/meson.build
+++ b/libpurple/reference/meson.build
@@ -1,7 +1,6 @@
 libpurple_doc_content_files = [
 	'contributing.md',
 	'signals_connection.md',
-	'signals_core.md',
 	'tut_c_plugins.md',
 ]
 
diff --git a/libpurple/reference/signals_core.md b/libpurple/reference/signals_core.md
deleted file mode 100644
--- a/libpurple/reference/signals_core.md
+++ /dev/null
@@ -1,35 +0,0 @@
-Title: Core Signals
-Slug: core-signals
-
-## Core Signals
-
-### Signal List
-
-* [core-uri-handler](#uri-handler)
-
-### Signal Details
-
-#### uri-handler
-
-```c
-gboolean user_function(const gchar *proto,
-                       const gchar *cmd,
-                       GHashTable *params,
-                       gpointer user_data);
-```
-
-Emitted when handling a registered URI.
-
-**Parameters:**
-
-**proto**
-: The protocol of the URI.
-
-**cmd**
-: The 'command' of the URI.
-
-**params**
-: Any key/value parameters from the URI.
-
-**user_data**
-: User data set when the signal handler was connected.
