diff options
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 86761cf149..243fd1fdc6 100644 --- a/apps/plugins/databox/databox.c +++ b/apps/plugins/databox/databox.c | |||
@@ -68,6 +68,10 @@ void print(char *word, int invert) { | |||
68 | printing.position=0; | 68 | printing.position=0; |
69 | newpos=printing.position+strlen+1; | 69 | newpos=printing.position+strlen+1; |
70 | } | 70 | } |
71 | /* Fixme: the display code needs to keep the current item visible instead of | ||
72 | * just displaying the first items. */ | ||
73 | if (printing.font_h*printing.line >= LCD_HEIGHT) | ||
74 | return; | ||
71 | rb->lcd_putsxy(printing.font_w*printing.position,printing.font_h*printing.line,word); | 75 | rb->lcd_putsxy(printing.font_w*printing.position,printing.font_h*printing.line,word); |
72 | if(invert) | 76 | if(invert) |
73 | rb->lcd_invertrect(printing.font_w*printing.position,printing.font_h*printing.line,printing.font_w*strlen,printing.font_h); | 77 | 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) { | |||
84 | printing.line++; | 88 | printing.line++; |
85 | printing.position = 0; | 89 | printing.position = 0; |
86 | newpos = printing.position + strlen + (invert ? 3 : 1); | 90 | newpos = printing.position + strlen + (invert ? 3 : 1); |
87 | } | 91 | } |
92 | /* Fixme: the display code needs to keep the current item visible instead of | ||
93 | * just displaying the first items. */ | ||
94 | if (printing.line >= 2) | ||
95 | return; | ||
88 | if (invert) { | 96 | if (invert) { |
89 | rb->lcd_putc(printing.position, printing.line, MARKER_LEFT); | 97 | rb->lcd_putc(printing.position, printing.line, MARKER_LEFT); |
90 | rb->lcd_puts(printing.position + 1, printing.line, word); | 98 | rb->lcd_puts(printing.position + 1, printing.line, word); |
@@ -226,8 +234,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
226 | databox_init(); | 234 | databox_init(); |
227 | filename[0] = '\0'; | 235 | filename[0] = '\0'; |
228 | if(rb->kbd_input(filename, sizeof filename)) { | 236 | if(rb->kbd_input(filename, sizeof filename)) { |
229 | rb->splash(HZ*2, true, "Something went wrong with the filename.. exiting.."); | 237 | rb->splash(HZ*2, true, "Cancelled..."); |
230 | return PLUGIN_ERROR; | 238 | return PLUGIN_OK; |
231 | } | 239 | } |
232 | /* add / in front if omitted */ | 240 | /* add / in front if omitted */ |
233 | if(filename[0]!='/') { | 241 | if(filename[0]!='/') { |
@@ -278,7 +286,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
278 | break; | 286 | break; |
279 | 287 | ||
280 | case BUTTON_RIGHT: | 288 | case BUTTON_RIGHT: |
281 | #ifdef BUTTON_DOWN | 289 | #ifdef BUTTON_UP |
282 | case BUTTON_UP: | 290 | case BUTTON_UP: |
283 | #endif | 291 | #endif |
284 | if (editing.selecting) | 292 | if (editing.selecting) |