summaryrefslogtreecommitdiff
path: root/apps/gui/gwps-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/gwps-common.c')
-rw-r--r--apps/gui/gwps-common.c61
1 files changed, 36 insertions, 25 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c
index b6e64d2fcc..2037ad57a5 100644
--- a/apps/gui/gwps-common.c
+++ b/apps/gui/gwps-common.c
@@ -620,30 +620,37 @@ static char* get_tag(struct wps_data* wps_data,
620 wps_data->full_line_progressbar=0; 620 wps_data->full_line_progressbar=0;
621 return buf; 621 return buf;
622#else 622#else
623 char *p=strchr(tag, '|'); 623 /* default values : */
624 if (p) { 624 wps_data->progress_top = -1;
625 wps_data->progress_height=atoi(++p); 625 wps_data->progress_height = 6;
626 p=strchr(p, '|'); 626 wps_data->progress_start = 0;
627 if (p) { 627 wps_data->progress_end = 0;
628 wps_data->progress_start=atoi(++p); 628
629 p=strchr(p, '|'); 629 char *prev=strchr(tag, '|');
630 if (p) 630 if (prev) {
631 wps_data->progress_end=atoi(++p); 631 char *p=strchr(prev+1, '|');
632 else 632 if (p) {
633 wps_data->progress_height=atoi(++prev);
634 prev=strchr(prev, '|');
635 p=strchr(++p, '|');
636 if (p) {
637 wps_data->progress_start=atoi(++prev);
638 prev=strchr(prev, '|');
639 p=strchr(++p, '|');
640 if (p) {
641 wps_data->progress_end=atoi(++prev);
642 prev=strchr(prev, '|');
643 p=strchr(++p, '|');
644 if(p)
645 wps_data->progress_top = atoi(++prev);
646 }
647
648 if (wps_data->progress_height<3)
649 wps_data->progress_height=3;
650 if (wps_data->progress_end<wps_data->progress_start+3)
633 wps_data->progress_end=0; 651 wps_data->progress_end=0;
634 }else { 652 }
635 wps_data->progress_start=0; 653 }
636 wps_data->progress_end=0;
637 }
638
639 if (wps_data->progress_height<3)
640 wps_data->progress_height=3;
641 if (wps_data->progress_end<wps_data->progress_start+3)
642 wps_data->progress_end=0;
643 }else {
644 wps_data->progress_height=6;
645 wps_data->progress_start=0;
646 wps_data->progress_end=0;
647 } 654 }
648 return "\x01"; 655 return "\x01";
649#endif 656#endif
@@ -1824,8 +1831,12 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset,
1824 /* progress */ 1831 /* progress */
1825 if (flags & refresh_mode & WPS_REFRESH_PLAYER_PROGRESS) 1832 if (flags & refresh_mode & WPS_REFRESH_PLAYER_PROGRESS)
1826 { 1833 {
1827 int sb_y = i*h + offset + ((h > data->progress_height + 1) 1834 int sb_y;
1828 ? (h - data->progress_height) / 2 : 1); 1835 if (data->progress_top == -1)
1836 sb_y = i*h + offset + ((h > data->progress_height + 1)
1837 ? (h - data->progress_height) / 2 : 1);
1838 else
1839 sb_y = data->progress_top;
1829 1840
1830 if (!data->progress_end) 1841 if (!data->progress_end)
1831 data->progress_end=display->width; 1842 data->progress_end=display->width;