diff options
| author | Jens Arnold <amiconn@rockbox.org> | 2005-05-08 21:25:16 +0000 |
|---|---|---|
| committer | Jens Arnold <amiconn@rockbox.org> | 2005-05-08 21:25:16 +0000 |
| commit | ed5b06b04c9abbedc5f3c326f057af5f38917151 (patch) | |
| tree | 7ad25ae960037724ef91e3d8fb03668e39c7b6d4 /apps/plugins | |
| parent | 68ffd8fd2f565927e298f9e29abbee23274ec258 (diff) | |
| download | rockbox-ed5b06b04c9abbedc5f3c326f057af5f38917151.zip rockbox-ed5b06b04c9abbedc5f3c326f057af5f38917151.tar.gz rockbox-ed5b06b04c9abbedc5f3c326f057af5f38917151.tar.bz2 rockbox-ed5b06b04c9abbedc5f3c326f057af5f38917151.tar.xz | |
(1) Don't print on invisible lines. (2) Proper message for aborted filename input.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6443 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
| -rw-r--r-- | apps/plugins/databox/databox.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/apps/plugins/databox/databox.c b/apps/plugins/databox/databox.c index 86761cf..243fd1f 100644 --- a/apps/plugins/databox/databox.c +++ b/apps/plugins/databox/databox.c @@ -68,6 +68,10 @@ void print(char *word, int invert) { printing.position=0; newpos=printing.position+strlen+1; } + /* Fixme: the display code needs to keep the current item visible instead of + * just displaying the first items. */ + if (printing.font_h*printing.line >= LCD_HEIGHT) + return; rb->lcd_putsxy(printing.font_w*printing.position,printing.font_h*printing.line,word); if(invert) rb->lcd_invertrect(printing.font_w*printing.position,printing.font_h*printing.line,printing.font_w*strlen,printing.font_h); @@ -84,7 +88,11 @@ void print(char *word, int invert) { printing.line++; printing.position = 0; newpos = printing.position + strlen + (invert ? 3 : 1); - } + } + /* Fixme: the display code needs to keep the current item visible instead of + * just displaying the first items. */ + if (printing.line >= 2) + return; if (invert) { rb->lcd_putc(printing.position, printing.line, MARKER_LEFT); rb->lcd_puts(printing.position + 1, printing.line, word); @@ -226,8 +234,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) databox_init(); filename[0] = '\0'; if(rb->kbd_input(filename, sizeof filename)) { - rb->splash(HZ*2, true, "Something went wrong with the filename.. exiting.."); - return PLUGIN_ERROR; + rb->splash(HZ*2, true, "Cancelled..."); + return PLUGIN_OK; } /* add / in front if omitted */ if(filename[0]!='/') { @@ -278,7 +286,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) break; case BUTTON_RIGHT: -#ifdef BUTTON_DOWN +#ifdef BUTTON_UP case BUTTON_UP: #endif if (editing.selecting) |