[gnome-keyring] Move and cleanup the prompt directory.



commit 328234924e7a44de551455f89115ca5d9d8ba435
Author: Stef Walter <stef memberwebs com>
Date:   Sat May 29 03:29:50 2010 +0000

    Move and cleanup the prompt directory.

 .gitignore                                         |    2 +
 Makefile.am                                        |    1 +
 configure.in                                       |    4 +-
 daemon/Makefile.am                                 |    3 +-
 daemon/dbus/gkd-secret-change.c                    |   26 +-
 daemon/dbus/gkd-secret-create.c                    |   20 +-
 daemon/dbus/gkd-secret-prompt.c                    |   34 ++--
 daemon/dbus/gkd-secret-prompt.h                    |    6 +-
 daemon/dbus/gkd-secret-unlock.c                    |   52 +++---
 daemon/pkcs11/gkd-pkcs11-auth.c                    |   98 ++++----
 daemon/pkcs11/gkd-pkcs11-data.c                    |    2 +-
 po/POTFILES.in                                     |    4 +-
 {daemon/prompt => ui}/Makefile.am                  |   30 ++--
 .../gku-prompt-marshal.list                        |    0
 .../gkd-prompt-tool.c => ui/gku-prompt-tool.c      |   20 +-
 .../gkd-prompt-util.c => ui/gku-prompt-util.c      |   20 +-
 .../gkd-prompt-util.h => ui/gku-prompt-util.h      |   18 +-
 daemon/prompt/gkd-prompt.c => ui/gku-prompt.c      |  238 ++++++++++----------
 daemon/prompt/gkd-prompt.h => ui/gku-prompt.h      |  104 +++++-----
 daemon/prompt/gkd-prompt.ui => ui/gku-prompt.ui    |    0
 {daemon/prompt => ui}/tests/Makefile.am            |    2 +-
 {daemon/prompt => ui}/tests/test-data/prompt-empty |    0
 {daemon/prompt => ui}/tests/test-data/prompt-full  |    0
 {daemon/prompt => ui}/tests/test-data/prompt-test  |    0
 {daemon/prompt => ui}/tests/unit-test-util.c       |   20 +-
 25 files changed, 353 insertions(+), 351 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 916cf03..db64ab0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -67,3 +67,5 @@ run-prompt-test*
 /junk
 /TODO.tasks
 
+# ui directory
+/ui/gnome-keyring-prompt
diff --git a/Makefile.am b/Makefile.am
index 08c82ba..ef22bc7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -16,6 +16,7 @@ SUBDIRS = \
 	egg \
 	gcr \
 	pkcs11 \
+	ui \
 	daemon \
 	tool \
 	$(TESTS_DIR) \
diff --git a/configure.in b/configure.in
index e37224e..c3c5648 100644
--- a/configure.in
+++ b/configure.in
@@ -556,8 +556,6 @@ daemon/data/Makefile
 daemon/dbus/Makefile
 daemon/login/Makefile
 daemon/pkcs11/Makefile
-daemon/prompt/Makefile
-daemon/prompt/tests/Makefile
 daemon/ssh-agent/Makefile
 docs/Makefile
 docs/reference/Makefile
@@ -589,6 +587,8 @@ pkcs11/user-store/tests/Makefile
 po/Makefile.in
 tests/Makefile
 tool/Makefile
+ui/Makefile
+ui/tests/Makefile
 ])
 
 # ------------------------------------------------------------------------------
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index 3461718..70531cb 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -1,5 +1,4 @@
 SUBDIRS = \
-	prompt \
 	login \
 	control \
 	ssh-agent \
@@ -33,7 +32,7 @@ gnome_keyring_daemon_LDADD = \
 	$(top_builddir)/daemon/dbus/libgkd-dbus.la \
 	$(top_builddir)/daemon/login/libgkd-login.la \
 	$(top_builddir)/daemon/control/libgkd-control.la \
-	$(top_builddir)/daemon/prompt/libgkd-prompt.la \
+	$(top_builddir)/ui/libgku-prompt.la \
 	$(top_builddir)/daemon/ssh-agent/libgkd-ssh-agent.la \
 	$(top_builddir)/pkcs11/plex-layer/libgkm-plex-layer.la \
 	$(top_builddir)/pkcs11/roots-store/libgkm-roots-store.la \
