1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2002 Björn Stenberg
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
23 #include "backlight.h"
26 #ifdef HAVE_REMOTE_LCD
27 #include "lcd-remote.h"
33 #include "mp3_playback.h"
42 #include "powermgmt.h"
53 #include "statusbar.h"
54 #include "screen_access.h"
61 #ifdef HAVE_LCD_BITMAP
62 #include <bitmaps/usblogo.h>
65 #ifdef HAVE_REMOTE_LCD
66 #include <bitmaps/remote_usblogo.h>
72 #if CONFIG_CODEC == SWCODEC
76 #ifdef HAVE_LCD_BITMAP
77 #define SCROLLBAR_WIDTH 6
80 /* only used in set_time screen */
81 #if defined(HAVE_LCD_BITMAP) && (CONFIG_RTC != 0)
82 static int clamp_value_wrap(int value
, int max
, int min
)
98 bool statusbar
= global_settings
.statusbar
; /* force the statusbar */
99 global_settings
.statusbar
= true;
101 show_main_backdrop();
103 #if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
104 show_remote_main_backdrop();
108 screens
[i
].backlight_on();
109 screens
[i
].clear_display();
111 if (i
== SCREEN_REMOTE
)
113 screens
[i
].bitmap(remote_usblogo
,
114 (LCD_REMOTE_WIDTH
-BMPWIDTH_remote_usblogo
),
115 (LCD_REMOTE_HEIGHT
-BMPHEIGHT_remote_usblogo
)/2,
116 BMPWIDTH_remote_usblogo
, BMPHEIGHT_remote_usblogo
);
121 #ifdef HAVE_LCD_BITMAP
122 screens
[i
].transparent_bitmap(usblogo
,
123 (LCD_WIDTH
-BMPWIDTH_usblogo
),
124 (LCD_HEIGHT
-BMPHEIGHT_usblogo
)/2,
125 BMPWIDTH_usblogo
, BMPHEIGHT_usblogo
);
127 screens
[i
].double_height(false);
128 screens
[i
].puts_scroll(0, 0, "[USB Mode]");
129 status_set_param(false);
130 status_set_audio(false);
131 status_set_usb(true);
132 #endif /* HAVE_LCD_BITMAP */
139 gui_syncstatusbar_draw(&statusbars
, true);
141 while (button_get(true) & BUTTON_REL
);
143 usb_acknowledge(SYS_USB_CONNECTED_ACK
);
144 while(usb_wait_for_disconnect_w_tmo(&button_queue
, HZ
)) {
146 #ifdef HAVE_MMC /* USB-MMC bridge can report activity */
147 led(mmc_usb_active(HZ
));
148 #endif /* HAVE_MMC */
149 gui_syncstatusbar_draw(&statusbars
, false);
152 #endif /* SIMULATOR */
153 #ifdef HAVE_LCD_CHARCELLS
154 status_set_usb(false);
155 #endif /* HAVE_LCD_CHARCELLS */
157 screens
[i
].backlight_on();
158 global_settings
.statusbar
= statusbar
;
159 #endif /* USB_NONE */
163 int mmc_remove_request(void)
165 struct queue_event ev
;
168 screens
[i
].clear_display();
169 gui_syncsplash(1, str(LANG_REMOVE_MMC
));
170 if (global_settings
.talk_menu
)
171 talk_id(LANG_REMOVE_MMC
, false);
175 queue_wait_w_tmo(&button_queue
, &ev
, HZ
/2);
178 case SYS_HOTSWAP_EXTRACTED
:
179 return SYS_HOTSWAP_EXTRACTED
;
181 case SYS_USB_DISCONNECTED
:
182 return SYS_USB_DISCONNECTED
;
188 /* the charging screen is only used for archos targets */
189 #if CONFIG_CHARGING && !defined(HAVE_POWEROFF_WHILE_CHARGING) && defined(CPU_SH)
191 #ifdef HAVE_LCD_BITMAP
192 static void charging_display_info(bool animate
)
194 unsigned char charging_logo
[36];
195 const int pox_x
= (LCD_WIDTH
- sizeof(charging_logo
)) / 2;
196 const int pox_y
= 32;
197 static unsigned phase
= 3;
202 #ifdef NEED_ATA_POWER_BATT_MEASURE
203 if (ide_powered()) /* FM and V2 can only measure when ATA power is on */
206 int battv
= battery_voltage();
207 snprintf(buf
, 32, " Batt: %d.%02dV %d%% ", battv
/ 1000,
208 (battv
% 1000) / 10, battery_level());
212 #if CONFIG_CHARGING == CHARGING_CONTROL
214 snprintf(buf
, 32, "Charge mode:");
217 if (charge_state
== CHARGING
)
218 snprintf(buf
, 32, str(LANG_BATTERY_CHARGE
));
219 else if (charge_state
== TOPOFF
)
220 snprintf(buf
, 32, str(LANG_BATTERY_TOPOFF_CHARGE
));
221 else if (charge_state
== TRICKLE
)
222 snprintf(buf
, 32, str(LANG_BATTERY_TRICKLE_CHARGE
));
224 snprintf(buf
, 32, "not charging");
227 if (!charger_enabled
)
229 #endif /* CONFIG_CHARGING == CHARGING_CONTROL */
233 memset(charging_logo
+3, 0x00, 32);
234 charging_logo
[0] = 0x3C;
235 charging_logo
[1] = 0x24;
236 charging_logo
[2] = charging_logo
[35] = 0xFF;
239 { /* draw the outline */
241 lcd_mono_bitmap(charging_logo
, pox_x
, pox_y
+ 8, sizeof(charging_logo
), 8);
242 lcd_set_drawmode(DRMODE_FG
);
244 charging_logo
[0] = charging_logo
[1] = 0x00;
245 memset(charging_logo
+2, 0x80, 34);
246 lcd_mono_bitmap(charging_logo
, pox_x
, pox_y
, sizeof(charging_logo
), 8);
248 memset(charging_logo
+2, 0x01, 34);
249 lcd_mono_bitmap(charging_logo
, pox_x
, pox_y
+ 16, sizeof(charging_logo
), 8);
250 lcd_set_drawmode(DRMODE_SOLID
);
253 { /* animate the middle part */
254 for (i
= 3; i
<MIN(sizeof(charging_logo
)-1, phase
); i
++)
256 if ((i
-phase
) % 8 == 0)
257 { /* draw a "bubble" here */
259 bitpos
= (phase
+ i
/8) % 15; /* "bounce" effect */
261 bitpos
= 14 - bitpos
;
262 charging_logo
[i
] = 0x01 << bitpos
;
265 lcd_mono_bitmap(charging_logo
, pox_x
, pox_y
+ 8, sizeof(charging_logo
), 8);
270 #else /* not HAVE_LCD_BITMAP */
272 static unsigned long logo_chars
[4];
273 static const unsigned char logo_pattern
[] = {
274 0x07, 0x04, 0x1c, 0x14, 0x1c, 0x04, 0x07, 0, /* char 1 */
275 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0, /* char 2 */
276 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0, /* char 3 */
277 0x1f, 0x01, 0x01, 0x01, 0x01, 0x01, 0x1f, 0, /* char 4 */
280 static void logo_lock_patterns(bool on
)
286 for (i
= 0; i
< 4; i
++)
287 logo_chars
[i
] = lcd_get_locked_pattern();
291 for (i
= 0; i
< 4; i
++)
292 lcd_unlock_pattern(logo_chars
[i
]);
296 static void charging_display_info(bool animate
)
300 static unsigned phase
= 3;
303 battv
= battery_voltage();
304 snprintf(buf
, sizeof(buf
), " %d.%02dV", battv
/ 1000, (battv
% 1000) / 10);
307 memcpy(buf
, logo_pattern
, 32); /* copy logo patterns */
309 if (!animate
) /* build the screen */
311 lcd_double_height(false);
312 lcd_puts(0, 0, "[Charging]");
313 for (i
= 0; i
< 4; i
++)
314 lcd_putc(i
, 1, logo_chars
[i
]);
316 else /* animate the logo */
318 for (i
= 3; i
< MIN(19, phase
); i
++)
320 if ((i
- phase
) % 5 == 0)
321 { /* draw a "bubble" here */
322 ypos
= (phase
+ i
/5) % 9; /* "bounce" effect */
325 buf
[5 - ypos
+ 8 * (i
/5)] |= 0x10 >> (i
%5);
331 for (i
= 0; i
< 4; i
++)
332 lcd_define_pattern(logo_chars
[i
], buf
+ 8 * i
);
336 #endif /* (not) HAVE_LCD_BITMAP */
338 /* blocks while charging, returns on event:
339 1 if charger cable was removed
340 2 if Off/Stop key was pressed
341 3 if On key was pressed
342 4 if USB was connected */
344 int charging_screen(void)
349 ide_power_enable(false); /* power down the disk, else would be spinning */
352 backlight_set_timeout(global_settings
.backlight_timeout
);
353 #ifdef HAVE_REMOTE_LCD
354 remote_backlight_set_timeout(global_settings
.remote_backlight_timeout
);
356 backlight_set_timeout_plugged(global_settings
.backlight_timeout_plugged
);
357 gui_syncstatusbar_draw(&statusbars
, true);
359 #ifdef HAVE_LCD_CHARCELLS
360 logo_lock_patterns(true);
362 charging_display_info(false);
366 gui_syncstatusbar_draw(&statusbars
, false);
367 charging_display_info(true);
368 button
= get_action(CONTEXT_STD
,HZ
/3);
369 if (button
== ACTION_STD_OK
)
371 else if (usb_detect())
373 else if (!charger_inserted())
377 #ifdef HAVE_LCD_CHARCELLS
378 logo_lock_patterns(false);
382 #endif /* CONFIG_CHARGING && !HAVE_POWEROFF_WHILE_CHARGING && defined(CPU_SH) */
385 void charging_splash(void)
387 gui_syncsplash(2*HZ
, (unsigned char *)str(LANG_BATTERY_CHARGE
));
388 button_clear_queue();
393 #if defined(HAVE_LCD_BITMAP) && (CONFIG_RTC != 0)
395 /* little helper function for voice output */
396 static void say_time(int cursorpos
, const struct tm
*tm
)
401 if (!global_settings
.talk_menu
)
419 value
= tm
->tm_year
+ 1900;
426 if (cursorpos
== 4) /* month */
427 talk_id(LANG_MONTH_JANUARY
+ tm
->tm_mon
, false);
429 talk_value(value
, unit
, false);
436 #define SEPARATOR ":"
437 bool set_time_screen(const char* title
, struct tm
*tm
)
441 unsigned int i
, j
, s
;
443 unsigned int julianday
;
444 unsigned int realyear
;
446 unsigned int min
, max
;
447 unsigned int statusbar_height
= 0;
448 unsigned int separator_width
, weekday_width
;
449 unsigned int prev_line_height
;
450 int daysinmonth
[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
451 unsigned char buffer
[20];
452 struct viewport vp
[NB_SCREENS
];
455 /* 6 possible cursor possitions, 2 values stored for each: x, y */
456 unsigned int cursor
[6][2];
459 unsigned char *ptr
[6];
461 if(global_settings
.statusbar
)
462 statusbar_height
= STATUSBAR_HEIGHT
;
464 /* speak selection when screen is entered */
465 say_time(cursorpos
, tm
);
468 /* for easy acess in the drawing loop */
469 ptr
[0] = buffer
; /* hours */
470 ptr
[1] = buffer
+ 3; /* minutes */
471 ptr
[2] = buffer
+ 6; /* seconds */
472 ptr
[3] = buffer
+ 9; /* year */
473 ptr
[4] = str(LANG_MONTH_JANUARY
+ tm
->tm_mon
); /* monthname */
474 ptr
[5] = buffer
+ 14; /* day of month */
476 /* calculate the number of days in febuary */
477 realyear
= tm
->tm_year
+ 1900;
478 if((realyear
% 4 == 0 && !(realyear
% 100 == 0)) || realyear
% 400 == 0)
483 /* fix day if month or year changed */
484 if (tm
->tm_mday
> daysinmonth
[tm
->tm_mon
])
485 tm
->tm_mday
= daysinmonth
[tm
->tm_mon
];
487 /* calculate day of week */
488 julianday
= tm
->tm_mday
;
489 for(i
= 0; (int)i
< tm
->tm_mon
; i
++) {
490 julianday
+= daysinmonth
[i
];
493 tm
->tm_wday
= (realyear
+ julianday
+ (realyear
- 1) / 4 -
494 (realyear
- 1) / 100 + (realyear
- 1) / 400 + 7 - 1) % 7;
496 /* put all the numbers we want from the tm struct into
497 an easily printable buffer */
498 snprintf(buffer
, sizeof(buffer
),
499 "%02d " "%02d " "%02d " "%04d " "%02d",
500 tm
->tm_hour
, tm
->tm_min
, tm
->tm_sec
,
501 tm
->tm_year
+1900, tm
->tm_mday
);
503 /* convert spaces in the buffer to '\0' to make it possible to work
504 directly on the buffer */
505 for(i
=0; i
< sizeof(buffer
); i
++)
513 viewport_set_defaults(&vp
[s
], s
);
514 nb_lines
= viewport_get_nb_lines(&vp
[s
]);
516 /* minimum lines needed is 2 + title line */
519 vp
[s
].font
= FONT_SYSFIXED
;
520 nb_lines
= viewport_get_nb_lines(&vp
[s
]);
523 /* recalculate the positions and offsets */
525 screens
[s
].getstringsize(title
, NULL
, &prev_line_height
);
527 prev_line_height
= 0;
529 screens
[s
].getstringsize(SEPARATOR
, &separator_width
, NULL
);
532 screens
[s
].getstringsize(str(LANG_WEEKDAY_SUNDAY
+ tm
->tm_wday
), &weekday_width
, NULL
);
533 screens
[s
].getstringsize(" ", &separator_width
, NULL
);
535 for(i
=0, j
=0; i
< 6; i
++)
537 if(i
==3) /* second row */
539 j
= weekday_width
+ separator_width
;;
540 prev_line_height
*= 2;
542 screens
[s
].getstringsize(ptr
[i
], &width
, NULL
);
543 cursor
[i
][INDEX_Y
] = prev_line_height
+ statusbar_height
;
544 cursor
[i
][INDEX_X
] = j
;
545 j
+= width
+ separator_width
;
548 /* draw the screen */
549 screens
[s
].set_viewport(&vp
[s
]);
550 screens
[s
].clear_viewport();
551 /* display the screen title */
552 screens
[s
].puts_scroll(0, 0, title
);
554 /* these are not selectable, so we draw them outside the loop */
555 screens
[s
].putsxy(0, cursor
[3][INDEX_Y
],
556 str(LANG_WEEKDAY_SUNDAY
+ tm
->tm_wday
)); /* name of the week day */
558 /* draw the selected item with drawmode set to
559 DRMODE_SOLID|DRMODE_INVERSEVID, all other selectable
560 items with drawmode DRMODE_SOLID */
563 if (cursorpos
== (int)i
)
564 vp
[s
].drawmode
= (DRMODE_SOLID
|DRMODE_INVERSEVID
);
566 screens
[s
].putsxy(cursor
[i
][INDEX_X
],
567 cursor
[i
][INDEX_Y
], ptr
[i
]);
569 vp
[s
].drawmode
= DRMODE_SOLID
;
571 screens
[s
].putsxy(cursor
[i
/4 +1][INDEX_X
] - separator_width
,
572 cursor
[0][INDEX_Y
], SEPARATOR
);
575 /* print help text */
577 screens
[s
].puts(0, 4, str(LANG_TIME_SET_BUTTON
));
579 screens
[s
].puts(0, 5, str(LANG_TIME_REVERT
));
580 screens
[s
].update_viewport();
581 screens
[s
].set_viewport(NULL
);
583 gui_syncstatusbar_draw(&statusbars
, true);
585 /* set the most common numbers */
588 /* calculate the minimum and maximum for the number under cursor */
592 valptr
= &tm
->tm_hour
;
595 valptr
= &tm
->tm_min
;
598 valptr
= &tm
->tm_sec
;
603 valptr
= &tm
->tm_year
;
607 valptr
= &tm
->tm_mon
;
611 max
= daysinmonth
[tm
->tm_mon
];
612 valptr
= &tm
->tm_mday
;
616 button
= get_action(CONTEXT_SETTINGS_TIME
, TIMEOUT_BLOCK
);
618 case ACTION_STD_PREV
:
619 cursorpos
= clamp_value_wrap(--cursorpos
, 5, 0);
620 say_time(cursorpos
, tm
);
622 case ACTION_STD_NEXT
:
623 cursorpos
= clamp_value_wrap(++cursorpos
, 5, 0);
624 say_time(cursorpos
, tm
);
626 case ACTION_SETTINGS_INC
:
627 case ACTION_SETTINGS_INCREPEAT
:
628 *valptr
= clamp_value_wrap(++(*valptr
), max
, min
);
629 say_time(cursorpos
, tm
);
631 case ACTION_SETTINGS_DEC
:
632 case ACTION_SETTINGS_DECREPEAT
:
633 *valptr
= clamp_value_wrap(--(*valptr
), max
, min
);
634 say_time(cursorpos
, tm
);
641 case ACTION_STD_CANCEL
:
647 if (default_event_handler(button
) == SYS_USB_CONNECTED
)
654 #endif /* defined(HAVE_LCD_BITMAP) && (CONFIG_RTC != 0) */
656 #if (CONFIG_KEYPAD == RECORDER_PAD) && !defined(HAVE_SW_POWEROFF)
657 bool shutdown_screen(void)
661 long time_entered
= current_tick
;
665 gui_syncsplash(0, str(LANG_CONFIRM_SHUTDOWN
));
667 while(!done
&& TIME_BEFORE(current_tick
,time_entered
+HZ
*2))
669 button
= get_action(CONTEXT_STD
,HZ
);
672 case ACTION_STD_CANCEL
:
676 /* do nothing here, because ACTION_NONE might be caused
677 * by timeout or button release. In case of timeout the loop
678 * is terminated by TIME_BEFORE */
683 if(default_event_handler(button
) == SYS_USB_CONNECTED
)
693 static const int id3_headers
[]=
698 LANG_ID3_ALBUMARTIST
,
709 #if CONFIG_CODEC == SWCODEC
716 static char * id3_get_info(int selected_item
, void* data
,
717 char *buffer
, size_t buffer_len
)
719 struct mp3entry
* id3
=(struct mp3entry
*)data
;
720 int info_no
=selected_item
/2;
721 if(!(selected_item
%2))
723 return( str(id3_headers
[info_no
]));
731 case 0:/*LANG_ID3_TITLE*/
734 case 1:/*LANG_ID3_ARTIST*/
737 case 2:/*LANG_ID3_ALBUM*/
740 case 3:/*LANG_ID3_ALBUMARTIST*/
741 info
=id3
->albumartist
;
743 case 4:/*LANG_ID3_GROUPING*/
746 case 5:/*LANG_ID3_DISCNUM*/
747 if (id3
->disc_string
)
748 info
= id3
->disc_string
;
749 else if (id3
->discnum
)
751 snprintf(buffer
, buffer_len
, "%d", id3
->discnum
);
755 case 6:/*LANG_ID3_TRACKNUM*/
756 if (id3
->track_string
)
757 info
= id3
->track_string
;
758 else if (id3
->tracknum
)
760 snprintf(buffer
, buffer_len
, "%d", id3
->tracknum
);
764 case 7:/*LANG_ID3_COMMENT*/
767 case 8:/*LANG_ID3_GENRE*/
768 info
= id3
->genre_string
;
770 case 9:/*LANG_ID3_YEAR*/
771 if (id3
->year_string
)
772 info
= id3
->year_string
;
775 snprintf(buffer
, buffer_len
, "%d", id3
->year
);
779 case 10:/*LANG_ID3_LENGTH*/
780 format_time(buffer
, buffer_len
, id3
->length
);
783 case 11:/*LANG_ID3_PLAYLIST*/
784 snprintf(buffer
, buffer_len
, "%d/%d", playlist_get_display_index(),
788 case 12:/*LANG_ID3_BITRATE*/
789 snprintf(buffer
, buffer_len
, "%d kbps%s", id3
->bitrate
,
790 id3
->vbr
? str(LANG_ID3_VBR
) : (const unsigned char*) "");
793 case 13:/*LANG_ID3_FREQUENCY*/
794 snprintf(buffer
, buffer_len
, "%ld Hz", id3
->frequency
);
797 #if CONFIG_CODEC == SWCODEC
798 case 14:/*LANG_ID3_TRACK_GAIN*/
799 info
=id3
->track_gain_string
;
801 case 15:/*LANG_ID3_ALBUM_GAIN*/
802 info
=id3
->album_gain_string
;
804 case 16:/*LANG_ID3_PATH*/
806 case 14:/*LANG_ID3_PATH*/
811 return info
&& *info
? info
: (char*) str(LANG_ID3_NO_INFO
);
815 bool browse_id3(void)
817 struct gui_synclist id3_lists
;
818 struct mp3entry
* id3
= audio_current_track();
821 gui_synclist_init(&id3_lists
, &id3_get_info
, id3
, true, 2, NULL
);
822 gui_synclist_set_nb_items(&id3_lists
,
823 sizeof(id3_headers
)/sizeof(id3_headers
[0])*2);
824 gui_synclist_draw(&id3_lists
);
825 gui_syncstatusbar_draw(&statusbars
, true);
827 gui_syncstatusbar_draw(&statusbars
, false);
828 key
= get_action(CONTEXT_LIST
,HZ
/2);
829 if(key
!=ACTION_NONE
&& key
!=ACTION_UNKNOWN
830 && !gui_synclist_do_button(&id3_lists
, &key
,LIST_WRAP_UNLESS_HELD
))
832 return(default_event_handler(key
) == SYS_USB_CONNECTED
);
837 static char* runtime_get_data(int selected_item
, void* data
,
838 char* buffer
, size_t buffer_len
)
841 unsigned char *headers
[] = {str(LANG_RUNNING_TIME
), str(LANG_TOP_TIME
) };
843 if(!(selected_item
%2))
844 return headers
[selected_item
/2];
847 t
= global_status
.topruntime
;
849 else t
= global_status
.runtime
;
851 snprintf(buffer
, buffer_len
, "%dh %dm %ds",
852 t
/ 3600, (t
% 3600) / 60, t
% 60);
856 static int runtime_speak_data(int selected_item
, void* data
)
859 long title_ids
[] = {LANG_RUNNING_TIME
, LANG_TOP_TIME
};
861 title_ids
[selected_item
/2],
862 TALK_ID((selected_item
== 0) ? global_status
.runtime
863 : global_status
.topruntime
, UNIT_TIME
));
868 bool view_runtime(void)
870 static const char *lines
[]={ID2P(LANG_CLEAR_TIME
)};
871 static const struct text_message message
={lines
, 1};
873 struct gui_synclist lists
;
875 gui_synclist_init(&lists
, runtime_get_data
, NULL
, false, 2, NULL
);
876 #if !defined(HAVE_LCD_CHARCELLS)
877 gui_synclist_set_title(&lists
, str(LANG_RUNNING_TIME
), NOICON
);
879 gui_synclist_set_title(&lists
, NULL
, NOICON
);
881 if(global_settings
.talk_menu
)
882 gui_synclist_set_voice_callback(&lists
, runtime_speak_data
);
883 gui_synclist_set_icon_callback(&lists
, NULL
);
884 gui_synclist_set_nb_items(&lists
, 4);
885 gui_synclist_speak_item(&lists
);
889 if (charger_inserted()
890 #ifdef HAVE_USB_POWER
895 global_status
.runtime
= 0;
900 global_status
.runtime
+= ((current_tick
- lasttime
) / HZ
);
902 lasttime
= current_tick
;
903 gui_synclist_draw(&lists
);
904 gui_syncstatusbar_draw(&statusbars
, true);
905 list_do_action(CONTEXT_STD
, HZ
,
906 &lists
, &action
, LIST_WRAP_UNLESS_HELD
);
907 if(action
== ACTION_STD_CANCEL
)
909 if(action
== ACTION_STD_OK
) {
910 if(gui_syncyesno_run(&message
, NULL
, NULL
)==YESNO_YES
)
912 if (!(gui_synclist_get_sel_pos(&lists
)/2))
913 global_status
.runtime
= 0;
915 global_status
.topruntime
= 0;
916 gui_synclist_speak_item(&lists
);
919 if(default_event_handler(action
) == SYS_USB_CONNECTED
)