diff options
| author | Ray Strode <rstrode@redhat.com> | 2008-06-02 11:49:00 -0400 |
|---|---|---|
| committer | Ray Strode <rstrode@redhat.com> | 2008-06-02 11:49:00 -0400 |
| commit | f5a15611fb5fe1d36f8922e1c2a6f751ab0b8df7 (patch) | |
| tree | f44de427f359bdc19b76bf440cde0c4181d27d9e /src/splash-plugins/spinfinity | |
| parent | ccd95672582f2cfc98d0d6985603bda84f48f170 (diff) | |
Port password handling over to using new answer object
Diffstat (limited to 'src/splash-plugins/spinfinity')
| -rw-r--r-- | src/splash-plugins/spinfinity/Makefile.am | 2 | ||||
| -rw-r--r-- | src/splash-plugins/spinfinity/plugin.c | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/splash-plugins/spinfinity/Makefile.am b/src/splash-plugins/spinfinity/Makefile.am index fa6784d..23cdd54 100644 --- a/src/splash-plugins/spinfinity/Makefile.am +++ b/src/splash-plugins/spinfinity/Makefile.am @@ -15,6 +15,8 @@ spinfinity_la_CFLAGS = $(PLYMOUTH_CFLAGS) \ spinfinity_la_LDFLAGS = -module -avoid-version -export-dynamic spinfinity_la_LIBADD = $(PLYMOUTH_LIBS) ../../libply/libply.la spinfinity_la_SOURCES = $(srcdir)/../../ply-boot-splash-plugin.h \ + $(srcdir)/../../ply-answer.h \ + $(srcdir)/../../ply-answer.c \ $(srcdir)/../../ply-window.h \ $(srcdir)/../../ply-window.c \ $(srcdir)/throbber.h \ diff --git a/src/splash-plugins/spinfinity/plugin.c b/src/splash-plugins/spinfinity/plugin.c index 24298e7..b8f9b53 100644 --- a/src/splash-plugins/spinfinity/plugin.c +++ b/src/splash-plugins/spinfinity/plugin.c @@ -39,6 +39,7 @@ #include <unistd.h> #include <wchar.h> +#include "ply-answer.h" #include "ply-boot-splash-plugin.h" #include "ply-buffer.h" #include "ply-event-loop.h" @@ -78,8 +79,7 @@ struct _ply_boot_splash_plugin entry_t *entry; throbber_t *throbber; - ply_boot_splash_password_answer_handler_t password_answer_handler; - void *password_answer_data; + ply_answer_t *pending_password_answer; }; static void detach_from_event_loop (ply_boot_splash_plugin_t *plugin); @@ -245,7 +245,7 @@ on_keyboard_input (ply_boot_splash_plugin_t *plugin, const char *keyboard_input, size_t character_size) { - if (plugin->password_answer_handler == NULL) + if (plugin->pending_password_answer == NULL) return; plugin->entry->number_of_bullets++; @@ -263,11 +263,11 @@ void on_enter (ply_boot_splash_plugin_t *plugin, const char *text) { - if (plugin->password_answer_handler == NULL) + if (plugin->pending_password_answer == NULL) return; - plugin->password_answer_handler (plugin->password_answer_data, - text); + ply_answer_with_string (plugin->pending_password_answer, text); + plugin->pending_password_answer = NULL; if (plugin->entry != NULL) { @@ -456,11 +456,9 @@ show_password_entry (ply_boot_splash_plugin_t *plugin) void ask_for_password (ply_boot_splash_plugin_t *plugin, - ply_boot_splash_password_answer_handler_t answer_handler, - void *answer_data) + ply_answer_t *answer) { - plugin->password_answer_handler = answer_handler; - plugin->password_answer_data = answer_data; + plugin->pending_password_answer = answer; stop_animation (plugin); show_password_entry (plugin); |