diff --git a/daemon/dbus/gkd-secret-change.c b/daemon/dbus/gkd-secret-change.c
index 0fba515..e25bb2a 100644
--- a/daemon/dbus/gkd-secret-change.c
+++ b/daemon/dbus/gkd-secret-change.c
@@ -60,13 +60,13 @@ static void
 prepare_change_prompt (GkdSecretChange *self, GP11Object *collection, gboolean first)
 {
 	GError *error = NULL;
-	GkdPrompt *prompt;
+	GkuPrompt *prompt;
 	gpointer data;
 	gsize n_data;
 	gchar *label;
 	gchar *text;
 
-	prompt = GKD_PROMPT (self);
+	prompt = GKU_PROMPT (self);
 
 	data = gp11_object_get_data (collection, CKA_LABEL, &n_data, &error);
 	if (!data) {
@@ -81,25 +81,25 @@ prepare_change_prompt (GkdSecretChange *self, GP11Object *collection, gboolean f
 	g_free (data);
 
 	/* Hard reset on first prompt, soft thereafter */
-	gkd_prompt_reset (prompt, first);
+	gku_prompt_reset (prompt, first);
 
-	gkd_prompt_set_title (prompt, _("Change Keyring Password"));
+	gku_prompt_set_title (prompt, _("Change Keyring Password"));
 
 	text = g_markup_printf_escaped (_("Choose a new password for the '%s' keyring"), label);
-	gkd_prompt_set_primary_text (prompt, text);
+	gku_prompt_set_primary_text (prompt, text);
 	g_free (text);
 
 	text = g_markup_printf_escaped (_("An application wants to change the password for the '%s' keyring. "
 	                                  "Choose the new password you want to use for it."), label);
-	gkd_prompt_set_secondary_text (prompt, text);
+	gku_prompt_set_secondary_text (prompt, text);
 	g_free (text);
 
-	gkd_prompt_hide_widget (prompt, "name_area");
-	gkd_prompt_hide_widget (prompt, "details_area");
+	gku_prompt_hide_widget (prompt, "name_area");
+	gku_prompt_hide_widget (prompt, "details_area");
 
-	gkd_prompt_show_widget (prompt, "password_area");
-	gkd_prompt_show_widget (prompt, "original_area");
-	gkd_prompt_show_widget (prompt, "confirm_area");
+	gku_prompt_show_widget (prompt, "password_area");
+	gku_prompt_show_widget (prompt, "original_area");
+	gku_prompt_show_widget (prompt, "confirm_area");
 
 	g_free (label);
 }
@@ -108,7 +108,7 @@ static void
 set_warning_wrong (GkdSecretChange *self)
 {
 	g_assert (GKD_SECRET_IS_CHANGE (self));
-	gkd_prompt_set_warning (GKD_PROMPT (self), _("The original password was incorrect"));
+	gku_prompt_set_warning (GKU_PROMPT (self), _("The original password was incorrect"));
 }
 
 /* -----------------------------------------------------------------------------
@@ -132,7 +132,7 @@ gkd_secret_change_prompt_ready (GkdSecretPrompt *prompt)
 		return;
 	}
 
-	if (!gkd_prompt_has_response (GKD_PROMPT (prompt))) {
+	if (!gku_prompt_has_response (GKU_PROMPT (prompt))) {
 		prepare_change_prompt (self, collection, TRUE);
 		return;
 	}
diff --git a/daemon/dbus/gkd-secret-create.c b/daemon/dbus/gkd-secret-create.c
index 5f61af1..80863f1 100644
--- a/daemon/dbus/gkd-secret-create.c
+++ b/daemon/dbus/gkd-secret-create.c
@@ -61,30 +61,30 @@ G_DEFINE_TYPE (GkdSecretCreate, gkd_secret_create, GKD_SECRET_TYPE_PROMPT);
 static void
 prepare_create_prompt (GkdSecretCreate *self)
 {
-	GkdPrompt *prompt;
+	GkuPrompt *prompt;
 	gchar *label;
 	gchar *text;
 
 	g_assert (GKD_SECRET_IS_CREATE (self));
 	g_assert (self->pkcs11_attrs);
 
-	prompt = GKD_PROMPT (self);
+	prompt = GKU_PROMPT (self);
 
 	if (!gp11_attributes_find_string (self->pkcs11_attrs, CKA_LABEL, &label))
 		label = g_strdup (_("Unnamed"));
 
-	gkd_prompt_reset (prompt, TRUE);
+	gku_prompt_reset (prompt, TRUE);
 
-	gkd_prompt_set_title (prompt, _("New Keyring Password"));
-	gkd_prompt_set_primary_text (prompt, _("Choose password for new keyring"));
+	gku_prompt_set_title (prompt, _("New Keyring Password"));
+	gku_prompt_set_primary_text (prompt, _("Choose password for new keyring"));
 
 	text = g_markup_printf_escaped (_("An application wants to create a new keyring called '%s'. "
 	                                  "Choose the password you want to use for it."), label);
-	gkd_prompt_set_secondary_text (prompt, text);
+	gku_prompt_set_secondary_text (prompt, text);
 	g_free (text);
 
-	gkd_prompt_show_widget (prompt, "password_area");
-	gkd_prompt_show_widget (prompt, "confirm_area");
+	gku_prompt_show_widget (prompt, "password_area");
+	gku_prompt_show_widget (prompt, "confirm_area");
 
 	g_free (label);
 }
@@ -119,13 +119,13 @@ gkd_secret_create_prompt_ready (GkdSecretPrompt *prompt)
 	GkdSecretCreate *self = GKD_SECRET_CREATE (prompt);
 	GkdSecretSecret *master;
 
-	if (!gkd_prompt_has_response (GKD_PROMPT (prompt))) {
+	if (!gku_prompt_has_response (GKU_PROMPT (prompt))) {
 		prepare_create_prompt (self);
 		return;
 	}
 
 	/* Already prompted, create collection */
-	g_return_if_fail (gkd_prompt_get_response (GKD_PROMPT (prompt)) == GKD_RESPONSE_OK);
+	g_return_if_fail (gku_prompt_get_response (GKU_PROMPT (prompt)) == GKU_RESPONSE_OK);
 	master = gkd_secret_prompt_get_secret (prompt, "password");
 
 	if (master && create_collection_with_secret (self, master))
diff --git a/daemon/dbus/gkd-secret-prompt.c b/daemon/dbus/gkd-secret-prompt.c
index 0ca0cae..5840afa 100644
--- a/daemon/dbus/gkd-secret-prompt.c
+++ b/daemon/dbus/gkd-secret-prompt.c
@@ -30,7 +30,7 @@
 #include "gkd-secret-types.h"
 #include "gkd-secret-util.h"
 
-#include "prompt/gkd-prompt.h"
+#include "ui/gku-prompt.h"
 
 #include "egg/egg-dh.h"
 
@@ -46,7 +46,7 @@ enum {
 #define PROMPT_IKE_GROUP  "ietf-ike-grp-modp-1536"
 
 struct _GkdSecretPromptPrivate {
-	GkdPrompt parent;
+	GkuPrompt parent;
 	gchar *object_path;
 	GkdSecretService *service;
 	GkdSecretSession *session;
@@ -58,7 +58,7 @@ struct _GkdSecretPromptPrivate {
 	GList *objects;
 };
 
-G_DEFINE_TYPE (GkdSecretPrompt, gkd_secret_prompt, GKD_TYPE_PROMPT);
+G_DEFINE_TYPE (GkdSecretPrompt, gkd_secret_prompt, GKU_TYPE_PROMPT);
 
 static guint unique_prompt_number = 0;
 
@@ -69,7 +69,7 @@ static guint unique_prompt_number = 0;
 static void
 setup_transport_params (GkdSecretPrompt *self)
 {
-	GkdPrompt *prompt = GKD_PROMPT (self);
+	GkuPrompt *prompt = GKU_PROMPT (self);
 	gsize n_public, n_prime, n_base;
 	gconstpointer prime, base;
 	gpointer public;
@@ -82,21 +82,21 @@ setup_transport_params (GkdSecretPrompt *self)
 	g_return_if_fail (public);
 	self->pv->negotiated = FALSE;
 
-	gkd_prompt_set_transport_param (prompt, "public", public, n_public);
+	gku_prompt_set_transport_param (prompt, "public", public, n_public);
 	g_free (public);
 
 	/* Setup transport crypto */
 	if (!egg_dh_default_params_raw (PROMPT_IKE_GROUP, &prime, &n_prime, &base, &n_base))
 		g_return_if_reached ();
 
-	gkd_prompt_set_transport_param (prompt, "prime", prime, n_prime);
-	gkd_prompt_set_transport_param (prompt, "base", base, n_base);
+	gku_prompt_set_transport_param (prompt, "prime", prime, n_prime);
+	gku_prompt_set_transport_param (prompt, "base", base, n_base);
 }
 
 static gboolean
 complete_transport_params (GkdSecretPrompt *self)
 {
-	GkdPrompt *prompt = GKD_PROMPT (self);
+	GkuPrompt *prompt = GKU_PROMPT (self);
 	gboolean result;
 	gsize n_peer;
 	gpointer peer;
@@ -106,7 +106,7 @@ complete_transport_params (GkdSecretPrompt *self)
 
 	g_return_val_if_fail (self->pv->session, FALSE);
 
-	peer = gkd_prompt_get_transport_param (prompt, "public", &n_peer);
+	peer = gku_prompt_get_transport_param (prompt, "public", &n_peer);
 	if (peer == NULL) {
 		g_warning ("prompt did not return a public dh key");
 		return FALSE;
@@ -123,7 +123,7 @@ complete_transport_params (GkdSecretPrompt *self)
 	return result;
 }
 
-static GkdPrompt*
+static GkuPrompt*
 on_prompt_attention (gpointer user_data)
 {
 	GkdSecretPrompt *self = user_data;
@@ -184,8 +184,8 @@ prompt_method_prompt (GkdSecretPrompt *self, DBusMessage *message)
 		return dbus_message_new_error (message, SECRET_ERROR_ALREADY_EXISTS,
 		                               "This prompt has already been shown.");
 
-	gkd_prompt_set_window_id (GKD_PROMPT (self), window_id);
-	gkd_prompt_request_attention_async (window_id, on_prompt_attention,
+	gku_prompt_set_window_id (GKU_PROMPT (self), window_id);
+	gku_prompt_request_attention_async (window_id, on_prompt_attention,
 	                                    g_object_ref (self), g_object_unref);
 	self->pv->prompted = TRUE;
 
@@ -218,13 +218,13 @@ prompt_method_dismiss (GkdSecretPrompt *self, DBusMessage *message)
  */
 
 static gboolean
-gkd_secret_prompt_responded (GkdPrompt *base)
+gkd_secret_prompt_responded (GkuPrompt *base)
 {
 	GkdSecretPrompt *self = GKD_SECRET_PROMPT (base);
 	gint res;
 
-	res = gkd_prompt_get_response (GKD_PROMPT (self));
-	if (res <= GKD_RESPONSE_NO) {
+	res = gku_prompt_get_response (GKU_PROMPT (self));
+	if (res <= GKU_RESPONSE_NO) {
 		gkd_secret_prompt_dismiss (self);
 		return FALSE;
 	}
@@ -363,7 +363,7 @@ static void
 gkd_secret_prompt_class_init (GkdSecretPromptClass *klass)
 {
 	GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
-	GkdPromptClass *prompt_class = GKD_PROMPT_CLASS (klass);
+	GkuPromptClass *prompt_class = GKU_PROMPT_CLASS (klass);
 
 	gobject_class->constructor = gkd_secret_prompt_constructor;
 	gobject_class->dispose = gkd_secret_prompt_dispose;
@@ -502,7 +502,7 @@ gkd_secret_prompt_get_secret (GkdSecretPrompt *self, const gchar *password_type)
 	if (!complete_transport_params (self))
 		return NULL;
 
-	if (!gkd_prompt_get_transport_password (GKD_PROMPT (self), password_type,
+	if (!gku_prompt_get_transport_password (GKU_PROMPT (self), password_type,
 	                                        &parameter, &n_parameter,
 	                                        &value, &n_value))
 		return NULL;
diff --git a/daemon/dbus/gkd-secret-prompt.h b/daemon/dbus/gkd-secret-prompt.h
index 4226b84..54313f0 100644
--- a/daemon/dbus/gkd-secret-prompt.h
+++ b/daemon/dbus/gkd-secret-prompt.h
@@ -26,7 +26,7 @@
 
 #include "gkd-secret-types.h"
 
-#include "prompt/gkd-prompt.h"
+#include "ui/gku-prompt.h"
 
 #include "gp11/gp11.h"
 
@@ -43,12 +43,12 @@ typedef struct _GkdSecretPromptClass GkdSecretPromptClass;
 typedef struct _GkdSecretPromptPrivate GkdSecretPromptPrivate;
 
 struct _GkdSecretPrompt {
-	GkdPrompt parent;
+	GkuPrompt parent;
 	GkdSecretPromptPrivate *pv;
 };
 
 struct _GkdSecretPromptClass {
-	GkdPromptClass parent_class;
+	GkuPromptClass parent_class;
 
 	/* virtual methods */
 	void (*prompt_ready) (GkdSecretPrompt *self);
diff --git a/daemon/dbus/gkd-secret-unlock.c b/daemon/dbus/gkd-secret-unlock.c
index 706e9ee..d7e5bcb 100644
--- a/daemon/dbus/gkd-secret-unlock.c
+++ b/daemon/dbus/gkd-secret-unlock.c
@@ -125,27 +125,27 @@ label_string_for_attributes (GP11Attributes *attrs)
 static void
 prepare_unlock_login (GkdSecretUnlock *self)
 {
-	GkdPrompt *prompt;
+	GkuPrompt *prompt;
 	const gchar *text;
 
 	g_assert (GKD_SECRET_IS_UNLOCK (self));
 
-	prompt = GKD_PROMPT (self);
+	prompt = GKU_PROMPT (self);
 
-	gkd_prompt_set_title (prompt, _("Unlock Login Keyring"));
+	gku_prompt_set_title (prompt, _("Unlock Login Keyring"));
 
 	text = _("Enter password for to unlock your login keyring");
-	gkd_prompt_set_primary_text (prompt, text);
+	gku_prompt_set_primary_text (prompt, text);
 
 	if (gkd_login_did_unlock_fail ())
 		text = _("The password you use to log in to your computer no longer matches that of your login keyring.");
 	else
 		text = _("The login keyring did not get unlocked when you logged into your computer.");
-	gkd_prompt_set_secondary_text (prompt, text);
+	gku_prompt_set_secondary_text (prompt, text);
 
-	gkd_prompt_hide_widget (prompt, "name_area");
-	gkd_prompt_hide_widget (prompt, "confirm_area");
-	gkd_prompt_show_widget (prompt, "password_area");
+	gku_prompt_hide_widget (prompt, "name_area");
+	gku_prompt_hide_widget (prompt, "confirm_area");
+	gku_prompt_show_widget (prompt, "password_area");
 }
 
 static void
@@ -154,7 +154,7 @@ prepare_unlock_prompt (GkdSecretUnlock *self, GP11Object *coll, gboolean first)
 	GP11Attributes *template;
 	GP11Attributes *attrs;
 	GError *error = NULL;
-	GkdPrompt *prompt;
+	GkuPrompt *prompt;
 	gchar *identifier;
 	gchar *label;
 	gchar *text;
@@ -162,10 +162,10 @@ prepare_unlock_prompt (GkdSecretUnlock *self, GP11Object *coll, gboolean first)
 	g_assert (GKD_SECRET_IS_UNLOCK (self));
 	g_assert (coll);
 
-	prompt = GKD_PROMPT (self);
+	prompt = GKU_PROMPT (self);
 
 	/* Hard reset on first prompt, soft on later */
-	gkd_prompt_reset (GKD_PROMPT (prompt), first);
+	gku_prompt_reset (GKU_PROMPT (prompt), first);
 
 	attrs = attributes_for_collection (coll);
 	g_return_if_fail (attrs);
@@ -181,35 +181,35 @@ prepare_unlock_prompt (GkdSecretUnlock *self, GP11Object *coll, gboolean first)
 	g_free (identifier);
 	label = label_string_for_attributes (attrs);
 
-	gkd_prompt_set_title (prompt, _("Unlock Keyring"));
+	gku_prompt_set_title (prompt, _("Unlock Keyring"));
 
 	text = g_markup_printf_escaped (_("Enter password for keyring '%s' to unlock"), label);
-	gkd_prompt_set_primary_text (prompt, text);
+	gku_prompt_set_primary_text (prompt, text);
 	g_free (text);
 
 	text = g_markup_printf_escaped (_("An application wants access to the keyring '%s', but it is locked"), label);
-	gkd_prompt_set_secondary_text (prompt, text);
+	gku_prompt_set_secondary_text (prompt, text);
 	g_free (text);
 
-	gkd_prompt_hide_widget (prompt, "name_area");
-	gkd_prompt_hide_widget (prompt, "confirm_area");
-	gkd_prompt_show_widget (prompt, "details_area");
-	gkd_prompt_show_widget (prompt, "password_area");
-	gkd_prompt_show_widget (prompt, "lock_area");
-	gkd_prompt_show_widget (prompt, "options_area");
+	gku_prompt_hide_widget (prompt, "name_area");
+	gku_prompt_hide_widget (prompt, "confirm_area");
+	gku_prompt_show_widget (prompt, "details_area");
+	gku_prompt_show_widget (prompt, "password_area");
+	gku_prompt_show_widget (prompt, "lock_area");
+	gku_prompt_show_widget (prompt, "options_area");
 
 	g_free (label);
 
 	if (gkd_login_is_usable ())
-		gkd_prompt_show_widget (prompt, "auto_unlock_check");
+		gku_prompt_show_widget (prompt, "auto_unlock_check");
 	else
-		gkd_prompt_hide_widget (prompt, "auto_unlock_check");
+		gku_prompt_hide_widget (prompt, "auto_unlock_check");
 
 	/* Setup the unlock options */
 	if (first) {
 		template = gp11_object_get_template (coll, CKA_G_CREDENTIAL_TEMPLATE, &error);
 		if (template) {
-			gkd_prompt_set_unlock_options (prompt, template);
+			gku_prompt_set_unlock_options (prompt, template);
 			gp11_attributes_unref (template);
 		} else {
 			g_warning ("couldn't get credential template for collection: %s",
@@ -223,7 +223,7 @@ static void
 set_warning_wrong (GkdSecretUnlock *self)
 {
 	g_assert (GKD_SECRET_IS_UNLOCK (self));
-	gkd_prompt_set_warning (GKD_PROMPT (self), _("The unlock password was incorrect"));
+	gku_prompt_set_warning (GKU_PROMPT (self), _("The unlock password was incorrect"));
 }
 
 static gboolean
@@ -306,7 +306,7 @@ authenticate_collection (GkdSecretUnlock *self, GP11Object *collection, gboolean
 		return FALSE;
 
 	/* Shortcut if already unlocked, or just checking locked status */
-	if (!*locked || !gkd_prompt_has_response (GKD_PROMPT (self)))
+	if (!*locked || !gku_prompt_has_response (GKU_PROMPT (self)))
 		return TRUE;
 
 	master = gkd_secret_prompt_get_secret (GKD_SECRET_PROMPT (self), "password");
@@ -318,7 +318,7 @@ authenticate_collection (GkdSecretUnlock *self, GP11Object *collection, gboolean
 	/* The various unlock options */
 	template = gp11_attributes_new ();
 	common_unlock_attributes (template, collection);
-	gkd_prompt_get_unlock_options (GKD_PROMPT (self), template);
+	gku_prompt_get_unlock_options (GKU_PROMPT (self), template);
 
 	/* If it's supposed to save non-transient, then we override that */
 	attr = gp11_attributes_find (template, CKA_GNOME_TRANSIENT);
diff --git a/daemon/pkcs11/gkd-pkcs11-auth.c b/daemon/pkcs11/gkd-pkcs11-auth.c
index b4d639f..8809c72 100644
--- a/daemon/pkcs11/gkd-pkcs11-auth.c
+++ b/daemon/pkcs11/gkd-pkcs11-auth.c
@@ -32,7 +32,7 @@
 #include "pkcs11/pkcs11g.h"
 #include "pkcs11/pkcs11i.h"
 
-#include "prompt/gkd-prompt.h"
+#include "ui/gku-prompt.h"
 
 #include <glib.h>
 #include <glib/gi18n.h>
@@ -221,7 +221,7 @@ convert_upper_case (gchar *str)
 		*str = g_ascii_toupper (*str);
 }
 
-static GkdPrompt*
+static GkuPrompt*
 on_prompt_attention (gpointer user_data)
 {
 	/* We were passed the prompt */
@@ -261,7 +261,7 @@ static gboolean
 init_user_prompt (CK_SESSION_HANDLE handle, CK_TOKEN_INFO *info,
                   CK_UTF8CHAR_PTR *pin, CK_ULONG *pin_len)
 {
-	GkdPrompt *prompt;
+	GkuPrompt *prompt;
 	gchar *password;
 	gchar *label;
 	gchar *secondary;
@@ -288,36 +288,36 @@ init_user_prompt (CK_SESSION_HANDLE handle, CK_TOKEN_INFO *info,
 	g_strchomp (label);
 
 	/* Build up the prompt */
-	prompt = gkd_prompt_new ();
-	gkd_prompt_show_widget (prompt, "password_area");
-	gkd_prompt_show_widget (prompt, "confirm_area");
-	gkd_prompt_set_title (prompt, _("New Password Required"));
-	gkd_prompt_set_primary_text (prompt, _("New password required for secure storage"));
+	prompt = gku_prompt_new ();
+	gku_prompt_show_widget (prompt, "password_area");
+	gku_prompt_show_widget (prompt, "confirm_area");
+	gku_prompt_set_title (prompt, _("New Password Required"));
+	gku_prompt_set_primary_text (prompt, _("New password required for secure storage"));
 
 	secondary = g_strdup_printf (_("In order to prepare '%s' for storage of certificates or keys, a password is required"), label);
-	gkd_prompt_set_secondary_text (prompt, secondary);
+	gku_prompt_set_secondary_text (prompt, secondary);
 	g_free (secondary);
 
 	if (gkd_login_is_usable ()) {
-		gkd_prompt_show_widget (prompt, "details_area");
-		gkd_prompt_show_widget (prompt, "lock_area");
-		gkd_prompt_hide_widget (prompt, "options_area");
+		gku_prompt_show_widget (prompt, "details_area");
+		gku_prompt_show_widget (prompt, "lock_area");
+		gku_prompt_hide_widget (prompt, "options_area");
 	}
 
 	/* Prompt the user */
-	gkd_prompt_request_attention_async (NULL, on_prompt_attention, prompt, NULL);
+	gku_prompt_request_attention_async (NULL, on_prompt_attention, prompt, NULL);
 
-	if (!gkd_prompt_has_response (prompt)) {
+	if (!gku_prompt_has_response (prompt)) {
 		ret = FALSE;
 
-	} else if (gkd_prompt_get_response (prompt) != GKD_RESPONSE_OK) {
+	} else if (gku_prompt_get_response (prompt) != GKU_RESPONSE_OK) {
 		ret = FALSE;
 
 	/* Successful response */
 	} else {
-		password = gkd_prompt_get_password (prompt, "password");
+		password = gku_prompt_get_password (prompt, "password");
 
-		if (gkd_prompt_get_unlock_auto (prompt)) {
+		if (gku_prompt_get_unlock_auto (prompt)) {
 			gkd_login_attach_secret (label, password,
 			                         "manufacturer", manufacturer,
 			                         "serial-number", serial,
@@ -414,7 +414,7 @@ login_specific_prompt (CK_SESSION_HANDLE handle, CK_SESSION_INFO *info,
 {
 	AuthObject *object;
 	const gchar *password;
-	GkdPrompt *prompt;
+	GkuPrompt *prompt;
 	gchar *secondary;
 	gboolean ret;
 
@@ -453,35 +453,35 @@ login_specific_prompt (CK_SESSION_HANDLE handle, CK_SESSION_INFO *info,
 	}
 
 	/* Build up the prompt */
-	prompt = gkd_prompt_new ();
-	gkd_prompt_show_widget (prompt, "password_area");
-	gkd_prompt_hide_widget (prompt, "confirm_area");
-	gkd_prompt_hide_widget (prompt, "original_area");
-	gkd_prompt_set_title (prompt, prepare_specific_title (object->klass));
-	gkd_prompt_set_primary_text (prompt, prepare_specific_primary (object->klass));
+	prompt = gku_prompt_new ();
+	gku_prompt_show_widget (prompt, "password_area");
+	gku_prompt_hide_widget (prompt, "confirm_area");
+	gku_prompt_hide_widget (prompt, "original_area");
+	gku_prompt_set_title (prompt, prepare_specific_title (object->klass));
+	gku_prompt_set_primary_text (prompt, prepare_specific_primary (object->klass));
 
 	secondary = prepare_specific_secondary (object->klass, object->label);
-	gkd_prompt_set_secondary_text (prompt, secondary);
+	gku_prompt_set_secondary_text (prompt, secondary);
 	g_free (secondary);
 
 	if (object->unique && gkd_login_is_usable ()) {
-		gkd_prompt_show_widget (prompt, "details_area");
-		gkd_prompt_show_widget (prompt, "lock_area");
-		gkd_prompt_hide_widget (prompt, "options_area");
+		gku_prompt_show_widget (prompt, "details_area");
+		gku_prompt_show_widget (prompt, "lock_area");
+		gku_prompt_hide_widget (prompt, "options_area");
 	}
 
 	/* Prompt the user */
-	gkd_prompt_request_attention_sync (NULL, on_prompt_attention, prompt, NULL);
+	gku_prompt_request_attention_sync (NULL, on_prompt_attention, prompt, NULL);
 
-	if (!gkd_prompt_has_response (prompt))
+	if (!gku_prompt_has_response (prompt))
 		ret = FALSE;
 
 	/* Successful response */
-	else if (gkd_prompt_get_response (prompt) == GKD_RESPONSE_OK) {
-		password = gkd_prompt_get_password (prompt, "password");
+	else if (gku_prompt_get_response (prompt) == GKU_RESPONSE_OK) {
+		password = gku_prompt_get_password (prompt, "password");
 
 		/* Store forever */
-		if (gkd_prompt_get_unlock_auto (prompt) && object->unique && object->token) {
+		if (gku_prompt_get_unlock_auto (prompt) && object->unique && object->token) {
 			gkd_login_attach_secret (object->label, password,
 			                         "unique", object->unique, NULL);
 		}
@@ -547,7 +547,7 @@ static gboolean
 login_user_prompt (CK_SESSION_HANDLE handle, CK_TOKEN_INFO *info,
                    CK_UTF8CHAR_PTR *pin, CK_ULONG *pin_len)
 {
-	GkdPrompt *prompt;
+	GkuPrompt *prompt;
 	gchar *label;
 	gchar *secondary;
 	gchar *manufacturer;
@@ -588,40 +588,40 @@ login_user_prompt (CK_SESSION_HANDLE handle, CK_TOKEN_INFO *info,
 	}
 
 	/* Build up the prompt */
-	prompt = gkd_prompt_new ();
-	gkd_prompt_show_widget (prompt, "password_area");
-	gkd_prompt_hide_widget (prompt, "confirm_area");
-	gkd_prompt_hide_widget (prompt, "original_area");
-	gkd_prompt_set_title (prompt, _("Unlock certificate/key storage"));
-	gkd_prompt_set_primary_text (prompt, _("Enter password to unlock the certificate/key storage"));
+	prompt = gku_prompt_new ();
+	gku_prompt_show_widget (prompt, "password_area");
+	gku_prompt_hide_widget (prompt, "confirm_area");
+	gku_prompt_hide_widget (prompt, "original_area");
+	gku_prompt_set_title (prompt, _("Unlock certificate/key storage"));
+	gku_prompt_set_primary_text (prompt, _("Enter password to unlock the certificate/key storage"));
 
 	/* TRANSLATORS: The storage is locked, and needs unlocking before the application can use it. */
 	secondary = g_strdup_printf (_("An application wants access to the certificate/key storage '%s', but it is locked"), label);
-	gkd_prompt_set_secondary_text (prompt, secondary);
+	gku_prompt_set_secondary_text (prompt, secondary);
 	g_free (secondary);
 
 	if (gkd_login_is_usable ()) {
-		gkd_prompt_show_widget (prompt, "details_area");
-		gkd_prompt_show_widget (prompt, "lock_area");
-		gkd_prompt_hide_widget (prompt, "options_area");
+		gku_prompt_show_widget (prompt, "details_area");
+		gku_prompt_show_widget (prompt, "lock_area");
+		gku_prompt_hide_widget (prompt, "options_area");
 	}
 
 	/* Prompt the user */
-	gkd_prompt_request_attention_sync (NULL, on_prompt_attention, prompt, NULL);
+	gku_prompt_request_attention_sync (NULL, on_prompt_attention, prompt, NULL);
 
-	if (!gkd_prompt_has_response (prompt)) {
+	if (!gku_prompt_has_response (prompt)) {
 		ret = FALSE;
 
 	/* User cancelled or failure */
-	} else if (gkd_prompt_get_response (prompt) != GKD_RESPONSE_OK) {
+	} else if (gku_prompt_get_response (prompt) != GKU_RESPONSE_OK) {
 		ret = FALSE;
 
 	/* Successful response */
 	} else {
-		password = gkd_prompt_get_password (prompt, "password");
+		password = gku_prompt_get_password (prompt, "password");
 
 		/* Store forever */
-		if (gkd_prompt_get_unlock_auto (prompt)) {
+		if (gku_prompt_get_unlock_auto (prompt)) {
 			gkd_login_attach_secret (label, password,
 			                         "manufacturer", manufacturer,
 			                         "serial-number", serial,
diff --git a/daemon/pkcs11/gkd-pkcs11-data.c b/daemon/pkcs11/gkd-pkcs11-data.c
index 17f3d55..ffb6d8f 100644
--- a/daemon/pkcs11/gkd-pkcs11-data.c
+++ b/daemon/pkcs11/gkd-pkcs11-data.c
@@ -30,7 +30,7 @@
 
 #include "pkcs11/pkcs11.h"
 
-#include "prompt/gkd-prompt.h"
+#include "ui/gku-prompt.h"
 
 #include <glib.h>
 #include <glib/gi18n.h>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index b215205..21ec904 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -10,8 +10,6 @@ daemon/gnome-keyring-ssh.desktop.in.in
 daemon/login/gkd-login.c
 daemon/org.gnome.keyring.service.in
 daemon/pkcs11/gkd-pkcs11-auth.c
-daemon/prompt/gkd-prompt-tool.c
-[type: gettext/glade]daemon/prompt/gkd-prompt.ui
 egg/egg-asn1.c
 egg/egg-oid.c
 egg/egg-spawn.c
@@ -26,3 +24,5 @@ gp11/gp11-misc.c
 pkcs11/gkm/gkm-certificate.c
 pkcs11/ssh-store/gkm-ssh-private-key.c
 pkcs11/secret-store/gkm-secret-collection.c
+ui/gku-prompt-tool.c
+[type: gettext/glade]ui/gku-prompt.ui
diff --git a/daemon/prompt/Makefile.am b/ui/Makefile.am
similarity index 64%
rename from daemon/prompt/Makefile.am
rename to ui/Makefile.am
index 44821ea..4d156a0 100644
--- a/daemon/prompt/Makefile.am
+++ b/ui/Makefile.am
@@ -24,34 +24,34 @@ INCLUDES= \
 uidir = $(datadir)/gnome-keyring/ui/
 
 ui_DATA = \
-	gkd-prompt.ui
+	gku-prompt.ui
 
 # ------------------------------------------------------------------
 # DAEMON CODE
 
-noinst_LTLIBRARIES = libgkd-prompt.la
+noinst_LTLIBRARIES = libgku-prompt.la
 
 BUILT_SOURCES = \
-	gkd-prompt-marshal.c gkd-prompt-marshal.h
+	gku-prompt-marshal.c gku-prompt-marshal.h
 
-libgkd_prompt_la_SOURCES = \
-	gkd-prompt.c gkd-prompt.h \
-	gkd-prompt-util.c gkd-prompt-util.h \
+libgku_prompt_la_SOURCES = \
+	gku-prompt.c gku-prompt.h \
+	gku-prompt-util.c gku-prompt-util.h \
 	$(BUILT_SOURCES)
 
-libgkd_prompt_la_LIBADD = \
+libgku_prompt_la_LIBADD = \
 	$(GLIB_LIBS) \
 	$(GOBJECT_LIBS)
 
-gkd-prompt-marshal.h: gkd-prompt-marshal.list $(GLIB_GENMARSHAL)
-	$(GLIB_GENMARSHAL) $< --header --prefix=gkd_prompt_marshal > $@
+gku-prompt-marshal.h: gku-prompt-marshal.list $(GLIB_GENMARSHAL)
+	$(GLIB_GENMARSHAL) $< --header --prefix=gku_prompt_marshal > $@
 
-gkd-prompt-marshal.c: gkd-prompt-marshal.list $(GLIB_GENMARSHAL)
-	echo "#include \"gkd-prompt-marshal.h\"" > $@ && \
-	$(GLIB_GENMARSHAL) $< --body --prefix=gkd_prompt_marshal >> $@
+gku-prompt-marshal.c: gku-prompt-marshal.list $(GLIB_GENMARSHAL)
+	echo "#include \"gku-prompt-marshal.h\"" > $@ && \
+	$(GLIB_GENMARSHAL) $< --body --prefix=gku_prompt_marshal >> $@
 
 EXTRA_DIST = \
-	gkd-prompt-marshal.list \
+	gku-prompt-marshal.list \
 	$(ui_DATA)
 
 # ------------------------------------------------------------------
@@ -62,8 +62,8 @@ libexec_PROGRAMS= \
 	gnome-keyring-prompt
 
 gnome_keyring_prompt_SOURCES = \
-	gkd-prompt-tool.c \
-	gkd-prompt-util.c gkd-prompt-util.h
+	gku-prompt-tool.c \
+	gku-prompt-util.c gku-prompt-util.h
 
 gnome_keyring_prompt_LDADD = \
 	$(top_builddir)/egg/libegg-prompt.la \
diff --git a/daemon/prompt/gkd-prompt-marshal.list b/ui/gku-prompt-marshal.list
similarity index 100%
rename from daemon/prompt/gkd-prompt-marshal.list
rename to ui/gku-prompt-marshal.list
diff --git a/daemon/prompt/gkd-prompt-tool.c b/ui/gku-prompt-tool.c
similarity index 97%
rename from daemon/prompt/gkd-prompt-tool.c
rename to ui/gku-prompt-tool.c
index 0729067..acf607b 100644
--- a/daemon/prompt/gkd-prompt-tool.c
+++ b/ui/gku-prompt-tool.c
@@ -1,5 +1,5 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* gkd-prompt-tool.c - Handles gui authentication for the keyring daemon.
+/* gku-prompt-tool.c - Handles gui authentication for the keyring daemon.
 
    Copyright (C) 2009 Stefan Walter
 
@@ -22,7 +22,7 @@
 
 #include "config.h"
 
-#include "gkd-prompt-util.h"
+#include "gku-prompt-util.h"
 
 #include "egg/egg-dh.h"
 #include "egg/egg-entry-buffer.h"
@@ -359,7 +359,7 @@ prepare_dialog (GtkBuilder *builder)
 	GError *error = NULL;
 	GtkDialog *dialog;
 
-	if (!gtk_builder_add_from_file (builder, UIDIR "gkd-prompt.ui", &error)) {
+	if (!gtk_builder_add_from_file (builder, UIDIR "gku-prompt.ui", &error)) {
 		g_warning ("couldn't load prompt ui file: %s", egg_error_message (error));
 		g_clear_error (&error);
 		return NULL;
@@ -471,14 +471,14 @@ negotiate_transport_crypto (void)
 	key = pub = priv = NULL;
 
 	/* The DH stuff coming in from our caller */
-	if (gkd_prompt_util_decode_mpi (input_data, "transport", "prime", &prime) &&
-	    gkd_prompt_util_decode_mpi (input_data, "transport", "base", &base) &&
-	    gkd_prompt_util_decode_mpi (input_data, "transport", "public", &peer)) {
+	if (gku_prompt_util_decode_mpi (input_data, "transport", "prime", &prime) &&
+	    gku_prompt_util_decode_mpi (input_data, "transport", "base", &base) &&
+	    gku_prompt_util_decode_mpi (input_data, "transport", "public", &peer)) {
 
 		/* Generate our own public/priv, and then a key, send it back */
 		if (egg_dh_gen_pair (prime, base, 0, &pub, &priv)) {
 
-			gkd_prompt_util_encode_mpi (output_data, "transport", "public", pub);
+			gku_prompt_util_encode_mpi (output_data, "transport", "public", pub);
 
 			/* Build up a key we can use */
 			n_the_key = 16;
@@ -528,12 +528,12 @@ gather_password (GtkBuilder *builder, const gchar *password_type)
 	}
 
 	gcry_create_nonce (iv, sizeof (iv));
-	data = gkd_prompt_util_encrypt_text (the_key, n_the_key, iv, sizeof (iv),
+	data = gku_prompt_util_encrypt_text (the_key, n_the_key, iv, sizeof (iv),
 	                                     gtk_entry_get_text (entry), &n_data);
 	g_return_if_fail (data);
 
-	gkd_prompt_util_encode_hex (output_data, password_type, "parameter", iv, sizeof (iv));
-	gkd_prompt_util_encode_hex (output_data, password_type, "value", data, n_data);
+	gku_prompt_util_encode_hex (output_data, password_type, "parameter", iv, sizeof (iv));
+	gku_prompt_util_encode_hex (output_data, password_type, "value", data, n_data);
 
 	g_free (data);
 }
diff --git a/daemon/prompt/gkd-prompt-util.c b/ui/gku-prompt-util.c
similarity index 90%
rename from daemon/prompt/gkd-prompt-util.c
rename to ui/gku-prompt-util.c
index 3f722ff..2d16359 100644
--- a/daemon/prompt/gkd-prompt-util.c
+++ b/ui/gku-prompt-util.c
@@ -1,5 +1,5 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* gkd-prompt-tool.c - Handles gui authentication for the keyring daemon.
+/* gku-prompt-tool.c - Handles gui authentication for the keyring daemon.
 
    Copyright (C) 2009 Stefan Walter
 
@@ -22,7 +22,7 @@
 
 #include "config.h"
 
-#include "gkd-prompt-util.h"
+#include "gku-prompt-util.h"
 
 #include "egg/egg-dh.h"
 #include "egg/egg-hex.h"
@@ -30,7 +30,7 @@
 #include "egg/egg-secure-memory.h"
 
 void
-gkd_prompt_util_encode_mpi (GKeyFile *key_file, const gchar *section,
+gku_prompt_util_encode_mpi (GKeyFile *key_file, const gchar *section,
                             const gchar *field, gcry_mpi_t mpi)
 {
 	gcry_error_t gcry;
@@ -52,12 +52,12 @@ gkd_prompt_util_encode_mpi (GKeyFile *key_file, const gchar *section,
 	gcry = gcry_mpi_print (GCRYMPI_FMT_USG, data, n_data, &n_data, mpi);
 	g_return_if_fail (gcry == 0);
 
-	gkd_prompt_util_encode_hex (key_file, section, field, data, n_data);
+	gku_prompt_util_encode_hex (key_file, section, field, data, n_data);
 	g_free (data);
 }
 
 void
-gkd_prompt_util_encode_hex (GKeyFile *key_file, const gchar *section,
+gku_prompt_util_encode_hex (GKeyFile *key_file, const gchar *section,
                             const gchar *field, gconstpointer data, gsize n_data)
 {
 	gchar *value;
@@ -72,7 +72,7 @@ gkd_prompt_util_encode_hex (GKeyFile *key_file, const gchar *section,
 }
 
 gpointer
-gkd_prompt_util_decode_hex (GKeyFile *key_file, const gchar *section,
+gku_prompt_util_decode_hex (GKeyFile *key_file, const gchar *section,
                             const gchar *field, gsize *n_result)
 {
 	gpointer result = NULL;
@@ -91,7 +91,7 @@ gkd_prompt_util_decode_hex (GKeyFile *key_file, const gchar *section,
 }
 
 gboolean
-gkd_prompt_util_decode_mpi (GKeyFile *key_file, const gchar *section,
+gku_prompt_util_decode_mpi (GKeyFile *key_file, const gchar *section,
                             const gchar *field, gcry_mpi_t *mpi)
 {
 	gcry_error_t gcry;
@@ -103,7 +103,7 @@ gkd_prompt_util_decode_mpi (GKeyFile *key_file, const gchar *section,
 	g_return_val_if_fail (field, FALSE);
 	g_return_val_if_fail (mpi, FALSE);
 
-	data = gkd_prompt_util_decode_hex (key_file, section, field, &n_data);
+	data = gku_prompt_util_decode_hex (key_file, section, field, &n_data);
 	if (data == NULL)
 		return FALSE;
 
@@ -114,7 +114,7 @@ gkd_prompt_util_decode_mpi (GKeyFile *key_file, const gchar *section,
 }
 
 gpointer
-gkd_prompt_util_encrypt_text (gconstpointer key, gsize n_key,
+gku_prompt_util_encrypt_text (gconstpointer key, gsize n_key,
                               gconstpointer iv, gsize n_iv,
                               const gchar *text, gsize *n_result)
 {
@@ -163,7 +163,7 @@ gkd_prompt_util_encrypt_text (gconstpointer key, gsize n_key,
 }
 
 gchar*
-gkd_prompt_util_decrypt_text (gconstpointer key, gsize n_key, gconstpointer iv, gsize n_iv,
+gku_prompt_util_decrypt_text (gconstpointer key, gsize n_key, gconstpointer iv, gsize n_iv,
                               gconstpointer data, gsize n_data)
 {
 	gcry_cipher_hd_t cih;
diff --git a/daemon/prompt/gkd-prompt-util.h b/ui/gku-prompt-util.h
similarity index 79%
rename from daemon/prompt/gkd-prompt-util.h
rename to ui/gku-prompt-util.h
index e93dde3..98a79f8 100644
--- a/daemon/prompt/gkd-prompt-util.h
+++ b/ui/gku-prompt-util.h
@@ -19,31 +19,31 @@
  * 02111-1307, USA.
  */
 
-#ifndef __GKD_PROMPT_UTIL_H__
-#define __GKD_PROMPT_UTIL_H__
+#ifndef __GKU_PROMPT_UTIL_H__
+#define __GKU_PROMPT_UTIL_H__
 
 #include <gcrypt.h>
 
 #include <glib.h>
 
-void        gkd_prompt_util_encode_mpi                   (GKeyFile *key_file, const gchar *section,
+void        gku_prompt_util_encode_mpi                   (GKeyFile *key_file, const gchar *section,
                                                           const gchar *field, gcry_mpi_t mpi);
 
-void        gkd_prompt_util_encode_hex                   (GKeyFile *key_file, const gchar *section,
+void        gku_prompt_util_encode_hex                   (GKeyFile *key_file, const gchar *section,
                                                           const gchar *field, gconstpointer data, gsize n_data);
 
-gboolean    gkd_prompt_util_decode_mpi                   (GKeyFile *key_file, const gchar *section,
+gboolean    gku_prompt_util_decode_mpi                   (GKeyFile *key_file, const gchar *section,
                                                           const gchar *field, gcry_mpi_t *mpi);
 
-gpointer    gkd_prompt_util_decode_hex                   (GKeyFile *key_file, const gchar *section,
+gpointer    gku_prompt_util_decode_hex                   (GKeyFile *key_file, const gchar *section,
                                                           const gchar *field, gsize *n_result);
 
-gpointer    gkd_prompt_util_encrypt_text                 (gconstpointer key, gsize n_key,
+gpointer    gku_prompt_util_encrypt_text                 (gconstpointer key, gsize n_key,
                                                           gconstpointer iv, gsize n_iv,
                                                           const gchar *text, gsize *n_result);
 
-gchar*      gkd_prompt_util_decrypt_text                 (gconstpointer key, gsize n_key,
+gchar*      gku_prompt_util_decrypt_text                 (gconstpointer key, gsize n_key,
                                                           gconstpointer iv, gsize n_iv,
                                                           gconstpointer data, gsize n_data);
 
-#endif /* __GKD_PROMPT_H__ */
+#endif /* __GKU_PROMPT_H__ */
diff --git a/daemon/prompt/gkd-prompt.c b/ui/gku-prompt.c
similarity index 80%
rename from daemon/prompt/gkd-prompt.c
rename to ui/gku-prompt.c
index 645255a..01c7c77 100644
--- a/daemon/prompt/gkd-prompt.c
+++ b/ui/gku-prompt.c
@@ -21,9 +21,9 @@
 
 #include "config.h"
 
-#include "gkd-prompt.h"
-#include "gkd-prompt-marshal.h"
-#include "gkd-prompt-util.h"
+#include "gku-prompt.h"
+#include "gku-prompt-marshal.h"
+#include "gku-prompt-util.h"
 
 #include "egg/egg-cleanup.h"
 #include "egg/egg-dh.h"
@@ -56,7 +56,7 @@ typedef struct _TransportCrypto {
 	gsize n_key;
 } TransportCrypto;
 
-struct _GkdPromptPrivate {
+struct _GkuPromptPrivate {
 	GKeyFile *input;
 	GKeyFile *output;
 	gchar *executable;
@@ -78,10 +78,10 @@ struct _GkdPromptPrivate {
 	guint io_tag;
 };
 
-G_DEFINE_TYPE (GkdPrompt, gkd_prompt, G_TYPE_OBJECT);
+G_DEFINE_TYPE (GkuPrompt, gku_prompt, G_TYPE_OBJECT);
 
 /* Forward declaration*/
-static void display_async_prompt (GkdPrompt *);
+static void display_async_prompt (GkuPrompt *);
 
 /* User choices we transfer over during a soft prompt reset */
 const struct { const gchar *section; const gchar *name; } SOFT_RESET[] = {
@@ -96,25 +96,25 @@ const struct { const gchar *section; const gchar *name; } SOFT_RESET[] = {
  */
 
 static void
-kill_process (GkdPrompt *self)
+kill_process (GkuPrompt *self)
 {
 	if (self->pv->pid)
 		kill (self->pv->pid, SIGHUP);
 }
 
 static void
-mark_completed (GkdPrompt *self)
+mark_completed (GkuPrompt *self)
 {
-	g_assert (GKD_IS_PROMPT (self));
+	g_assert (GKU_IS_PROMPT (self));
 	g_assert (!self->pv->completed);
 	self->pv->completed = TRUE;
 	g_signal_emit (self, signals[COMPLETED], 0);
 }
 
 static void
-mark_failed (GkdPrompt *self)
+mark_failed (GkuPrompt *self)
 {
-	g_assert (GKD_IS_PROMPT (self));
+	g_assert (GKU_IS_PROMPT (self));
 	g_assert (!self->pv->failure);
 	self->pv->failure = TRUE;
 	if (!self->pv->completed)
@@ -122,13 +122,13 @@ mark_failed (GkdPrompt *self)
 }
 
 static void
-mark_responded (GkdPrompt *self)
+mark_responded (GkuPrompt *self)
 {
 	gboolean continu = FALSE;
 
-	g_assert (GKD_IS_PROMPT (self));
+	g_assert (GKU_IS_PROMPT (self));
 	g_signal_emit (self, signals[RESPONDED], 0, &continu);
-	g_assert (GKD_IS_PROMPT (self));
+	g_assert (GKU_IS_PROMPT (self));
 
 	/* The prompt gets displayed again */
 	if (continu) {
@@ -143,10 +143,10 @@ mark_responded (GkdPrompt *self)
 static gboolean
 on_standard_input (int fd, gpointer user_data)
 {
-	GkdPrompt *self = GKD_PROMPT (user_data);
+	GkuPrompt *self = GKU_PROMPT (user_data);
 	gssize ret;
 
-	g_return_val_if_fail (GKD_IS_PROMPT (self), FALSE);
+	g_return_val_if_fail (GKU_IS_PROMPT (self), FALSE);
 
 	if (self->pv->in_offset >= self->pv->in_length)
 		return FALSE;
@@ -168,11 +168,11 @@ on_standard_input (int fd, gpointer user_data)
 static gboolean
 on_standard_output (int fd, gpointer user_data)
 {
-	GkdPrompt *self = GKD_PROMPT (user_data);
+	GkuPrompt *self = GKU_PROMPT (user_data);
 	gchar buffer[1024];
 	gssize ret;
 
-	g_return_val_if_fail (GKD_IS_PROMPT (self), FALSE);
+	g_return_val_if_fail (GKU_IS_PROMPT (self), FALSE);
 
 	ret = egg_spawn_read_output (fd, buffer, sizeof (buffer));
 	if (ret < 0) {
@@ -192,12 +192,12 @@ on_standard_output (int fd, gpointer user_data)
 static gboolean
 on_standard_error (int fd, gpointer user_data)
 {
-	GkdPrompt *self = GKD_PROMPT (user_data);
+	GkuPrompt *self = GKU_PROMPT (user_data);
 	gchar buffer[1024];
 	gssize ret;
 	gchar *ptr;
 
-	g_return_val_if_fail (GKD_IS_PROMPT (self), FALSE);
+	g_return_val_if_fail (GKU_IS_PROMPT (self), FALSE);
 
 	ret = egg_spawn_read_output (fd, buffer, sizeof (buffer));
 	if (ret < 0) {
@@ -225,10 +225,10 @@ on_standard_error (int fd, gpointer user_data)
 static void
 on_io_completed (gpointer user_data)
 {
-	GkdPrompt *self = GKD_PROMPT (user_data);
+	GkuPrompt *self = GKU_PROMPT (user_data);
 	GError *error = NULL;
 
-	g_return_if_fail (GKD_IS_PROMPT (self));
+	g_return_if_fail (GKU_IS_PROMPT (self));
 
 	g_assert (!self->pv->output);
 	g_assert (self->pv->io_tag != 0);
@@ -269,7 +269,7 @@ on_io_completed (gpointer user_data)
 static void
 on_child_exited (GPid pid, gint status, gpointer user_data)
 {
-	GkdPrompt *self = GKD_PROMPT (user_data);
+	GkuPrompt *self = GKU_PROMPT (user_data);
 	gint code;
 
 	if (pid == self->pv->pid) {
@@ -293,7 +293,7 @@ on_child_exited (GPid pid, gint status, gpointer user_data)
 }
 
 static void
-prepare_transport_crypto (GkdPrompt *self)
+prepare_transport_crypto (GkuPrompt *self)
 {
 	TransportCrypto *transport;
 	gcry_mpi_t pub, base;
@@ -308,9 +308,9 @@ prepare_transport_crypto (GkdPrompt *self)
 			g_return_if_reached ();
 
 		/* Send over the prime, base, and public bits */
-		gkd_prompt_util_encode_mpi (self->pv->input, "transport", "prime", transport->prime);
-		gkd_prompt_util_encode_mpi (self->pv->input, "transport", "base", base);
-		gkd_prompt_util_encode_mpi (self->pv->input, "transport", "public", pub);
+		gku_prompt_util_encode_mpi (self->pv->input, "transport", "prime", transport->prime);
+		gku_prompt_util_encode_mpi (self->pv->input, "transport", "base", base);
+		gku_prompt_util_encode_mpi (self->pv->input, "transport", "public", pub);
 
 		gcry_mpi_release (base);
 		gcry_mpi_release (pub);
@@ -326,7 +326,7 @@ prepare_transport_crypto (GkdPrompt *self)
 }
 
 static gconstpointer
-calculate_transport_key (GkdPrompt *self, gsize *n_key)
+calculate_transport_key (GkuPrompt *self, gsize *n_key)
 {
 	gcry_mpi_t peer;
 	gpointer value;
@@ -335,13 +335,13 @@ calculate_transport_key (GkdPrompt *self, gsize *n_key)
 	g_assert (n_key);
 
 	if (!self->pv->transport) {
-		g_warning ("GkdPrompt did not negotiate crypto, but its caller is now asking"
+		g_warning ("GkuPrompt did not negotiate crypto, but its caller is now asking"
 		           " it to do the decryption. This is an error in gnome-keyring");
 		return NULL;
 	}
 
 	if (!self->pv->transport->key) {
-		if (!gkd_prompt_util_decode_mpi (self->pv->output, "transport", "public", &peer))
+		if (!gku_prompt_util_decode_mpi (self->pv->output, "transport", "public", &peer))
 			return NULL;
 
 		value = egg_dh_gen_secret (peer, self->pv->transport->private,
@@ -362,7 +362,7 @@ calculate_transport_key (GkdPrompt *self, gsize *n_key)
 }
 
 static gboolean
-prepare_input_data (GkdPrompt *self)
+prepare_input_data (GkuPrompt *self)
 {
 	GError *error = NULL;
 
@@ -390,7 +390,7 @@ prepare_input_data (GkdPrompt *self)
 }
 
 static void
-display_async_prompt (GkdPrompt *self)
+display_async_prompt (GkuPrompt *self)
 {
 	EggSpawnCallbacks callbacks;
 	GError *error = NULL;
@@ -445,7 +445,7 @@ display_async_prompt (GkdPrompt *self)
 }
 
 static void
-clear_prompt_data (GkdPrompt *self)
+clear_prompt_data (GkuPrompt *self)
 {
 	TransportCrypto *transport;
 
@@ -496,22 +496,22 @@ clear_prompt_data (GkdPrompt *self)
  */
 
 static gboolean
-gkd_prompt_real_responded (GkdPrompt *self)
+gku_prompt_real_responded (GkuPrompt *self)
 {
 	/* The prompt is done, if nobody overrode this signal and returned TRUE */
 	return FALSE;
 }
 
 static void
-gkd_prompt_real_completed (GkdPrompt *self)
+gku_prompt_real_completed (GkuPrompt *self)
 {
 	/* Nothing to do */
 }
 
 static GObject*
-gkd_prompt_constructor (GType type, guint n_props, GObjectConstructParam *props)
+gku_prompt_constructor (GType type, guint n_props, GObjectConstructParam *props)
 {
-	GkdPrompt *self = GKD_PROMPT (G_OBJECT_CLASS (gkd_prompt_parent_class)->constructor(type, n_props, props));
+	GkuPrompt *self = GKU_PROMPT (G_OBJECT_CLASS (gku_prompt_parent_class)->constructor(type, n_props, props));
 	g_return_val_if_fail (self, NULL);
 
 	if (!self->pv->executable)
@@ -521,27 +521,27 @@ gkd_prompt_constructor (GType type, guint n_props, GObjectConstructParam *props)
 }
 
 static void
-gkd_prompt_init (GkdPrompt *self)
+gku_prompt_init (GkuPrompt *self)
 {
-	self->pv = G_TYPE_INSTANCE_GET_PRIVATE (self, GKD_TYPE_PROMPT, GkdPromptPrivate);
-	gkd_prompt_reset (self, TRUE);
+	self->pv = G_TYPE_INSTANCE_GET_PRIVATE (self, GKU_TYPE_PROMPT, GkuPromptPrivate);
+	gku_prompt_reset (self, TRUE);
 }
 
 static void
-gkd_prompt_dispose (GObject *obj)
+gku_prompt_dispose (GObject *obj)
 {
-	GkdPrompt *self = GKD_PROMPT (obj);
+	GkuPrompt *self = GKU_PROMPT (obj);
 
 	kill_process (self);
 	clear_prompt_data (self);
 
-	G_OBJECT_CLASS (gkd_prompt_parent_class)->dispose (obj);
+	G_OBJECT_CLASS (gku_prompt_parent_class)->dispose (obj);
 }
 
 static void
-gkd_prompt_finalize (GObject *obj)
+gku_prompt_finalize (GObject *obj)
 {
-	GkdPrompt *self = GKD_PROMPT (obj);
+	GkuPrompt *self = GKU_PROMPT (obj);
 
 	g_assert (self->pv->pid == 0);
 	g_assert (!self->pv->input);
@@ -555,31 +555,31 @@ gkd_prompt_finalize (GObject *obj)
 	g_free (self->pv->executable);
 	self->pv->executable = NULL;
 
-	G_OBJECT_CLASS (gkd_prompt_parent_class)->finalize (obj);
+	G_OBJECT_CLASS (gku_prompt_parent_class)->finalize (obj);
 }
 
 static void
-gkd_prompt_class_init (GkdPromptClass *klass)
+gku_prompt_class_init (GkuPromptClass *klass)
 {
 	GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 
-	gobject_class->constructor = gkd_prompt_constructor;
-	gobject_class->dispose = gkd_prompt_dispose;
-	gobject_class->finalize = gkd_prompt_finalize;
+	gobject_class->constructor = gku_prompt_constructor;
+	gobject_class->dispose = gku_prompt_dispose;
+	gobject_class->finalize = gku_prompt_finalize;
 
-	klass->responded = gkd_prompt_real_responded;
-	klass->completed = gkd_prompt_real_completed;
+	klass->responded = gku_prompt_real_responded;
+	klass->completed = gku_prompt_real_completed;
 
-	g_type_class_add_private (klass, sizeof (GkdPromptPrivate));
+	g_type_class_add_private (klass, sizeof (GkuPromptPrivate));
 
-	signals[COMPLETED] = g_signal_new ("completed", GKD_TYPE_PROMPT,
-	                                   G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GkdPromptClass, completed),
+	signals[COMPLETED] = g_signal_new ("completed", GKU_TYPE_PROMPT,
+	                                   G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GkuPromptClass, completed),
 	                                   NULL, NULL, g_cclosure_marshal_VOID__VOID,
 	                                   G_TYPE_NONE, 0);
 
-	signals[RESPONDED] = g_signal_new ("responded", GKD_TYPE_PROMPT,
-	                                   G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GkdPromptClass, responded),
-	                                   g_signal_accumulator_true_handled, NULL, gkd_prompt_marshal_BOOLEAN__VOID,
+	signals[RESPONDED] = g_signal_new ("responded", GKU_TYPE_PROMPT,
+	                                   G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GkuPromptClass, responded),
+	                                   g_signal_accumulator_true_handled, NULL, gku_prompt_marshal_BOOLEAN__VOID,
 	                                   G_TYPE_BOOLEAN, 0);
 }
 
@@ -587,91 +587,91 @@ gkd_prompt_class_init (GkdPromptClass *klass)
  * PUBLIC
  */
 
-GkdPrompt*
-gkd_prompt_new (void)
+GkuPrompt*
+gku_prompt_new (void)
 {
-	return g_object_new (GKD_TYPE_PROMPT, NULL);
+	return g_object_new (GKU_TYPE_PROMPT, NULL);
 }
 
 void
-gkd_prompt_set_title (GkdPrompt *self, const gchar *title)
+gku_prompt_set_title (GkuPrompt *self, const gchar *title)
 {
-	g_return_if_fail (GKD_IS_PROMPT (self));
+	g_return_if_fail (GKU_IS_PROMPT (self));
 	g_return_if_fail (self->pv->input);
 	g_key_file_set_value (self->pv->input, "prompt", "title", title);
 }
 
 void
-gkd_prompt_set_primary_text (GkdPrompt *self, const gchar *primary)
+gku_prompt_set_primary_text (GkuPrompt *self, const gchar *primary)
 {
-	g_return_if_fail (GKD_IS_PROMPT (self));
+	g_return_if_fail (GKU_IS_PROMPT (self));
 	g_return_if_fail (self->pv->input);
 	g_key_file_set_value (self->pv->input, "prompt", "primary", primary);
 }
 
 void
-gkd_prompt_set_secondary_text (GkdPrompt *self, const gchar *secondary)
+gku_prompt_set_secondary_text (GkuPrompt *self, const gchar *secondary)
 {
-	g_return_if_fail (GKD_IS_PROMPT (self));
+	g_return_if_fail (GKU_IS_PROMPT (self));
 	g_return_if_fail (self->pv->input);
 	g_key_file_set_value (self->pv->input, "prompt", "secondary", secondary);
 }
 
 void
-gkd_prompt_show_widget (GkdPrompt *self, const gchar *widget)
+gku_prompt_show_widget (GkuPrompt *self, const gchar *widget)
 {
-	g_return_if_fail (GKD_IS_PROMPT (self));
+	g_return_if_fail (GKU_IS_PROMPT (self));
 	g_return_if_fail (self->pv->input);
 	g_key_file_set_boolean (self->pv->input, "visibility", widget, TRUE);
 }
 
 void
-gkd_prompt_hide_widget (GkdPrompt *self, const gchar *widget)
+gku_prompt_hide_widget (GkuPrompt *self, const gchar *widget)
 {
-	g_return_if_fail (GKD_IS_PROMPT (self));
+	g_return_if_fail (GKU_IS_PROMPT (self));
 	g_return_if_fail (self->pv->input);
 	g_key_file_set_boolean (self->pv->input, "visibility", widget, FALSE);
 }
 
 void
-gkd_prompt_select_widget (GkdPrompt *self, const gchar *widget)
+gku_prompt_select_widget (GkuPrompt *self, const gchar *widget)
 {
-	g_return_if_fail (GKD_IS_PROMPT (self));
+	g_return_if_fail (GKU_IS_PROMPT (self));
 	g_return_if_fail (self->pv->input);
 	g_key_file_set_boolean (self->pv->input, "selected", widget, TRUE);
 }
 
 gboolean
-gkd_prompt_has_response (GkdPrompt *self)
+gku_prompt_has_response (GkuPrompt *self)
 {
-	g_return_val_if_fail (GKD_IS_PROMPT (self), FALSE);
+	g_return_val_if_fail (GKU_IS_PROMPT (self), FALSE);
 	return self->pv->output ? TRUE : FALSE;
 }
 
 gint
-gkd_prompt_get_response (GkdPrompt *self)
+gku_prompt_get_response (GkuPrompt *self)
 {
 	gchar *response;
 	guint ret;
 
-	g_return_val_if_fail (GKD_IS_PROMPT (self), GKD_RESPONSE_FAILURE);
+	g_return_val_if_fail (GKU_IS_PROMPT (self), GKU_RESPONSE_FAILURE);
 	if (self->pv->failure)
-		return GKD_RESPONSE_FAILURE;
+		return GKU_RESPONSE_FAILURE;
 
-	g_return_val_if_fail (self->pv->output, GKD_RESPONSE_FAILURE);
+	g_return_val_if_fail (self->pv->output, GKU_RESPONSE_FAILURE);
 
 	response = g_key_file_get_value (self->pv->output, "prompt", "response", NULL);
 	if (!response || g_str_equal (response, "")) {
-		ret = GKD_RESPONSE_NONE;
+		ret = GKU_RESPONSE_NONE;
 	} else if (g_str_equal (response, "ok")) {
-		ret = GKD_RESPONSE_OK;
+		ret = GKU_RESPONSE_OK;
 	} else if (g_str_equal (response, "no")) {
-		ret =  GKD_RESPONSE_NO;
+		ret =  GKU_RESPONSE_NO;
 	} else if (g_str_equal (response, "other")) {
-		ret = GKD_RESPONSE_OTHER;
+		ret = GKU_RESPONSE_OTHER;
 	} else {
 		g_warning ("invalid response field received from prompt: %s", response);
-		ret = GKD_RESPONSE_NONE;
+		ret = GKU_RESPONSE_NONE;
 	}
 
 	g_free (response);
@@ -679,7 +679,7 @@ gkd_prompt_get_response (GkdPrompt *self)
 }
 
 gchar*
-gkd_prompt_get_password (GkdPrompt *self, const gchar *password_type)
+gku_prompt_get_password (GkuPrompt *self, const gchar *password_type)
 {
 	gchar *result;
 	gpointer data;
@@ -689,9 +689,9 @@ gkd_prompt_get_password (GkdPrompt *self, const gchar *password_type)
 	gpointer parameter;
 	gsize n_parameter;
 
-	g_return_val_if_fail (GKD_IS_PROMPT (self), NULL);
+	g_return_val_if_fail (GKU_IS_PROMPT (self), NULL);
 
-	if (!gkd_prompt_get_transport_password (self, password_type,
+	if (!gku_prompt_get_transport_password (self, password_type,
 	                                        &parameter, &n_parameter,
 	                                        &data, &n_data))
 		return NULL;
@@ -700,7 +700,7 @@ gkd_prompt_get_password (GkdPrompt *self, const gchar *password_type)
 	if (n_parameter) {
 		key = calculate_transport_key (self, &n_key);
 		g_return_val_if_fail (key, NULL);
-		result = gkd_prompt_util_decrypt_text (key, n_key,
+		result = gku_prompt_util_decrypt_text (key, n_key,
 		                                       parameter, n_parameter,
 		                                       data, n_data);
 
@@ -716,9 +716,9 @@ gkd_prompt_get_password (GkdPrompt *self, const gchar *password_type)
 }
 
 gboolean
-gkd_prompt_is_widget_selected (GkdPrompt *self, const gchar *widget)
+gku_prompt_is_widget_selected (GkuPrompt *self, const gchar *widget)
 {
-	g_return_val_if_fail (GKD_IS_PROMPT (self), FALSE);
+	g_return_val_if_fail (GKU_IS_PROMPT (self), FALSE);
 	g_return_val_if_fail (self->pv->output, FALSE);
 
 	if (!self->pv->failure)
@@ -729,9 +729,9 @@ gkd_prompt_is_widget_selected (GkdPrompt *self, const gchar *widget)
 }
 
 void
-gkd_prompt_set_window_id (GkdPrompt *self, const gchar *window_id)
+gku_prompt_set_window_id (GkuPrompt *self, const gchar *window_id)
 {
-	g_return_if_fail (GKD_IS_PROMPT (self));
+	g_return_if_fail (GKU_IS_PROMPT (self));
 	g_return_if_fail (self->pv->input);
 	if (!window_id)
 		g_key_file_remove_key (self->pv->input, "prompt", "window-id", NULL);
@@ -740,9 +740,9 @@ gkd_prompt_set_window_id (GkdPrompt *self, const gchar *window_id)
 }
 
 void
-gkd_prompt_set_warning (GkdPrompt *self, const gchar *warning)
+gku_prompt_set_warning (GkuPrompt *self, const gchar *warning)
 {
-	g_return_if_fail (GKD_IS_PROMPT (self));
+	g_return_if_fail (GKU_IS_PROMPT (self));
 	g_return_if_fail (self->pv->input);
 	if (!warning)
 		g_key_file_remove_key (self->pv->input, "prompt", "warning", NULL);
@@ -751,13 +751,13 @@ gkd_prompt_set_warning (GkdPrompt *self, const gchar *warning)
 }
 
 void
-gkd_prompt_reset (GkdPrompt *self, gboolean hard)
+gku_prompt_reset (GkuPrompt *self, gboolean hard)
 {
 	GKeyFile *input;
 	gchar *value;
 	gint i;
 
-	g_return_if_fail (GKD_IS_PROMPT (self));
+	g_return_if_fail (GKU_IS_PROMPT (self));
 
 	kill_process (self);
 	self->pv->pid = 0;
@@ -782,19 +782,19 @@ gkd_prompt_reset (GkdPrompt *self, gboolean hard)
 
 
 void
-gkd_prompt_set_transport_param (GkdPrompt *self, const gchar *name,
+gku_prompt_set_transport_param (GkuPrompt *self, const gchar *name,
                                 gconstpointer value, gsize n_value)
 {
-	g_return_if_fail (GKD_IS_PROMPT (self));
+	g_return_if_fail (GKU_IS_PROMPT (self));
 	g_return_if_fail (self->pv->input);
 	g_return_if_fail (name);
-	gkd_prompt_util_encode_hex (self->pv->input, "transport", name, value, n_value);
+	gku_prompt_util_encode_hex (self->pv->input, "transport", name, value, n_value);
 }
 
 gpointer
-gkd_prompt_get_transport_param (GkdPrompt *self, const gchar *name, gsize *n_value)
+gku_prompt_get_transport_param (GkuPrompt *self, const gchar *name, gsize *n_value)
 {
-	g_return_val_if_fail (GKD_IS_PROMPT (self), NULL);
+	g_return_val_if_fail (GKU_IS_PROMPT (self), NULL);
 	g_return_val_if_fail (name, NULL);
 	g_return_val_if_fail (n_value, NULL);
 
@@ -802,12 +802,12 @@ gkd_prompt_get_transport_param (GkdPrompt *self, const gchar *name, gsize *n_val
 		return NULL;
 
 	g_return_val_if_fail (self->pv->output, NULL);
-	return gkd_prompt_util_decode_hex (self->pv->output, "transport", name, n_value);
+	return gku_prompt_util_decode_hex (self->pv->output, "transport", name, n_value);
 
 }
 
 gboolean
-gkd_prompt_get_transport_password (GkdPrompt *self, const gchar *password_type,
+gku_prompt_get_transport_password (GkuPrompt *self, const gchar *password_type,
                                    gpointer *parameter, gsize *n_parameter,
                                    gpointer *value, gsize *n_value)
 {
@@ -825,13 +825,13 @@ gkd_prompt_get_transport_password (GkdPrompt *self, const gchar *password_type,
 	g_return_val_if_fail (self->pv->output, FALSE);
 
 	/* Parse out an IV */
-	*parameter = gkd_prompt_util_decode_hex (self->pv->output, password_type,
+	*parameter = gku_prompt_util_decode_hex (self->pv->output, password_type,
 	                                         "parameter", n_parameter);
 	if (*parameter == NULL)
 		*n_parameter = 0;
 
 	/* Parse out the password */
-	*value = gkd_prompt_util_decode_hex (self->pv->output, password_type,
+	*value = gku_prompt_util_decode_hex (self->pv->output, password_type,
 	                                     "value", n_value);
 	if (*value == NULL)
 		*n_value = 0;
@@ -840,12 +840,12 @@ gkd_prompt_get_transport_password (GkdPrompt *self, const gchar *password_type,
 }
 
 void
-gkd_prompt_get_unlock_options (GkdPrompt *self, GP11Attributes *attrs)
+gku_prompt_get_unlock_options (GkuPrompt *self, GP11Attributes *attrs)
 {
 	gboolean bval;
 	gint ival;
 
-	g_return_if_fail (GKD_IS_PROMPT (self));
+	g_return_if_fail (GKU_IS_PROMPT (self));
 	g_return_if_fail (attrs);
 	g_return_if_fail (self->pv->output);
 
@@ -862,12 +862,12 @@ gkd_prompt_get_unlock_options (GkdPrompt *self, GP11Attributes *attrs)
 }
 
 void
-gkd_prompt_set_unlock_options (GkdPrompt *self, GP11Attributes *attrs)
+gku_prompt_set_unlock_options (GkuPrompt *self, GP11Attributes *attrs)
 {
 	gboolean bval;
 	gulong uval;
 
-	g_return_if_fail (GKD_IS_PROMPT (self));
+	g_return_if_fail (GKU_IS_PROMPT (self));
 	g_return_if_fail (attrs);
 	g_return_if_fail (self->pv->input);
 
@@ -882,9 +882,9 @@ gkd_prompt_set_unlock_options (GkdPrompt *self, GP11Attributes *attrs)
 }
 
 gboolean
-gkd_prompt_get_unlock_auto (GkdPrompt *self)
+gku_prompt_get_unlock_auto (GkuPrompt *self)
 {
-	g_return_val_if_fail (GKD_IS_PROMPT (self), FALSE);
+	g_return_val_if_fail (GKU_IS_PROMPT (self), FALSE);
 	g_return_val_if_fail (self->pv->output, FALSE);
 	return g_key_file_get_boolean (self->pv->output, "unlock-options", "unlock-auto", NULL);
 }
@@ -898,10 +898,10 @@ static void next_attention_req (const gchar *);
 
 typedef struct _Attention {
 	gchar *window_id;
-	GkdPromptAttentionFunc callback;
+	GkuPromptAttentionFunc callback;
 	GDestroyNotify destroy;
 	gpointer user_data;
-	GkdPrompt *prompt;
+	GkuPrompt *prompt;
 	gboolean active;
 	GCond *cond;
 } AttentionReq;
@@ -910,12 +910,12 @@ static GHashTable *attention_reqs = NULL;
 static GStaticMutex attention_mutex = G_STATIC_MUTEX_INIT;
 
 static void
-done_attention_req (GkdPrompt *prompt, gpointer user_data)
+done_attention_req (GkuPrompt *prompt, gpointer user_data)
 {
 	AttentionReq *att = user_data;
 
 	g_assert (att);
-	g_assert (GKD_IS_PROMPT (att->prompt));
+	g_assert (GKU_IS_PROMPT (att->prompt));
 
 	if (att->active) {
 		att->active = FALSE;
@@ -1039,7 +1039,7 @@ next_attention_req (const gchar *window_id)
 	                       (GClosureNotify)free_attention_req, G_CONNECT_AFTER);
 
 	/* Actually display the prompt, "completed" signal will fire */
-	gkd_prompt_set_window_id (att->prompt, window_id);
+	gku_prompt_set_window_id (att->prompt, window_id);
 	display_async_prompt (att->prompt);
 }
 
@@ -1074,7 +1074,7 @@ service_attention_req (gpointer user_data)
 }
 
 static AttentionReq*
-prepare_attention_req (const gchar *window_id, GkdPromptAttentionFunc callback,
+prepare_attention_req (const gchar *window_id, GkuPromptAttentionFunc callback,
                        gpointer user_data, GDestroyNotify destroy_notify)
 {
 	AttentionReq *att;
@@ -1092,7 +1092,7 @@ prepare_attention_req (const gchar *window_id, GkdPromptAttentionFunc callback,
 }
 
 void
-gkd_prompt_request_attention_async (const gchar *window_id, GkdPromptAttentionFunc callback,
+gku_prompt_request_attention_async (const gchar *window_id, GkuPromptAttentionFunc callback,
                                     gpointer user_data, GDestroyNotify destroy_notify)
 {
 	AttentionReq *att = prepare_attention_req (window_id, callback, user_data, destroy_notify);
@@ -1101,7 +1101,7 @@ gkd_prompt_request_attention_async (const gchar *window_id, GkdPromptAttentionFu
 }
 
 void
-gkd_prompt_request_attention_sync (const gchar *window_id, GkdPromptAttentionFunc callback,
+gku_prompt_request_attention_sync (const gchar *window_id, GkuPromptAttentionFunc callback,
                                    gpointer user_data, GDestroyNotify destroy_notify)
 {
 	AttentionReq *att = prepare_attention_req (window_id, callback, user_data, destroy_notify);
diff --git a/daemon/prompt/gkd-prompt.h b/ui/gku-prompt.h
similarity index 54%
rename from daemon/prompt/gkd-prompt.h
rename to ui/gku-prompt.h
index b1ce18b..1520f89 100644
--- a/daemon/prompt/gkd-prompt.h
+++ b/ui/gku-prompt.h
@@ -19,120 +19,120 @@
  * 02111-1307, USA.
  */
 
-#ifndef __GKD_PROMPT_H__
-#define __GKD_PROMPT_H__
+#ifndef __GKU_PROMPT_H__
+#define __GKU_PROMPT_H__
 
 #include <glib-object.h>
 
 #include <gp11/gp11.h>
 
 typedef enum {
-	GKD_RESPONSE_FAILURE      = -1,
-	GKD_RESPONSE_NONE         = 0,
-	GKD_RESPONSE_NO           = 1,
-	GKD_RESPONSE_OK           = 2,
-	GKD_RESPONSE_OTHER        = 3,
-} GkrAskResponse;
-
-#define GKD_TYPE_PROMPT               (gkd_prompt_get_type ())
-#define GKD_PROMPT(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), GKD_TYPE_PROMPT, GkdPrompt))
-#define GKD_PROMPT_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), GKD_TYPE_PROMPT, GkdPromptClass))
-#define GKD_IS_PROMPT(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GKD_TYPE_PROMPT))
-#define GKD_IS_PROMPT_CLASS(klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), GKD_TYPE_PROMPT))
-#define GKD_PROMPT_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), GKD_TYPE_PROMPT, GkdPromptClass))
-
-typedef struct _GkdPrompt GkdPrompt;
-typedef struct _GkdPromptClass GkdPromptClass;
-typedef struct _GkdPromptPrivate GkdPromptPrivate;
-
-struct _GkdPrompt {
+	GKU_RESPONSE_FAILURE      = -1,
+	GKU_RESPONSE_NONE         = 0,
+	GKU_RESPONSE_NO           = 1,
+	GKU_RESPONSE_OK           = 2,
+	GKU_RESPONSE_OTHER        = 3,
+} GkuResponse;
+
+#define GKU_TYPE_PROMPT               (gku_prompt_get_type ())
+#define GKU_PROMPT(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), GKU_TYPE_PROMPT, GkuPrompt))
+#define GKU_PROMPT_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), GKU_TYPE_PROMPT, GkuPromptClass))
+#define GKU_IS_PROMPT(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GKU_TYPE_PROMPT))
+#define GKU_IS_PROMPT_CLASS(klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), GKU_TYPE_PROMPT))
+#define GKU_PROMPT_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), GKU_TYPE_PROMPT, GkuPromptClass))
+
+typedef struct _GkuPrompt GkuPrompt;
+typedef struct _GkuPromptClass GkuPromptClass;
+typedef struct _GkuPromptPrivate GkuPromptPrivate;
+
+struct _GkuPrompt {
 	GObject parent;
-	GkdPromptPrivate *pv;
+	GkuPromptPrivate *pv;
 };
 
-struct _GkdPromptClass {
+struct _GkuPromptClass {
 	GObjectClass parent_class;
 
 	/* signals */
-	gboolean (*responded) (GkdPrompt *self);
-	void (*completed) (GkdPrompt *self);
+	gboolean (*responded) (GkuPrompt *self);
+	void (*completed) (GkuPrompt *self);
 };
 
-GType               gkd_prompt_get_type               (void);
+GType               gku_prompt_get_type               (void);
 
-GkdPrompt*          gkd_prompt_new                    (void);
+GkuPrompt*          gku_prompt_new                    (void);
 
-void                gkd_prompt_reset                  (GkdPrompt *prompt,
+void                gku_prompt_reset                  (GkuPrompt *prompt,
                                                        gboolean hard);
 
-void                gkd_prompt_set_title              (GkdPrompt *prompt,
+void                gku_prompt_set_title              (GkuPrompt *prompt,
                                                        const gchar *title);
 
-void                gkd_prompt_set_primary_text       (GkdPrompt *prompt,
+void                gku_prompt_set_primary_text       (GkuPrompt *prompt,
                                                        const gchar *primary);
 
-void                gkd_prompt_set_secondary_text     (GkdPrompt *prompt,
+void                gku_prompt_set_secondary_text     (GkuPrompt *prompt,
                                                        const gchar *secondary);
 
-void                gkd_prompt_set_warning            (GkdPrompt *prompt,
+void                gku_prompt_set_warning            (GkuPrompt *prompt,
                                                        const gchar *warning);
 
-void                gkd_prompt_set_window_id          (GkdPrompt *prompt,
+void                gku_prompt_set_window_id          (GkuPrompt *prompt,
                                                        const gchar *window_id);
 
-void                gkd_prompt_show_widget            (GkdPrompt *prompt,
+void                gku_prompt_show_widget            (GkuPrompt *prompt,
                                                        const gchar *widget);
 
-void                gkd_prompt_hide_widget            (GkdPrompt *prompt,
+void                gku_prompt_hide_widget            (GkuPrompt *prompt,
                                                        const gchar *widget);
 
-void                gkd_prompt_select_widget          (GkdPrompt *prompt,
+void                gku_prompt_select_widget          (GkuPrompt *prompt,
                                                        const gchar *widget);
 
-gboolean            gkd_prompt_has_response           (GkdPrompt *prompt);
+gboolean            gku_prompt_has_response           (GkuPrompt *prompt);
 
-gint                gkd_prompt_get_response           (GkdPrompt *prompt);
+gint                gku_prompt_get_response           (GkuPrompt *prompt);
 
-gchar*              gkd_prompt_get_password           (GkdPrompt *prompt,
+gchar*              gku_prompt_get_password           (GkuPrompt *prompt,
                                                        const gchar *password_type);
 
-gpointer            gkd_prompt_get_transport_param    (GkdPrompt *prompt,
+gpointer            gku_prompt_get_transport_param    (GkuPrompt *prompt,
                                                        const gchar *name,
                                                        gsize *n_value);
 
-void                gkd_prompt_set_transport_param    (GkdPrompt *prompt,
+void                gku_prompt_set_transport_param    (GkuPrompt *prompt,
                                                        const gchar *name,
                                                        gconstpointer value,
                                                        gsize n_value);
 
-gboolean            gkd_prompt_get_transport_password (GkdPrompt *self,
+gboolean            gku_prompt_get_transport_password (GkuPrompt *self,
                                                        const gchar *password_type,
                                                        gpointer *parameter,
                                                        gsize *n_parameter,
                                                        gpointer *value,
                                                        gsize *n_value);
 
-void                gkd_prompt_get_unlock_options     (GkdPrompt *self,
+void                gku_prompt_get_unlock_options     (GkuPrompt *self,
                                                        GP11Attributes *attrs);
 
-void                gkd_prompt_set_unlock_options     (GkdPrompt *self,
+void                gku_prompt_set_unlock_options     (GkuPrompt *self,
                                                        GP11Attributes *attrs);
 
-gboolean            gkd_prompt_get_unlock_auto        (GkdPrompt *self);
+gboolean            gku_prompt_get_unlock_auto        (GkuPrompt *self);
 
-gboolean            gkd_prompt_is_widget_selected     (GkdPrompt *prompt,
+gboolean            gku_prompt_is_widget_selected     (GkuPrompt *prompt,
                                                        const gchar *widget);
 
-typedef GkdPrompt*  (*GkdPromptAttentionFunc)             (gpointer user_data);
+typedef GkuPrompt*  (*GkuPromptAttentionFunc)             (gpointer user_data);
 
-void                gkd_prompt_request_attention_async    (const gchar *window_id,
-                                                           GkdPromptAttentionFunc callback,
+void                gku_prompt_request_attention_async    (const gchar *window_id,
+                                                           GkuPromptAttentionFunc callback,
                                                            gpointer user_data,
                                                            GDestroyNotify destroy_notify);
 
-void                gkd_prompt_request_attention_sync     (const gchar *window_id,
-                                                           GkdPromptAttentionFunc callback,
+void                gku_prompt_request_attention_sync     (const gchar *window_id,
+                                                           GkuPromptAttentionFunc callback,
                                                            gpointer user_data,
                                                            GDestroyNotify destroy_notify);
 
-#endif /* __GKD_PROMPT_H__ */
+#endif /* __GKU_PROMPT_H__ */
diff --git a/daemon/prompt/gkd-prompt.ui b/ui/gku-prompt.ui
similarity index 100%
rename from daemon/prompt/gkd-prompt.ui
rename to ui/gku-prompt.ui
diff --git a/daemon/prompt/tests/Makefile.am b/ui/tests/Makefile.am
similarity index 81%
rename from daemon/prompt/tests/Makefile.am
rename to ui/tests/Makefile.am
index 2717a64..be1422e 100644
--- a/daemon/prompt/tests/Makefile.am
+++ b/ui/tests/Makefile.am
@@ -5,7 +5,7 @@ UNIT_AUTO = \
 UNIT_PROMPT =
 
 UNIT_LIBS =  \
-	$(top_builddir)/daemon/prompt/libgkd-prompt.la \
+	$(top_builddir)/ui/libgku-prompt.la \
 	$(top_builddir)/egg/libegg-prompt.la
 
 EXTRA_DIST = \
diff --git a/daemon/prompt/tests/test-data/prompt-empty b/ui/tests/test-data/prompt-empty
similarity index 100%
rename from daemon/prompt/tests/test-data/prompt-empty
rename to ui/tests/test-data/prompt-empty
diff --git a/daemon/prompt/tests/test-data/prompt-full b/ui/tests/test-data/prompt-full
similarity index 100%
rename from daemon/prompt/tests/test-data/prompt-full
rename to ui/tests/test-data/prompt-full
diff --git a/daemon/prompt/tests/test-data/prompt-test b/ui/tests/test-data/prompt-test
similarity index 100%
rename from daemon/prompt/tests/test-data/prompt-test
rename to ui/tests/test-data/prompt-test
diff --git a/daemon/prompt/tests/unit-test-util.c b/ui/tests/unit-test-util.c
similarity index 83%
rename from daemon/prompt/tests/unit-test-util.c
rename to ui/tests/unit-test-util.c
index d37f8c5..75d7aba 100644
--- a/daemon/prompt/tests/unit-test-util.c
+++ b/ui/tests/unit-test-util.c
@@ -1,5 +1,5 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* unit-test-util.c: Test gkd-prompt-util.c
+/* unit-test-util.c: Test gku-prompt-util.c
 
    Copyright (C) 2009 Stefan Walter
 
@@ -23,7 +23,7 @@
 
 #include "run-auto-test.h"
 
-#include "gkd-prompt-util.h"
+#include "gku-prompt-util.h"
 
 #include <egg/egg-dh.h>
 #include <egg/egg-libgcrypt.h>
@@ -52,8 +52,8 @@ DEFINE_TEST(encode_decode_mpi)
 	mpi = gcry_mpi_new (512);
 	gcry_mpi_randomize (mpi, 512, GCRY_WEAK_RANDOM);
 
-	gkd_prompt_util_encode_mpi (key_file, "section", "field", mpi);
-	if (!gkd_prompt_util_decode_mpi (key_file, "section", "field", &check))
+	gku_prompt_util_encode_mpi (key_file, "section", "field", mpi);
+	if (!gku_prompt_util_decode_mpi (key_file, "section", "field", &check))
 		g_assert_not_reached ();
 
 	g_assert (gcry_mpi_cmp (mpi, check) == 0);
@@ -65,7 +65,7 @@ DEFINE_TEST(decode_nonexistant_mpi)
 {
 	gcry_mpi_t mpi;
 
-	if (gkd_prompt_util_decode_mpi (key_file, "nonexist", "nope", &mpi))
+	if (gku_prompt_util_decode_mpi (key_file, "nonexist", "nope", &mpi))
 		g_assert_not_reached ();
 }
 
@@ -76,8 +76,8 @@ DEFINE_TEST(encode_decode_hex)
 	gsize n_check;
 
 	gcry_create_nonce (buffer, 32);
-	gkd_prompt_util_encode_hex (key_file, "section", "field", buffer, 32);
-	check = gkd_prompt_util_decode_hex (key_file, "section", "field", &n_check);
+	gku_prompt_util_encode_hex (key_file, "section", "field", buffer, 32);
+	check = gku_prompt_util_decode_hex (key_file, "section", "field", &n_check);
 	g_assert (check);
 	g_assert (n_check == 32);
 	g_assert (memcmp (buffer, check, 32) == 0);
@@ -89,7 +89,7 @@ DEFINE_TEST(decode_nonexistant_hex)
 {
 	gsize n_data;
 
-	if (gkd_prompt_util_decode_hex (key_file, "nonexist", "nope", &n_data))
+	if (gku_prompt_util_decode_hex (key_file, "nonexist", "nope", &n_data))
 		g_assert_not_reached ();
 }
 
@@ -109,14 +109,14 @@ do_encrypt_decrypt_text (const gchar *text)
 	gcry_randomize (key, n_key, GCRY_WEAK_RANDOM);
 
 	gcry_create_nonce (iv, 16);
-	enc = gkd_prompt_util_encrypt_text (key, n_key, iv, 16, text, &n_enc);
+	enc = gku_prompt_util_encrypt_text (key, n_key, iv, 16, text, &n_enc);
 
 	g_assert (enc);
 	/* Always greater due to null term */
 	g_assert (n_enc > strlen (text));
 	g_assert (n_enc % 16 == 0);
 
-	check = gkd_prompt_util_decrypt_text (key, n_key, iv, 16, enc, n_enc);
+	check = gku_prompt_util_decrypt_text (key, n_key, iv, 16, enc, n_enc);
 	egg_secure_clear (key, n_key);
 	egg_secure_free (key);
 	g_free (enc);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]