diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-08-12 14:38:25 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-08-12 14:38:25 +0000 |
commit | 18e40e0f4c45bf204571e548347e23b1bb5b4afd (patch) | |
tree | 81aa6fdc600db2576b6581bc596d09ffb7390cec /apps/plugins/keybox.c | |
parent | 345920fe7e9d261abf564a71cf9675fbe72679de (diff) | |
download | rockbox-18e40e0f4c45bf204571e548347e23b1bb5b4afd.tar.gz rockbox-18e40e0f4c45bf204571e548347e23b1bb5b4afd.tar.bz2 rockbox-18e40e0f4c45bf204571e548347e23b1bb5b4afd.zip |
Make kbd_input() show a cancel splash to indicate user abort better and for better consistency all over the place. Change checking for its return value (style-wise) at some places too.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22269 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/keybox.c')
-rw-r--r-- | apps/plugins/keybox.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/plugins/keybox.c b/apps/plugins/keybox.c index 6c59470fa4..733c6e95cd 100644 --- a/apps/plugins/keybox.c +++ b/apps/plugins/keybox.c @@ -190,12 +190,12 @@ static void add_entry(int selected_item) rb->splash(HZ, "Enter title"); pw_list.entries[i].title[0] = '\0'; - if (rb->kbd_input(pw_list.entries[i].title, FIELD_LEN)) + if (rb->kbd_input(pw_list.entries[i].title, FIELD_LEN) < 0) return; rb->splash(HZ, "Enter name"); pw_list.entries[i].name[0] = '\0'; - if (rb->kbd_input(pw_list.entries[i].name, FIELD_LEN)) + if (rb->kbd_input(pw_list.entries[i].name, FIELD_LEN) < 0) { pw_list.entries[i].title[0] = '\0'; return; @@ -203,7 +203,7 @@ static void add_entry(int selected_item) rb->splash(HZ, "Enter password"); pw_list.entries[i].password[0] = '\0'; - if (rb->kbd_input(pw_list.entries[i].password, FIELD_LEN)) + if (rb->kbd_input(pw_list.entries[i].password, FIELD_LEN) < 0) { pw_list.entries[i].title[0] = '\0'; pw_list.entries[i].name[0] = '\0'; @@ -508,11 +508,11 @@ static int enter_pw(char *pw_buf, size_t buflen, bool new_pw) if (new_pw) { rb->splash(HZ, "Enter new master password"); - if (rb->kbd_input(buf[0], sizeof(buf[0]))) + if (rb->kbd_input(buf[0], sizeof(buf[0])) < 0) return -1; rb->splash(HZ, "Confirm master password"); - if (rb->kbd_input(buf[1], sizeof(buf[1]))) + if (rb->kbd_input(buf[1], sizeof(buf[1])) < 0) return -1; if (rb->strcmp(buf[0], buf[1])) @@ -529,7 +529,7 @@ static int enter_pw(char *pw_buf, size_t buflen, bool new_pw) } rb->splash(HZ, "Enter master password"); - if (rb->kbd_input(pw_buf, buflen)) + if (rb->kbd_input(pw_buf, buflen) < 0) return -1; hash_pw(&pwhash); return 0; |